zevairouter 1.0.30 → 1.0.32

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 (981) hide show
  1. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  2. package/cli/app/.next-cli-build/app-path-routes-manifest.json +9 -7
  3. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  4. package/cli/app/.next-cli-build/routes-manifest.json +12 -0
  5. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +2 -2
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +2 -2
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  63. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  64. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  65. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  66. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  67. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  68. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  69. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  70. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  71. package/cli/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  72. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  73. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  74. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  75. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  76. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  77. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  78. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  79. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  80. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  81. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  82. package/cli/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  83. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  84. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  85. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  86. package/cli/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  87. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  88. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  89. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  90. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  91. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  92. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  93. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  94. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  95. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  96. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  97. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  98. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  99. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  100. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  101. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  102. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  103. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  104. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  105. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
  106. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  112. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  120. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  124. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  126. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  128. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  132. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  134. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  135. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  136. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  138. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  140. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/health/route.js +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route.js +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/route.js +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/route.js.nft.json +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/latest/route.js +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/latest/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/route.js +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/route.js.nft.json +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  226. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -0
  278. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -0
  279. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route_client-reference-manifest.js +1 -0
  280. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  297. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  299. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  303. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  319. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  339. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  341. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -0
  345. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -0
  346. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route_client-reference-manifest.js +1 -0
  347. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  353. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  357. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  358. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  359. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  360. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  361. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  362. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  363. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  364. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  365. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  366. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  367. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  368. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  369. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  370. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  371. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  372. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  373. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  374. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  375. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  376. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  377. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  378. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  379. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  380. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  381. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  382. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  383. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  384. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  385. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  386. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  387. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  388. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  389. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  390. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  391. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  392. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  393. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  394. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  395. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  396. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  397. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  398. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  399. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  400. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  401. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  402. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  403. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  404. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  405. package/cli/app/.next-cli-build/server/app/callback/page.js +2 -2
  406. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  407. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  408. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  409. package/cli/app/.next-cli-build/server/app/callback.rsc +4 -4
  410. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  411. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  412. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  413. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  414. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  415. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  416. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  417. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +6 -6
  418. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  419. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  420. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  421. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  422. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +6 -6
  423. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  424. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +4 -4
  425. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +2 -2
  426. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  427. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  428. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  429. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  430. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  431. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  432. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  433. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  434. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  435. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  436. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  437. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  438. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  439. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  440. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  441. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  442. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  443. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  444. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  445. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  446. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  447. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  448. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  449. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  450. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  451. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  452. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  453. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  454. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  455. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  456. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  457. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +6 -6
  458. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  459. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  460. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  461. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  462. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +6 -6
  463. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  464. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +4 -4
  465. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +2 -2
  466. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  467. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  468. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  469. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  470. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  471. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  472. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  473. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  474. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  475. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  476. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  477. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  478. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  479. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  480. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  481. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  482. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  483. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  484. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  485. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  486. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  487. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  488. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  489. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  490. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  491. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  492. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  493. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  494. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  495. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  496. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  497. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  498. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  499. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  500. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  501. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  502. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  503. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  504. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  505. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  506. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  507. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  508. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  509. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  510. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  511. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  512. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  513. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  514. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  515. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  516. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  517. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  518. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  519. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  520. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  521. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  522. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  523. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  524. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  525. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  526. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  527. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  528. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  529. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  530. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  531. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  532. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  533. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  534. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  535. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  536. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  537. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  538. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  539. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  540. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  541. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  542. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  543. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  544. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  545. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  546. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  547. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  548. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  549. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  550. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  551. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  552. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  553. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  554. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  555. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  556. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  557. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  558. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  559. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  560. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  561. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  562. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  563. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  564. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  565. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  566. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  567. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  568. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  569. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  570. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  571. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  572. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  573. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  574. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  575. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  576. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  577. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  578. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  579. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  580. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  581. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  582. package/cli/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  583. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  584. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  585. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  586. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  587. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  588. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  589. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  590. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  591. package/cli/app/.next-cli-build/server/app/index.rsc +4 -4
  592. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  593. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  594. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  595. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  596. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  597. package/cli/app/.next-cli-build/server/app/landing/page.js +2 -2
  598. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  599. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  600. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  601. package/cli/app/.next-cli-build/server/app/landing.rsc +4 -4
  602. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  603. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  604. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  605. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  606. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  607. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  608. package/cli/app/.next-cli-build/server/app/login/page.js +2 -2
  609. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  610. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  611. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  612. package/cli/app/.next-cli-build/server/app/login.rsc +5 -5
  613. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  614. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  615. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  616. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  617. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  618. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  619. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  620. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  621. package/cli/app/.next-cli-build/server/app/page.js +2 -2
  622. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  623. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  624. package/cli/app/.next-cli-build/server/app-paths-manifest.json +9 -7
  625. package/cli/app/.next-cli-build/server/chunks/1939.js +16 -0
  626. package/cli/app/.next-cli-build/server/chunks/2777.js +1 -1
  627. package/cli/app/.next-cli-build/server/chunks/3110.js +2 -2
  628. package/cli/app/.next-cli-build/server/chunks/318.js +1 -1
  629. package/cli/app/.next-cli-build/server/chunks/3188.js +1 -1
  630. package/cli/app/.next-cli-build/server/chunks/4161.js +1 -1
  631. package/cli/app/.next-cli-build/server/chunks/4746.js +1 -1
  632. package/cli/app/.next-cli-build/server/chunks/5681.js +1 -1
  633. package/cli/app/.next-cli-build/server/chunks/6896.js +1 -1
  634. package/cli/app/.next-cli-build/server/chunks/7153.js +1 -1
  635. package/cli/app/.next-cli-build/server/chunks/8255.js +1 -1
  636. package/cli/app/.next-cli-build/server/chunks/915.js +1 -1
  637. package/cli/app/.next-cli-build/server/chunks/9326.js +1 -1
  638. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  639. package/cli/app/.next-cli-build/server/middleware.js +4 -4
  640. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  641. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  642. package/cli/app/.next-cli-build/static/Yz3coI6A8QuQdRmTp8d6v/_buildManifest.js +1 -0
  643. package/cli/app/.next-cli-build/static/chunks/{1321-f0bfa39f5088c2fe.js → 1321-79362c730d431466.js} +1 -1
  644. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-f204758bcc0ed5af.js → page-1ce237b69db4b6cf.js} +2 -2
  645. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-3b33a64814f8c670.js +1 -0
  646. package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-576986aaa25d6ad2.js +1 -0
  647. package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-576986aaa25d6ad2.js +1 -0
  648. package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-576986aaa25d6ad2.js +1 -0
  649. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-576986aaa25d6ad2.js +1 -0
  650. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-576986aaa25d6ad2.js +1 -0
  651. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-576986aaa25d6ad2.js +1 -0
  652. package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-576986aaa25d6ad2.js +1 -0
  653. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-576986aaa25d6ad2.js +1 -0
  654. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-576986aaa25d6ad2.js +1 -0
  655. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-576986aaa25d6ad2.js +1 -0
  656. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-576986aaa25d6ad2.js +1 -0
  657. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-576986aaa25d6ad2.js +1 -0
  658. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-576986aaa25d6ad2.js +1 -0
  659. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-576986aaa25d6ad2.js +1 -0
  660. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-576986aaa25d6ad2.js +1 -0
  661. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-576986aaa25d6ad2.js +1 -0
  662. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-576986aaa25d6ad2.js +1 -0
  663. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-576986aaa25d6ad2.js +1 -0
  664. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-576986aaa25d6ad2.js +1 -0
  665. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-576986aaa25d6ad2.js +1 -0
  666. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-576986aaa25d6ad2.js +1 -0
  667. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-576986aaa25d6ad2.js +1 -0
  668. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-576986aaa25d6ad2.js +1 -0
  669. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-576986aaa25d6ad2.js +1 -0
  670. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-576986aaa25d6ad2.js +1 -0
  671. package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-576986aaa25d6ad2.js +1 -0
  672. package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-576986aaa25d6ad2.js +1 -0
  673. package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-576986aaa25d6ad2.js +1 -0
  674. package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-576986aaa25d6ad2.js +1 -0
  675. package/cli/app/.next-cli-build/static/chunks/app/api/context/route-576986aaa25d6ad2.js +1 -0
  676. package/cli/app/.next-cli-build/static/chunks/app/api/health/route-576986aaa25d6ad2.js +1 -0
  677. package/cli/app/.next-cli-build/static/chunks/app/api/init/route-576986aaa25d6ad2.js +1 -0
  678. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-576986aaa25d6ad2.js +1 -0
  679. package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-576986aaa25d6ad2.js +1 -0
  680. package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-576986aaa25d6ad2.js +1 -0
  681. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-576986aaa25d6ad2.js +1 -0
  682. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-576986aaa25d6ad2.js +1 -0
  683. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-576986aaa25d6ad2.js +1 -0
  684. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-576986aaa25d6ad2.js +1 -0
  685. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-576986aaa25d6ad2.js +1 -0
  686. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-576986aaa25d6ad2.js +1 -0
  687. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-576986aaa25d6ad2.js +1 -0
  688. package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-576986aaa25d6ad2.js +1 -0
  689. package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-576986aaa25d6ad2.js +1 -0
  690. package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-576986aaa25d6ad2.js +1 -0
  691. package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-576986aaa25d6ad2.js +1 -0
  692. package/cli/app/.next-cli-build/static/chunks/app/api/models/route-576986aaa25d6ad2.js +1 -0
  693. package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-576986aaa25d6ad2.js +1 -0
  694. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-576986aaa25d6ad2.js +1 -0
  695. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-576986aaa25d6ad2.js +1 -0
  696. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-576986aaa25d6ad2.js +1 -0
  697. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-576986aaa25d6ad2.js +1 -0
  698. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-576986aaa25d6ad2.js +1 -0
  699. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-576986aaa25d6ad2.js +1 -0
  700. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route-576986aaa25d6ad2.js +1 -0
  701. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route-576986aaa25d6ad2.js +1 -0
  702. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/route-576986aaa25d6ad2.js +1 -0
  703. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/latest/route-576986aaa25d6ad2.js +1 -0
  704. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/route-576986aaa25d6ad2.js +1 -0
  705. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-576986aaa25d6ad2.js +1 -0
  706. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-576986aaa25d6ad2.js +1 -0
  707. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-576986aaa25d6ad2.js +1 -0
  708. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-576986aaa25d6ad2.js +1 -0
  709. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-576986aaa25d6ad2.js +1 -0
  710. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-576986aaa25d6ad2.js +1 -0
  711. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-576986aaa25d6ad2.js +1 -0
  712. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-576986aaa25d6ad2.js +1 -0
  713. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-576986aaa25d6ad2.js +1 -0
  714. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-576986aaa25d6ad2.js +1 -0
  715. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-576986aaa25d6ad2.js +1 -0
  716. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-576986aaa25d6ad2.js +1 -0
  717. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-576986aaa25d6ad2.js +1 -0
  718. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-576986aaa25d6ad2.js +1 -0
  719. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-576986aaa25d6ad2.js +1 -0
  720. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-576986aaa25d6ad2.js +1 -0
  721. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-576986aaa25d6ad2.js +1 -0
  722. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-576986aaa25d6ad2.js +1 -0
  723. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-576986aaa25d6ad2.js +1 -0
  724. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-576986aaa25d6ad2.js +1 -0
  725. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-576986aaa25d6ad2.js +1 -0
  726. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-576986aaa25d6ad2.js +1 -0
  727. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-576986aaa25d6ad2.js +1 -0
  728. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-576986aaa25d6ad2.js +1 -0
  729. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-576986aaa25d6ad2.js +1 -0
  730. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-576986aaa25d6ad2.js +1 -0
  731. package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-576986aaa25d6ad2.js +1 -0
  732. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-576986aaa25d6ad2.js +1 -0
  733. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-576986aaa25d6ad2.js +1 -0
  734. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-576986aaa25d6ad2.js +1 -0
  735. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-576986aaa25d6ad2.js +1 -0
  736. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-576986aaa25d6ad2.js +1 -0
  737. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-576986aaa25d6ad2.js +1 -0
  738. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-576986aaa25d6ad2.js +1 -0
  739. package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-576986aaa25d6ad2.js +1 -0
  740. package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-576986aaa25d6ad2.js +1 -0
  741. package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-576986aaa25d6ad2.js +1 -0
  742. package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-576986aaa25d6ad2.js +1 -0
  743. package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-576986aaa25d6ad2.js +1 -0
  744. package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-576986aaa25d6ad2.js +1 -0
  745. package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-576986aaa25d6ad2.js +1 -0
  746. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-576986aaa25d6ad2.js +1 -0
  747. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-576986aaa25d6ad2.js +1 -0
  748. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-576986aaa25d6ad2.js +1 -0
  749. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-576986aaa25d6ad2.js +1 -0
  750. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-576986aaa25d6ad2.js +1 -0
  751. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-576986aaa25d6ad2.js +1 -0
  752. package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-576986aaa25d6ad2.js +1 -0
  753. package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-576986aaa25d6ad2.js +1 -0
  754. package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-576986aaa25d6ad2.js +1 -0
  755. package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-576986aaa25d6ad2.js +1 -0
  756. package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-576986aaa25d6ad2.js +1 -0
  757. package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-576986aaa25d6ad2.js +1 -0
  758. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-576986aaa25d6ad2.js +1 -0
  759. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-576986aaa25d6ad2.js +1 -0
  760. package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-576986aaa25d6ad2.js +1 -0
  761. package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-576986aaa25d6ad2.js +1 -0
  762. package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-576986aaa25d6ad2.js +1 -0
  763. package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-576986aaa25d6ad2.js +1 -0
  764. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-576986aaa25d6ad2.js +1 -0
  765. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-576986aaa25d6ad2.js +1 -0
  766. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-576986aaa25d6ad2.js +1 -0
  767. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-576986aaa25d6ad2.js +1 -0
  768. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-576986aaa25d6ad2.js +1 -0
  769. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-576986aaa25d6ad2.js +1 -0
  770. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-576986aaa25d6ad2.js +1 -0
  771. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-576986aaa25d6ad2.js +1 -0
  772. package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-576986aaa25d6ad2.js +1 -0
  773. package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-576986aaa25d6ad2.js +1 -0
  774. package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-576986aaa25d6ad2.js +1 -0
  775. package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-576986aaa25d6ad2.js +1 -0
  776. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-576986aaa25d6ad2.js +1 -0
  777. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-576986aaa25d6ad2.js +1 -0
  778. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-576986aaa25d6ad2.js +1 -0
  779. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-576986aaa25d6ad2.js +1 -0
  780. package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-576986aaa25d6ad2.js +1 -0
  781. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-576986aaa25d6ad2.js +1 -0
  782. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-576986aaa25d6ad2.js +1 -0
  783. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-576986aaa25d6ad2.js +1 -0
  784. package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-576986aaa25d6ad2.js +1 -0
  785. package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-576986aaa25d6ad2.js +1 -0
  786. package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-576986aaa25d6ad2.js +1 -0
  787. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-576986aaa25d6ad2.js +1 -0
  788. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-576986aaa25d6ad2.js +1 -0
  789. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-576986aaa25d6ad2.js +1 -0
  790. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-576986aaa25d6ad2.js +1 -0
  791. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-576986aaa25d6ad2.js +1 -0
  792. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-576986aaa25d6ad2.js +1 -0
  793. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-576986aaa25d6ad2.js +1 -0
  794. package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-576986aaa25d6ad2.js +1 -0
  795. package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-576986aaa25d6ad2.js +1 -0
  796. package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-576986aaa25d6ad2.js +1 -0
  797. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-576986aaa25d6ad2.js +1 -0
  798. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-576986aaa25d6ad2.js +1 -0
  799. package/cli/app/.next-cli-build/static/chunks/app/api/version/route-576986aaa25d6ad2.js +1 -0
  800. package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-576986aaa25d6ad2.js +1 -0
  801. package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-576986aaa25d6ad2.js +1 -0
  802. package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-576986aaa25d6ad2.js +1 -0
  803. package/cli/app/.next-cli-build/static/chunks/app/page-576986aaa25d6ad2.js +1 -0
  804. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-576986aaa25d6ad2.js +1 -0
  805. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-576986aaa25d6ad2.js +1 -0
  806. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-576986aaa25d6ad2.js +1 -0
  807. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-576986aaa25d6ad2.js +1 -0
  808. package/cli/app/.next-cli-build/static/css/fc8542d62af4e68f.css +1 -0
  809. package/cli/app/package.json +1 -1
  810. package/cli/package.json +1 -1
  811. package/package.json +1 -1
  812. package/src/app/(dashboard)/dashboard/providers/[id]/page.js +40 -0
  813. package/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/index.js +78 -3
  814. package/src/app/api/providers/bulk-delete/route.js +60 -0
  815. package/src/app/api/usage/aggregate/route.js +105 -0
  816. package/src/shared/constants/providers.js +1 -1
  817. package/cli/app/.next-cli-build/server/chunks/5203.js +0 -16
  818. package/cli/app/.next-cli-build/static/0_H2408FyK5h1iiMUVln9/_buildManifest.js +0 -1
  819. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-a7413a4dee869d79.js +0 -1
  820. package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-b4304973b53c1718.js +0 -1
  821. package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-b4304973b53c1718.js +0 -1
  822. package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-b4304973b53c1718.js +0 -1
  823. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-b4304973b53c1718.js +0 -1
  824. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-b4304973b53c1718.js +0 -1
  825. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-b4304973b53c1718.js +0 -1
  826. package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-b4304973b53c1718.js +0 -1
  827. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-b4304973b53c1718.js +0 -1
  828. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-b4304973b53c1718.js +0 -1
  829. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-b4304973b53c1718.js +0 -1
  830. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-b4304973b53c1718.js +0 -1
  831. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-b4304973b53c1718.js +0 -1
  832. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-b4304973b53c1718.js +0 -1
  833. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-b4304973b53c1718.js +0 -1
  834. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-b4304973b53c1718.js +0 -1
  835. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-b4304973b53c1718.js +0 -1
  836. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-b4304973b53c1718.js +0 -1
  837. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-b4304973b53c1718.js +0 -1
  838. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-b4304973b53c1718.js +0 -1
  839. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-b4304973b53c1718.js +0 -1
  840. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-b4304973b53c1718.js +0 -1
  841. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-b4304973b53c1718.js +0 -1
  842. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-b4304973b53c1718.js +0 -1
  843. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-b4304973b53c1718.js +0 -1
  844. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-b4304973b53c1718.js +0 -1
  845. package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-b4304973b53c1718.js +0 -1
  846. package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-b4304973b53c1718.js +0 -1
  847. package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-b4304973b53c1718.js +0 -1
  848. package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-b4304973b53c1718.js +0 -1
  849. package/cli/app/.next-cli-build/static/chunks/app/api/context/route-b4304973b53c1718.js +0 -1
  850. package/cli/app/.next-cli-build/static/chunks/app/api/health/route-b4304973b53c1718.js +0 -1
  851. package/cli/app/.next-cli-build/static/chunks/app/api/init/route-b4304973b53c1718.js +0 -1
  852. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-b4304973b53c1718.js +0 -1
  853. package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-b4304973b53c1718.js +0 -1
  854. package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-b4304973b53c1718.js +0 -1
  855. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-b4304973b53c1718.js +0 -1
  856. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-b4304973b53c1718.js +0 -1
  857. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-b4304973b53c1718.js +0 -1
  858. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-b4304973b53c1718.js +0 -1
  859. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-b4304973b53c1718.js +0 -1
  860. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-b4304973b53c1718.js +0 -1
  861. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-b4304973b53c1718.js +0 -1
  862. package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-b4304973b53c1718.js +0 -1
  863. package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-b4304973b53c1718.js +0 -1
  864. package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-b4304973b53c1718.js +0 -1
  865. package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-b4304973b53c1718.js +0 -1
  866. package/cli/app/.next-cli-build/static/chunks/app/api/models/route-b4304973b53c1718.js +0 -1
  867. package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-b4304973b53c1718.js +0 -1
  868. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-b4304973b53c1718.js +0 -1
  869. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-b4304973b53c1718.js +0 -1
  870. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-b4304973b53c1718.js +0 -1
  871. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-b4304973b53c1718.js +0 -1
  872. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-b4304973b53c1718.js +0 -1
  873. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-b4304973b53c1718.js +0 -1
  874. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route-b4304973b53c1718.js +0 -1
  875. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route-b4304973b53c1718.js +0 -1
  876. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/route-b4304973b53c1718.js +0 -1
  877. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/latest/route-b4304973b53c1718.js +0 -1
  878. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/route-b4304973b53c1718.js +0 -1
  879. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-b4304973b53c1718.js +0 -1
  880. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-b4304973b53c1718.js +0 -1
  881. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-b4304973b53c1718.js +0 -1
  882. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-b4304973b53c1718.js +0 -1
  883. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-b4304973b53c1718.js +0 -1
  884. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-b4304973b53c1718.js +0 -1
  885. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-b4304973b53c1718.js +0 -1
  886. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-b4304973b53c1718.js +0 -1
  887. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-b4304973b53c1718.js +0 -1
  888. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-b4304973b53c1718.js +0 -1
  889. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-b4304973b53c1718.js +0 -1
  890. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-b4304973b53c1718.js +0 -1
  891. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-b4304973b53c1718.js +0 -1
  892. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-b4304973b53c1718.js +0 -1
  893. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-b4304973b53c1718.js +0 -1
  894. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-b4304973b53c1718.js +0 -1
  895. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-b4304973b53c1718.js +0 -1
  896. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-b4304973b53c1718.js +0 -1
  897. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-b4304973b53c1718.js +0 -1
  898. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-b4304973b53c1718.js +0 -1
  899. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-b4304973b53c1718.js +0 -1
  900. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-b4304973b53c1718.js +0 -1
  901. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-b4304973b53c1718.js +0 -1
  902. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-b4304973b53c1718.js +0 -1
  903. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-b4304973b53c1718.js +0 -1
  904. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-b4304973b53c1718.js +0 -1
  905. package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-b4304973b53c1718.js +0 -1
  906. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-b4304973b53c1718.js +0 -1
  907. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-b4304973b53c1718.js +0 -1
  908. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-b4304973b53c1718.js +0 -1
  909. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-b4304973b53c1718.js +0 -1
  910. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-b4304973b53c1718.js +0 -1
  911. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-b4304973b53c1718.js +0 -1
  912. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-b4304973b53c1718.js +0 -1
  913. package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-b4304973b53c1718.js +0 -1
  914. package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-b4304973b53c1718.js +0 -1
  915. package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-b4304973b53c1718.js +0 -1
  916. package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-b4304973b53c1718.js +0 -1
  917. package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-b4304973b53c1718.js +0 -1
  918. package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-b4304973b53c1718.js +0 -1
  919. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-b4304973b53c1718.js +0 -1
  920. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-b4304973b53c1718.js +0 -1
  921. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-b4304973b53c1718.js +0 -1
  922. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-b4304973b53c1718.js +0 -1
  923. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-b4304973b53c1718.js +0 -1
  924. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-b4304973b53c1718.js +0 -1
  925. package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-b4304973b53c1718.js +0 -1
  926. package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-b4304973b53c1718.js +0 -1
  927. package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-b4304973b53c1718.js +0 -1
  928. package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-b4304973b53c1718.js +0 -1
  929. package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-b4304973b53c1718.js +0 -1
  930. package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-b4304973b53c1718.js +0 -1
  931. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-b4304973b53c1718.js +0 -1
  932. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-b4304973b53c1718.js +0 -1
  933. package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-b4304973b53c1718.js +0 -1
  934. package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-b4304973b53c1718.js +0 -1
  935. package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-b4304973b53c1718.js +0 -1
  936. package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-b4304973b53c1718.js +0 -1
  937. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-b4304973b53c1718.js +0 -1
  938. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-b4304973b53c1718.js +0 -1
  939. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-b4304973b53c1718.js +0 -1
  940. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-b4304973b53c1718.js +0 -1
  941. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-b4304973b53c1718.js +0 -1
  942. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-b4304973b53c1718.js +0 -1
  943. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-b4304973b53c1718.js +0 -1
  944. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-b4304973b53c1718.js +0 -1
  945. package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-b4304973b53c1718.js +0 -1
  946. package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-b4304973b53c1718.js +0 -1
  947. package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-b4304973b53c1718.js +0 -1
  948. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-b4304973b53c1718.js +0 -1
  949. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-b4304973b53c1718.js +0 -1
  950. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-b4304973b53c1718.js +0 -1
  951. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-b4304973b53c1718.js +0 -1
  952. package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-b4304973b53c1718.js +0 -1
  953. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-b4304973b53c1718.js +0 -1
  954. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-b4304973b53c1718.js +0 -1
  955. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-b4304973b53c1718.js +0 -1
  956. package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-b4304973b53c1718.js +0 -1
  957. package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-b4304973b53c1718.js +0 -1
  958. package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-b4304973b53c1718.js +0 -1
  959. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-b4304973b53c1718.js +0 -1
  960. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-b4304973b53c1718.js +0 -1
  961. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-b4304973b53c1718.js +0 -1
  962. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-b4304973b53c1718.js +0 -1
  963. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-b4304973b53c1718.js +0 -1
  964. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-b4304973b53c1718.js +0 -1
  965. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-b4304973b53c1718.js +0 -1
  966. package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-b4304973b53c1718.js +0 -1
  967. package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-b4304973b53c1718.js +0 -1
  968. package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-b4304973b53c1718.js +0 -1
  969. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-b4304973b53c1718.js +0 -1
  970. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-b4304973b53c1718.js +0 -1
  971. package/cli/app/.next-cli-build/static/chunks/app/api/version/route-b4304973b53c1718.js +0 -1
  972. package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-b4304973b53c1718.js +0 -1
  973. package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-b4304973b53c1718.js +0 -1
  974. package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-b4304973b53c1718.js +0 -1
  975. package/cli/app/.next-cli-build/static/chunks/app/page-b4304973b53c1718.js +0 -1
  976. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-b4304973b53c1718.js +0 -1
  977. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-b4304973b53c1718.js +0 -1
  978. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-b4304973b53c1718.js +0 -1
  979. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-b4304973b53c1718.js +0 -1
  980. package/cli/app/.next-cli-build/static/css/6615840a16042b10.css +0 -1
  981. /package/cli/app/.next-cli-build/static/{0_H2408FyK5h1iiMUVln9 → Yz3coI6A8QuQdRmTp8d6v}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{37044:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>M});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(35497),c=s(52679),m=s(28777),u=s(11059),p=s(73006);let x=new Map;async function h(e){if(!e?.url||!e?.type)return[];let t=x.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return x.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}let f=[{id:"all",label:"All"},{id:"active",label:"Active",keys:["active"]},{id:"errors",label:"Errors",keys:["connection_error","auth_error","quota_exhausted","rate_limited","banned","cooldown","unknown"]},{id:"connection",label:"Connection",keys:["connection_error"]},{id:"auth",label:"Auth",keys:["auth_error"]},{id:"limit",label:"Limit",keys:["rate_limited","cooldown"]},{id:"exhausted",label:"Exhausted",keys:["quota_exhausted"]},{id:"banned",label:"Banned",keys:["banned"]},{id:"disabled",label:"Disabled",keys:["disabled"]}],b={active:{label:"active",severity:"success",terminal:!1},disabled:{label:"disabled",severity:"default",terminal:!1},connection_error:{label:"connection error",severity:"error",terminal:!1},auth_error:{label:"auth error",severity:"error",terminal:!0},quota_exhausted:{label:"exhausted",severity:"error",terminal:!0},rate_limited:{label:"rate limited",severity:"warning",terminal:!1},banned:{label:"banned",severity:"error",terminal:!0},cooldown:{label:"cooldown",severity:"warning",terminal:!1},unknown:{label:"unknown",severity:"default",terminal:!1}};function g(e){if(!e)return"";if("string"==typeof e)return e.toLowerCase();try{return JSON.stringify(e).toLowerCase()}catch{return String(e).toLowerCase()}}function y(e){if(!e)return!1;let t=new Date(e).getTime();return Number.isFinite(t)&&t>Date.now()}function v(e,t=""){let s=b[e]||b.unknown;return{key:e,...s,reason:t}}function j(e={}){if(!1===e.isActive)return v("disabled","Connection is disabled");if(function(e={}){return Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&y(t))}(e))return v("cooldown","Model cooldown is active");if(y(e.rateLimitedUntil))return v("rate_limited","Rate limit cooldown is active");let t=g(e.testStatus||e.status),s=g(e.lastErrorType||e.errorType),a=g(e.errorCode||e.statusCode),i=g(e.lastError||e.error),l=`${t} ${s} ${a} ${i}`.trim();return!l||["active","success","ok"].includes(t)?v("active",""):l.includes("ban")||l.includes("suspend")||l.includes("restricted")?v("banned",e.lastError||"Account appears restricted"):l.includes("exhaust")||l.includes("quota exceeded")||l.includes("insufficient_quota")||l.includes("payment required")||"402"===a?v("quota_exhausted",e.lastError||"Quota exhausted"):s.includes("rate_limited")||l.includes("rate limit")||l.includes("too many requests")||"429"===a?v("rate_limited",e.lastError||"Rate limited"):s.includes("auth")||s.includes("token")||l.includes("unauthorized")||l.includes("invalid api key")||l.includes("token invalid")||l.includes("token expired")||l.includes("revoked")||"401"===a||"403"===a?v("auth_error",e.lastError||"Authentication failed"):s.includes("network")||l.includes("network")||l.includes("timeout")||l.includes("fetch failed")||l.includes("econn")||l.includes("dns")||l.includes("proxy")?v("connection_error",e.lastError||"Connection failed"):["error","expired","unavailable","failed"].includes(t)?v("connection_error",e.lastError||e.testStatus||"Connection failed"):v("unknown",e.lastError||e.testStatus||"")}function k(e,t){if(!t||"all"===t)return!0;let s=f.find(e=>e.id===t);return!s||s.keys.includes(j(e).key)}var w=s(14051),N=s.n(w);function C({model:e,fullModel:t,alias:s,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:m,onDisable:u}){let p="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:p?{color:p}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),c&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:c,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,a.jsx)("button",{onClick:u,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function S({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function A({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:c,isAnthropic:m}){let[u,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(!1),[f,b]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null),[v,j]=(0,i.useState)({}),k=async t=>{if(!g){y(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();j(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{j(e=>({...e,[t]:"error"}))}finally{y(null)}}},w=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),N=a=>{let i,l=`${e}/${a}`;if(Object.values(s).includes(l))return null;let r=(i=a.split("/"))[i.length-1];if(!s[r])return r;let n=`${t}-${r}`;return s[n]?null:n},C=async()=>{if(!u.trim()||x)return;let t=u.trim(),s=N(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,s,e),p("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},$=async()=>{if(f)return;let t=c.find(e=>!1!==e.isActive);if(t){b(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),a=await s.json();if(!s.ok)return void alert(a.error||"Failed to import models");let i=a.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let s=t.id||t.name||t.model;if(!s)continue;let a=N(s);a&&(await n(s,a,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{b(!1)}}},I=c.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",m?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:u,onChange:e=>p(e.target.value),onKeyDown:e=>"Enter"===e.key&&C(),placeholder:m?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:C,disabled:!u.trim()||x,children:x?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:$,disabled:!I||f,children:f?"Importing...":"Import from /models"})]}),!I&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),w.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:w.map(({modelId:e,fullModel:s,alias:i})=>(0,a.jsx)(S,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(i),onTest:c.length>0?()=>k(e):void 0,testStatus:v[e],isTesting:g===e},s))})]})}function $({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function I({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:m,onEdit:u,onDelete:p,oneByOneStatus:x=null}){let[h,f]=(0,i.useState)(!1),[b,g]=(0,i.useState)(!1),y=(0,i.useRef)(null),v=new Map((t||[]).map(e=>[e.id,e])),k=e.providerSpecificData?.proxyPoolId||null,w=k?v.get(k):null,N=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!k||N,S=w?`Pool: ${w.name}`:k?`Pool: ${k} (inactive/missing)`:N?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A="";if(w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);A=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{A=t}}let T=w?.noProxy||e.providerSpecificData?.connectionNoProxy||"",P="default";w?.isActive===!0?P="success":(k||N)&&(P="error"),(0,i.useEffect)(()=>{if(!h)return;let e=e=>{y.current&&!y.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);let E=async e=>{g(!0);try{await m("__none__"===e?null:e)}finally{g(!1),f(!1)}},O=e.authType||(s?"oauth":"apikey"),_="oauth"===O,R="cookie"===O,D=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),z=_?D(e.email)?e.email:D(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[U,q]=(0,i.useState)(!1),M=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{q(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=M?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[M]);let K="unavailable"!==e.testStatus||U?e.testStatus:"active",L=j(e),F=()=>x?"queued"===x.state?"queued":"testing"===x.state?"testing":"success"===x.state?"success":"failed"===x.state?x.error?`failed: ${x.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:R?"cookie":_?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:z}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:(()=>{if(!1===e.isActive)return"default";let t=L?.severity==="success"?"success":L?.severity==="error"?"error":"default";return"active"!==L.key?t:"active"===K||"success"===K?"success":"error"===K||"expired"===K||"unavailable"===K?"error":"default"})(),size:"sm",dot:!0,children:L.label||K||"unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:_?"OAuth":R?"Cookie":"API Key"}),C&&(0,a.jsx)(d.Ex,{variant:P,size:"sm",children:"Proxy"}),e.autoDisabledAt&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["token_expired"===e.autoDisabledReason?"Token expired":"banned"===e.autoDisabledReason?"Banned":"quota_exhausted"===e.autoDisabledReason?"Quota exhausted":"Auto-disabled"," — ",new Date(e.autoDisabledAt).toLocaleDateString()]}),U&&!1!==e.isActive&&(0,a.jsx)($,{until:M}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),F()&&(0,a.jsx)(d.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:F()})]}),C&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),A&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:A}),T&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:T,children:["no_proxy: ",T]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:y,children:[(0,a.jsxs)("button",{onClick:()=>f(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:b,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:b?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),h&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>E("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!k?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>E(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${k===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:u,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}C.propTypes={model:N().shape({id:N().string.isRequired}).isRequired,fullModel:N().string.isRequired,alias:N().string,copied:N().string,onCopy:N().func.isRequired,testStatus:N().oneOf(["ok","error"]),isCustom:N().bool,isFree:N().bool,onDeleteAlias:N().func,onTest:N().func,isTesting:N().bool,onDisable:N().func},N().string.isRequired,N().string.isRequired,N().string,N().func.isRequired,N().func.isRequired,N().func,N().oneOf(["ok","error"]),N().bool,N().string.isRequired,N().object.isRequired,N().string,N().func.isRequired,N().func.isRequired,N().func.isRequired,A.propTypes={providerStorageAlias:N().string.isRequired,providerDisplayAlias:N().string.isRequired,modelAliases:N().object.isRequired,copied:N().string,onCopy:N().func.isRequired,onSetAlias:N().func.isRequired,onDeleteAlias:N().func.isRequired,connections:N().arrayOf(N().shape({id:N().string,isActive:N().bool})).isRequired,isAnthropic:N().bool},$.propTypes={until:N().string.isRequired},I.propTypes={connection:N().shape({id:N().string,name:N().string,email:N().string,displayName:N().string,modelLockUntil:N().string,testStatus:N().string,isActive:N().bool,lastError:N().string,priority:N().number,globalPriority:N().number}).isRequired,proxyPools:N().arrayOf(N().shape({id:N().string,name:N().string,proxyUrl:N().string,noProxy:N().string,isActive:N().bool})),isOAuth:N().bool.isRequired,isFirst:N().bool.isRequired,isLast:N().bool.isRequired,onMoveUp:N().func.isRequired,onMoveDown:N().func.isRequired,onToggleActive:N().func.isRequired,onUpdateProxy:N().func,onEdit:N().func.isRequired,onDelete:N().func.isRequired,oneByOneStatus:N().shape({state:N().string,error:N().string})};let T=`name1|sk-key1
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{37044:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>M});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(35497),c=s(52679),m=s(28777),u=s(11059),p=s(73006);let x=new Map;async function h(e){if(!e?.url||!e?.type)return[];let t=x.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return x.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}let f=[{id:"all",label:"All"},{id:"active",label:"Active",keys:["active"]},{id:"errors",label:"Errors",keys:["connection_error","auth_error","quota_exhausted","rate_limited","banned","cooldown","unknown"]},{id:"connection",label:"Connection",keys:["connection_error"]},{id:"auth",label:"Auth",keys:["auth_error"]},{id:"limit",label:"Limit",keys:["rate_limited","cooldown"]},{id:"exhausted",label:"Exhausted",keys:["quota_exhausted"]},{id:"banned",label:"Banned",keys:["banned"]},{id:"disabled",label:"Disabled",keys:["disabled"]}],b={active:{label:"active",severity:"success",terminal:!1},disabled:{label:"disabled",severity:"default",terminal:!1},connection_error:{label:"connection error",severity:"error",terminal:!1},auth_error:{label:"auth error",severity:"error",terminal:!0},quota_exhausted:{label:"exhausted",severity:"error",terminal:!0},rate_limited:{label:"rate limited",severity:"warning",terminal:!1},banned:{label:"banned",severity:"error",terminal:!0},cooldown:{label:"cooldown",severity:"warning",terminal:!1},unknown:{label:"unknown",severity:"default",terminal:!1}};function g(e){if(!e)return"";if("string"==typeof e)return e.toLowerCase();try{return JSON.stringify(e).toLowerCase()}catch{return String(e).toLowerCase()}}function y(e){if(!e)return!1;let t=new Date(e).getTime();return Number.isFinite(t)&&t>Date.now()}function v(e,t=""){let s=b[e]||b.unknown;return{key:e,...s,reason:t}}function j(e={}){if(!1===e.isActive)return v("disabled","Connection is disabled");if(function(e={}){return Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&y(t))}(e))return v("cooldown","Model cooldown is active");if(y(e.rateLimitedUntil))return v("rate_limited","Rate limit cooldown is active");let t=g(e.testStatus||e.status),s=g(e.lastErrorType||e.errorType),a=g(e.errorCode||e.statusCode),i=g(e.lastError||e.error),l=`${t} ${s} ${a} ${i}`.trim();return!l||["active","success","ok"].includes(t)?v("active",""):l.includes("ban")||l.includes("suspend")||l.includes("restricted")?v("banned",e.lastError||"Account appears restricted"):l.includes("exhaust")||l.includes("quota exceeded")||l.includes("insufficient_quota")||l.includes("payment required")||"402"===a?v("quota_exhausted",e.lastError||"Quota exhausted"):s.includes("rate_limited")||l.includes("rate limit")||l.includes("too many requests")||"429"===a?v("rate_limited",e.lastError||"Rate limited"):s.includes("auth")||s.includes("token")||l.includes("unauthorized")||l.includes("invalid api key")||l.includes("token invalid")||l.includes("token expired")||l.includes("revoked")||"401"===a||"403"===a?v("auth_error",e.lastError||"Authentication failed"):s.includes("network")||l.includes("network")||l.includes("timeout")||l.includes("fetch failed")||l.includes("econn")||l.includes("dns")||l.includes("proxy")?v("connection_error",e.lastError||"Connection failed"):["error","expired","unavailable","failed"].includes(t)?v("connection_error",e.lastError||e.testStatus||"Connection failed"):v("unknown",e.lastError||e.testStatus||"")}function k(e,t){if(!t||"all"===t)return!0;let s=f.find(e=>e.id===t);return!s||s.keys.includes(j(e).key)}var w=s(14051),N=s.n(w);function C({model:e,fullModel:t,alias:s,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:m,onDisable:u}){let p="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:p?{color:p}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),c&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:c,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,a.jsx)("button",{onClick:u,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function S({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function A({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:c,isAnthropic:m}){let[u,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(!1),[f,b]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null),[v,j]=(0,i.useState)({}),k=async t=>{if(!g){y(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();j(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{j(e=>({...e,[t]:"error"}))}finally{y(null)}}},w=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),N=a=>{let i,l=`${e}/${a}`;if(Object.values(s).includes(l))return null;let r=(i=a.split("/"))[i.length-1];if(!s[r])return r;let n=`${t}-${r}`;return s[n]?null:n},C=async()=>{if(!u.trim()||x)return;let t=u.trim(),s=N(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,s,e),p("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},$=async()=>{if(f)return;let t=c.find(e=>!1!==e.isActive);if(t){b(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),a=await s.json();if(!s.ok)return void alert(a.error||"Failed to import models");let i=a.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let s=t.id||t.name||t.model;if(!s)continue;let a=N(s);a&&(await n(s,a,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{b(!1)}}},T=c.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",m?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:u,onChange:e=>p(e.target.value),onKeyDown:e=>"Enter"===e.key&&C(),placeholder:m?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:C,disabled:!u.trim()||x,children:x?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:$,disabled:!T||f,children:f?"Importing...":"Import from /models"})]}),!T&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),w.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:w.map(({modelId:e,fullModel:s,alias:i})=>(0,a.jsx)(S,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(i),onTest:c.length>0?()=>k(e):void 0,testStatus:v[e],isTesting:g===e},s))})]})}function $({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function T({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:m,onEdit:u,onDelete:p,oneByOneStatus:x=null}){let[h,f]=(0,i.useState)(!1),[b,g]=(0,i.useState)(!1),y=(0,i.useRef)(null),v=new Map((t||[]).map(e=>[e.id,e])),k=e.providerSpecificData?.proxyPoolId||null,w=k?v.get(k):null,N=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!k||N,S=w?`Pool: ${w.name}`:k?`Pool: ${k} (inactive/missing)`:N?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A="";if(w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);A=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{A=t}}let I=w?.noProxy||e.providerSpecificData?.connectionNoProxy||"",P="default";w?.isActive===!0?P="success":(k||N)&&(P="error"),(0,i.useEffect)(()=>{if(!h)return;let e=e=>{y.current&&!y.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);let O=async e=>{g(!0);try{await m("__none__"===e?null:e)}finally{g(!1),f(!1)}},E=e.authType||(s?"oauth":"apikey"),_="oauth"===E,D="cookie"===E,R=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),z=_?R(e.email)?e.email:R(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[U,q]=(0,i.useState)(!1),M=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{q(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=M?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[M]);let L="unavailable"!==e.testStatus||U?e.testStatus:"active",K=j(e),F=()=>x?"queued"===x.state?"queued":"testing"===x.state?"testing":"success"===x.state?"success":"failed"===x.state?x.error?`failed: ${x.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:D?"cookie":_?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:z}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:(()=>{if(!1===e.isActive)return"default";let t=K?.severity==="success"?"success":K?.severity==="error"?"error":"default";return"active"!==K.key?t:"active"===L||"success"===L?"success":"error"===L||"expired"===L||"unavailable"===L?"error":"default"})(),size:"sm",dot:!0,children:K.label||L||"unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:_?"OAuth":D?"Cookie":"API Key"}),C&&(0,a.jsx)(d.Ex,{variant:P,size:"sm",children:"Proxy"}),e.autoDisabledAt&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["token_expired"===e.autoDisabledReason?"Token expired":"banned"===e.autoDisabledReason?"Banned":"quota_exhausted"===e.autoDisabledReason?"Quota exhausted":"Auto-disabled"," — ",new Date(e.autoDisabledAt).toLocaleDateString()]}),U&&!1!==e.isActive&&(0,a.jsx)($,{until:M}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),F()&&(0,a.jsx)(d.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:F()})]}),C&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),A&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:A}),I&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:I,children:["no_proxy: ",I]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:y,children:[(0,a.jsxs)("button",{onClick:()=>f(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:b,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:b?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),h&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>O("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!k?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>O(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${k===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:u,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}C.propTypes={model:N().shape({id:N().string.isRequired}).isRequired,fullModel:N().string.isRequired,alias:N().string,copied:N().string,onCopy:N().func.isRequired,testStatus:N().oneOf(["ok","error"]),isCustom:N().bool,isFree:N().bool,onDeleteAlias:N().func,onTest:N().func,isTesting:N().bool,onDisable:N().func},N().string.isRequired,N().string.isRequired,N().string,N().func.isRequired,N().func.isRequired,N().func,N().oneOf(["ok","error"]),N().bool,N().string.isRequired,N().object.isRequired,N().string,N().func.isRequired,N().func.isRequired,N().func.isRequired,A.propTypes={providerStorageAlias:N().string.isRequired,providerDisplayAlias:N().string.isRequired,modelAliases:N().object.isRequired,copied:N().string,onCopy:N().func.isRequired,onSetAlias:N().func.isRequired,onDeleteAlias:N().func.isRequired,connections:N().arrayOf(N().shape({id:N().string,isActive:N().bool})).isRequired,isAnthropic:N().bool},$.propTypes={until:N().string.isRequired},T.propTypes={connection:N().shape({id:N().string,name:N().string,email:N().string,displayName:N().string,modelLockUntil:N().string,testStatus:N().string,isActive:N().bool,lastError:N().string,priority:N().number,globalPriority:N().number}).isRequired,proxyPools:N().arrayOf(N().shape({id:N().string,name:N().string,proxyUrl:N().string,noProxy:N().string,isActive:N().bool})),isOAuth:N().bool.isRequired,isFirst:N().bool.isRequired,isLast:N().bool.isRequired,onMoveUp:N().func.isRequired,onMoveDown:N().func.isRequired,onToggleActive:N().func.isRequired,onUpdateProxy:N().func,onEdit:N().func.isRequired,onDelete:N().func.isRequired,oneByOneStatus:N().shape({state:N().string,error:N().string})};let I=`name1|sk-key1
2
2
  name2|sk-key2
3
- sk-key-only-auto-named`;function P({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:u,error:p,onSave:x,onBulkDone:h,onClose:f}){let b="__none__",g="ollama-local"===t,y="cookie"===n,v="xai"===t&&!y,j=y?"Cookie Value":"API Key",k="azure"===t,w="cloudflare-ai"===t,N=c.Q2?.[t]?.regions||null,C=c.Q2?.[t]?.defaultRegion||N?.[0]?.id||"",[S,A]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:b,ollamaHostUrl:""}),[$,I]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[E,O]=(0,i.useState)({accountId:""}),[_,R]=(0,i.useState)(C),[D,z]=(0,i.useState)(!1),[U,q]=(0,i.useState)(null),[M,K]=(0,i.useState)(!1),[L,F]=(0,i.useState)("single"),[J,B]=(0,i.useState)(""),[W,Q]=(0,i.useState)(null),H=()=>g&&S.ollamaHostUrl.trim()?{baseUrl:S.ollamaHostUrl.trim()}:k?{azureEndpoint:$.azureEndpoint,apiVersion:$.apiVersion,deployment:$.deployment,organization:$.organization}:w?{accountId:E.accountId}:N&&_?{region:_}:void 0,V=async()=>{z(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:H()})}),s=await e.json();q(s.valid?"success":"failed")}catch{q("failed")}finally{z(!1)}},G=async()=>{if(t&&(g||S.apiKey)&&(g||S.name)&&(!l||S.defaultModel.trim())){K(!0);try{let e=!1;try{z(!0),q(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:H()})});e=!!(await s.json()).valid,q(e?"success":"failed")}catch{q("failed")}finally{z(!1)}await x({name:S.name||(g?"Ollama Local":""),apiKey:S.apiKey,defaultModel:l?S.defaultModel.trim():void 0,priority:S.priority,proxyPoolId:S.proxyPoolId===b?null:S.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:H()})}finally{K(!1)}}},Z=async()=>{let e=J.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;K(!0),Q(null);let s=0,a=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}K(!1),Q({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===L?"primary":"ghost",onClick:()=>{F("single"),Q(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===L?"primary":"ghost",onClick:()=>{F("bulk"),Q(null)},children:"Bulk Add"})]}),"bulk"===L&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:T,value:J,onChange:e=>B(e.target.value)}),W&&(0,a.jsxs)("div",{className:`text-sm font-medium ${W.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",W.success," added",W.failed>0?`, ✗ ${W.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:M||!J.trim(),children:M?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===L&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:S.name,onChange:e=>A({...S,name:e.target.value}),placeholder:g?"Ollama Local":"Production Key"}),g&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:S.ollamaHostUrl,onChange:e=>A({...S,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:V,disabled:D||M,variant:"secondary",children:D?"Checking...":"Check"})})]}),!g&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:j,type:y?"text":"password",value:S.apiKey,onChange:e=>A({...S,apiKey:e.target.value}),placeholder:y?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:V,disabled:!S.apiKey||D||M,variant:"secondary",children:D?"Checking...":"Check"})})]}),v&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),y&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),N&&(0,a.jsx)(d.l6,{label:"Region",value:_,onChange:e=>R(e.target.value),options:N.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:S.defaultModel,onChange:e=>A({...S,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),g&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),U&&(0,a.jsx)(d.Ex,{variant:"success"===U?"success":"error",children:"success"===U?"Valid":"Invalid"}),p&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:p}),l&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),w&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:E.accountId,onChange:e=>O({...E,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:$.azureEndpoint,onChange:e=>I({...$,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:$.deployment,onChange:e=>I({...$,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:$.apiVersion,onChange:e=>I({...$,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:$.organization,onChange:e=>I({...$,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:S.priority,onChange:e=>A({...S,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:S.proxyPoolId,onChange:e=>A({...S,proxyPoolId:e.target.value}),options:[{value:b,label:"None"},...(u||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(u||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:G,fullWidth:!0,disabled:M||!g&&(!S.name||!S.apiKey)||l&&!S.defaultModel.trim()||k&&(!$.azureEndpoint||!$.deployment||!$.organization)||w&&!E.accountId,children:M?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function E({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(""),[f,b]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{m(!1)}}},j=async()=>{b(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:u,type:r?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();y(t.valid?"success":"failed")}catch{y("failed")}finally{b(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:u,onChange:e=>p(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!u||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),g&&(0,a.jsx)(d.Ex,{variant:"success"===g?"success":"error",children:"success"===g?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function O({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,m]=(0,i.useState)(null),[u,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),m(null),p(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},b=async()=>{let e=f(n.trim());if(e){m("testing"),p("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();m(a.ok?"ok":"error"),p(a.error||"")}catch(e){m("error"),p(e.message)}}},g=async()=>{let e=f(n.trim());if(e&&!x){h(!0);try{await l(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),m(null),p("")},onKeyDown:e=>{"Enter"===e.key&&b()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:b,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:u||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:g,fullWidth:!0,size:"sm",disabled:!n.trim()||x,children:x?"Adding...":"Add Model"})]})]})})}P.propTypes={isOpen:N().bool.isRequired,provider:N().string,providerName:N().string,isCompatible:N().bool,isAnthropic:N().bool,authType:N().string,authHint:N().string,website:N().string,proxyPools:N().arrayOf(N().shape({id:N().string,name:N().string})),error:N().string,onSave:N().func.isRequired,onBulkDone:N().func,onClose:N().func.isRequired},E.propTypes={isOpen:N().bool.isRequired,node:N().shape({id:N().string,name:N().string,prefix:N().string,apiType:N().string,baseUrl:N().string}),onSave:N().func.isRequired,onClose:N().func.isRequired,isAnthropic:N().bool},O.propTypes={isOpen:N().bool.isRequired,providerAlias:N().string.isRequired,providerDisplayAlias:N().string.isRequired,onSave:N().func.isRequired,onClose:N().func.isRequired};let _="kiro-bulk-import-active-job",R="Bulk import progress expired or was cleared.";function D(e){return["completed","cancelled","failed"].includes(e)}async function z(e){if(!e)return null;let t=await fetch(`/api/oauth/kiro/bulk-import/${e}`,{cache:"no-store"}),s=await t.json();return{res:t,data:s}}async function U(e="active"){let t=await fetch(`/api/oauth/kiro/bulk-import/latest?scope=${encodeURIComponent(e)}`,{cache:"no-store"}),s=await t.json();return{res:t,data:s}}async function q(e){let t=new AbortController,s=window.setTimeout(()=>t.abort(),8e3);try{let s=await fetch(e,{cache:"no-store",signal:t.signal}),a=null;try{a=await s.json()}catch{a=null}return{response:s,data:a}}finally{window.clearTimeout(s)}}function M(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[x,b]=(0,i.useState)([]),[g,y]=(0,i.useState)(!0),[v,j]=(0,i.useState)(null),[w,N]=(0,i.useState)([]),[S,$]=(0,i.useState)(!1),[T,M]=(0,i.useState)(!1),[K,L]=(0,i.useState)(!1),[F,J]=(0,i.useState)(!1),[B,W]=(0,i.useState)(""),[Q,H]=(0,i.useState)(!1),[V,G]=(0,i.useState)(!1),[Z,X]=(0,i.useState)(!1),[Y,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)({}),[ea,ei]=(0,i.useState)(!1),[el,er]=(0,i.useState)({}),[en,eo]=(0,i.useState)(""),[ed,ec]=(0,i.useState)(null),[em,eu]=(0,i.useState)(!1),[ep,ex]=(0,i.useState)([]),[eh,ef]=(0,i.useState)("__none__"),[eb,eg]=(0,i.useState)(!1),[ey,ev]=(0,i.useState)(null),[ej,ek]=(0,i.useState)(""),[ew,eN]=(0,i.useState)("auto"),[eC,eS]=(0,i.useState)([]),[eA,e$]=(0,i.useState)([]),[eI,eT]=(0,i.useState)([]),[eP,eE]=(0,i.useState)(null),[eO,e_]=(0,i.useState)(!1),[eR,eD]=(0,i.useState)(!1),[ez,eU]=(0,i.useState)(!1),[eq,eM]=(0,i.useState)(null),[eK,eL]=(0,i.useState)({}),[eF,eJ]=(0,i.useState)(null),eB=(0,i.useRef)(!1),[eW,eQ]=(0,i.useState)(!1),[eH,eV]=(0,i.useState)(null),[eG,eZ]=(0,i.useState)(""),[eX,eY]=(0,i.useState)(1),[e0,e1]=(0,i.useState)(20),[e2,e5]=(0,i.useState)("all"),[e4,e3]=(0,i.useState)(1),[e6,e7]=(0,i.useState)(20),{copied:e8,copy:e9}=(0,u.C)(),te=(0,i.useRef)(0),tt="ag_risk_confirmed",ts=(0,i.useCallback)(()=>{eV(null),eZ(""),te.current=0,window.localStorage.removeItem(_)},[]),ta=()=>{$(!0)},ti=()=>{"kiro"===r||"codebuddy"===r?s.push(`/dashboard/automation?provider=${r}`):("kiro"===r&&eH?.jobId&&D(eH.status)&&ts(),"antigravity"===r&&"true"!==window.localStorage.getItem(tt))?e_(!0):td?ta():(W(""),J(!0))},tl=()=>{W(""),J(!0)},tr=()=>{td?ti():tl()},tn=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],to=tn?.authModes||[],td=!!c.zN[r]||!!c.IS[r]||to.includes("oauth"),tc=!!c.fg[r]||to.includes("apikey"),tm=!!c.IS[r]?.noAuth,tu=(0,m.KC)(r),tp=(0,c.wG)(r),tx=(0,c.mq)(r),th=(0,c.gb)(r),tf=tx||th,tb=!tf&&td&&tc,tg="kiro"===r||"codebuddy"===r,ty="xai"===r?"Grok Build OAuth":"OAuth",tv="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let tj=tf?r:tp,tk=tf?v?.prefix||r:tp,tw=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tj)}`,{cache:"no-store"}),t=await e.json();e.ok&&eT(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tj]),tN=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tj,ids:[e]})})).ok&&await tw()}catch(e){console.log("Error disabling model:",e)}},tC=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tj)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tw()}catch(e){console.log("Error enabling model:",e)}},tS=async e=>{e.length&&eE({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eE(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tj,ids:e})})).ok&&await tw()}catch(e){console.log("Error disabling all models:",e)}}})},tA=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tj)}`,{method:"DELETE"})).ok&&await tw()}catch(e){console.log("Error enabling all models:",e)}},t$=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&es(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&e$(e.models)}).catch(()=>{})},[r]);let tI=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.allSettled([q("/api/providers"),q("/api/provider-nodes"),q("/api/proxy-pools?isActive=true"),q("/api/settings")]),i="fulfilled"===e.status?e.value.response:null,l="fulfilled"===e.status?e.value.data:{},n="fulfilled"===t.status?t.value.response:null,o="fulfilled"===t.status?t.value.data:{},d="fulfilled"===s.status?s.value.response:null,c="fulfilled"===s.status?s.value.data:{},m="fulfilled"===a.status?a.value.response:null,u=m?.ok&&a.value.data||{};if(i?.ok){let e=(l.connections||[]).filter(e=>e.provider===r);b(e)}d?.ok&&N(c.proxyPools||[]);let p=(u.providerStrategies||{})[r]||{};ev(p.fallbackStrategy||null),ek(null!=p.stickyRoundRobinLimit?String(p.stickyRoundRobinLimit):"1");let x=(u.providerThinking||{})[r]||{};if(eN(x.mode||"auto"),n?.ok){let e=(o.nodes||[]).find(e=>e.id===r)||null;if(!e&&tf)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let{response:t,data:s}=await q("/api/provider-nodes");if(t.ok&&(e=(s.nodes||[]).find(e=>e.id===r)||null))break}j(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[r,tf]),tT=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(j(s.node),await tI(),G(!1))}catch(e){console.log("Error updating provider node:",e)}},tP=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[r]:l[r]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,i.useEffect)(()=>{tI(),t$(),tw()},[tI,t$,tw]),(0,i.useEffect)(()=>{eY(1),e3(1),e5("all")},[r]),(0,i.useEffect)(()=>{eY(1)},[e2,e0]),(0,i.useEffect)(()=>{e3(1)},[e6,eI.length,tu.length,eA.length]),(0,i.useEffect)(()=>{if("kiro"!==r)return;let e=window.localStorage.getItem(_),t=!1;return(async()=>{try{if(eZ(""),eH?.jobId)return;let a=await U();if(!t&&a.res.ok&&a.data?.job){eV(a.data.job),te.current=a.data.job.summary?.success||0,window.localStorage.setItem(_,a.data.job.jobId);return}if(e){var s;let a=await z(e);if(!t&&a?.res.ok&&a.data?.job&&(s=a.data.job.status,["queued","running","needs_manual"].includes(s))){eV(a.data.job),te.current=a.data.job.summary?.success||0;return}ts(),eZ(R)}}catch{t||eZ(R)}})(),()=>{t=!0}},[ts,eH?.jobId,r]),(0,i.useEffect)(()=>{if("kiro"!==r||!eH?.jobId||D(eH.status))return;let e=window.setInterval(async()=>{try{let e=await z(eH.jobId);if(e?.res.ok&&e.data?.job){let t=e.data.job.summary?.success||0;t>te.current&&(te.current=t,await tI()),eZ(""),eV(e.data.job);return}if(e?.res.status===404){let e=await U();if(e.res.ok&&e.data?.job){let t=e.data.job.summary?.success||0;t>te.current&&(te.current=t,await tI()),eZ(""),eV(e.data.job),window.localStorage.setItem(_,e.data.job.jobId);return}ts(),eZ(R)}}catch{}},2e3);return()=>window.clearInterval(e)},[ts,tI,eH?.jobId,eH?.status,r]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&h(e).then(eS)},[r]);let tE=async(e,t,s=tp)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await t$();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tO=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await t$()}catch(e){console.log("Error deleting alias:",e)}},t_=async()=>{if(eW)return;let e=x.find(e=>!1!==e.isActive);if(!e)return void alert((0,p.Tl)("Please add an active Qoder connection first"));eQ(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,p.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,p.Tl)("No models returned"));let i=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,""),a=`${tj}/${s}`;!Object.values(et).includes(a)&&(et[s]||(await tE(s,s,tj),i+=1))}0===i?alert((0,p.Tl)("All models already exist, no new models added")):alert((0,p.Tl)("Successfully added")+` ${i} `+(0,p.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,p.Tl)("Error fetching models")+": "+e.message)}finally{eQ(!1)}},tR=async()=>{if(eR||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eB.current=!1,eD(!0),eU(!1),eM(null),eL(e),eJ({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<x.length;e+=1){if(eB.current){eJ({total:x.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=x[e];eM(a.id),eL(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eL(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eL(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eJ({total:x.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eM(null),eD(!1),eU(!1),eB.current=!1}},tD=async e=>{eE({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eE(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&b(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tz=()=>{tI(),$(!1)},tU=(0,i.useCallback)(e=>{(eV(e),eZ(""),e?.jobId)?(window.localStorage.setItem(_,e.jobId),te.current=Math.max(te.current,e.summary?.success||0)):ts()},[ts]),tq=async e=>{W("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tI(),J(!1);return}W(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),W("Failed to save connection")}},tM=async e=>{try{(await fetch(`/api/providers/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tI(),H(!1))}catch(e){console.log("Error updating connection:",e)}},tK=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&b(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tL=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],b(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tI()}},tF=x.filter(e=>k(e,e2)),tJ=f.reduce((e,t)=>(e[t.id]="all"===t.id?x.length:x.filter(e=>k(e,t.id)).length,e),{}),tB=ep.filter(e=>x.some(t=>t.id===e)),tW=x.filter(e=>tB.includes(e.id)),tQ="codebuddy"===r?(tW.length>0?tW:x).map(e=>e.id):[],tH=tF.length>0&&tF.every(e=>tB.includes(e.id)),tV=(()=>{if(0===tW.length)return"";let e=new Set(tW.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let s=w.find(e=>e.id===t);return`All selected currently bound to ${s?.name||t}`}return"Selected connections have mixed proxy bindings"})(),tG=()=>{eb||X(!1)},tZ=async e=>{eg(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tI(),X(!1)}finally{eg(!1)}},tX=e=>tZ(tW.map(t=>({connectionId:t.id,proxyPoolId:e}))),tY=Math.max(1,Math.ceil(tF.length/e0)),t0=Math.min(eX,tY),t1=tF.slice((t0-1)*e0,t0*e0),t2=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:t1.map((e,t)=>{let s,i=x.findIndex(t=>t.id===e.id);return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("label",{className:"flex w-8 shrink-0 items-center justify-center",children:(0,a.jsx)("input",{type:"checkbox",checked:(s=e.id,tB.includes(s)),onChange:()=>{var t;return t=e.id,void ex(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"size-4 rounded border-black/20 dark:border-white/20","aria-label":`Select ${e.name||e.email||e.id}`})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(I,{connection:e,proxyPools:w,isOAuth:td,isFirst:0===i,isLast:i===x.length-1,onMoveUp:()=>tL(i,i-1),onMoveDown:()=>tL(i,i+1),onToggleActive:t=>tK(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&b(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ee(e),H(!0)},onDelete:()=>tD(e.id),oneByOneStatus:eK[e.id]||null})})]},e.id)})}),t5=w.filter(e=>!0===e.isActive),t4=(0,a.jsx)(d.aF,{isOpen:Z,onClose:tG,title:`Apply Proxy (${tW.length} selected)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=w.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tZ(tW.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eb||0===t5.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tX(null),disabled:eb,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),w.map(e=>(0,a.jsxs)("button",{onClick:()=>tX(e.id),disabled:eb||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eb&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tG,variant:"ghost",fullWidth:!0,disabled:eb,children:"Cancel"})]})}),t3=async e=>{if(!ed){ec(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tj}/${e}`})}),s=await t.json();er(t=>({...t,[e]:s.ok?"ok":"error"})),eo(s.ok?"":s.error||"Model not reachable")}catch{er(t=>({...t,[e]:"error"})),eo("Network error")}finally{ec(null)}}};return g?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):tn?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${tn.color}15`},children:ea?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:tn.color},children:tn.textIcon||tn.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:tx&&tn.apiType?"responses"===tn.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":th?"/providers/anthropic-m.png":`/providers/${tn.id}.png`,alt:tn.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>ei(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:tn.name}),(tn.notice?.apiKeyUrl||tn.notice?.signupUrl||tn.website)&&(0,a.jsxs)("a",{href:tn.notice?.apiKeyUrl||tn.notice?.signupUrl||tn.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),tn.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),tn.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:tn.deprecationNotice})]}),tn.notice?.text&&!tn.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:tn.notice.text}),tn.notice.apiKeyUrl&&(0,a.jsx)("a",{href:tn.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),tf&&v&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:th?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[th?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",th?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{W(""),J(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>G(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eE({title:"Delete Compatible Node",message:`Delete this ${th?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eE(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tm?(0,a.jsx)(d.gw,{providerId:r}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[x.length>0&&w.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>{if(0===tW.length)return;let e=[...new Set(tW.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"))];ef(1===e.length?e[0]:"__none__"),X(!0)},disabled:0===tW.length,children:"Apply Proxy"}),x.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tR,disabled:eR,children:eR?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eR&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eR&&(eB.current=!0,eU(!0))},disabled:ez,children:ez?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===ey,onChange:e=>{let t=e?"round-robin":null,s=e?ej||"1":ej;e&&!ej&&ek("1"),ev(t),tP(t,s)}}),"round-robin"===ey&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:ej,onChange:e=>{var t;ek(t=e.target.value),tP("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),x.length>0&&(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 rounded-lg border border-black/5 bg-black/[0.02] p-3 dark:border-white/5 dark:bg-white/[0.02]",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:tH,onChange:()=>{tH?ex(e=>e.filter(e=>!tF.some(t=>t.id===e))):ex(e=>Array.from(new Set([...e,...tF.map(e=>e.id)])))},className:"size-4 rounded border-black/20 dark:border-white/20"}),tH?"Unselect visible":"Select visible"]}),(0,a.jsxs)(d.Ex,{variant:"default",children:[tF.length," visible"]}),tW.length>0&&(0,a.jsxs)(d.Ex,{variant:"default",children:[tW.length," selected"]}),tV&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:tV}),tW.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:()=>{ex([]),ef("__none__")},children:"Clear"}),tW.length>0&&(0,a.jsxs)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:()=>{0!==tW.length&&eE({title:"Delete Selected Connections",message:`Delete ${tW.length} selected connection(s)? This permanently removes the selected accounts.`,onConfirm:async()=>{for(let e of(eE(null),tW))try{await fetch(`/api/providers/${e.id}`,{method:"DELETE"})}catch(e){console.log("Error deleting selected connection:",e)}ex(e=>e.filter(e=>!tW.some(t=>t.id===e))),await tI()}})},children:["Delete Selected (",tW.length,")"]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:f.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>e5(e.id),className:`rounded-full border px-2.5 py-1 text-xs transition-colors ${e2===e.id?"border-primary/50 bg-primary/10 text-primary":"border-border text-text-muted hover:border-primary/30 hover:text-text-main"}`,children:[e.label,(0,a.jsx)("span",{className:"ml-1 text-[10px] opacity-70",children:tJ[e.id]||0})]},e.id))})]}),0===x.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:td?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tb&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",ty," or ",tv,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:tb?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ti,children:ty}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tl,children:tv})]}):(0,a.jsxs)(a.Fragment,{children:[!tf&&"iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>M(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:tg?"automation":"add",onClick:tr,children:tg?"Open Automation":tf?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}),"kiro"===r&&eH?.jobId&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 rounded-lg border border-primary/20 bg-primary/[0.06] px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-text-main",children:"Bulk import progress is still available"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Status: ",eH.status," | Success: ",eH.summary?.success||0," | Running: ",eH.summary?.running||0," | Queued: ",eH.summary?.queued||0]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"monitoring",variant:"secondary",onClick:()=>s.push("/dashboard/automation?provider=kiro"),children:"Resume Bulk Progress"}),D(eH.status)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"close",onClick:ts,children:"Clear"})]})]}),"kiro"===r&&!eH?.jobId&&eG&&(0,a.jsx)("div",{className:"mt-4 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:eG})]}):(0,a.jsxs)(a.Fragment,{children:[eF&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eF.total]}),(0,a.jsxs)("span",{children:["Completed: ",eF.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eF.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eF.failed]}),eF.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eR&&eq&&(0,a.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eq)?.name||eq]})]})}),"kiro"===r&&eH?.jobId&&(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 rounded-lg border border-primary/20 bg-primary/[0.06] px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-text-main",children:"Bulk import progress is still available"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Status: ",eH.status," | Success: ",eH.summary?.success||0," | Running: ",eH.summary?.running||0," | Queued: ",eH.summary?.queued||0]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"monitoring",variant:"secondary",onClick:()=>s.push("/dashboard/automation?provider=kiro"),children:"Resume Bulk Progress"}),D(eH.status)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"close",onClick:ts,children:"Clear"})]})]}),"kiro"===r&&!eH?.jobId&&eG&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:eG}),t2,"kiro"===r&&tY>1&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Page ",t0," of ",tY," • Showing ",(t0-1)*e0+1,"-",Math.min(t0*e0,tF.length)," of ",tF.length," connections"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",disabled:t0<=1,onClick:()=>eY(e=>Math.max(1,e-1)),children:"Previous"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",disabled:t0>=tY,onClick:()=>eY(e=>Math.min(tY,e+1)),children:"Next"})]})]}),"kiro"!==r&&tF.length>0&&(0,a.jsx)(d.dK,{currentPage:t0,pageSize:e0,totalItems:tF.length,onPageChange:eY,onPageSizeChange:e=>{e1(e),eY(1)},className:"mt-2"}),x.length>0&&0===tF.length&&(0,a.jsx)("div",{className:"py-8 text-center text-sm text-text-muted",children:"No connections match this status filter."}),!tf&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>M(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codebuddy"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>{x.length>1&&0===tW.length?alert("Select the CodeBuddy connection(s) that should use this quota cookie first."):L(!0)},title:"Attach CodeBuddy web cookie for quota tracking",className:"w-full sm:w-auto",children:"Quota Cookie"}),tb?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ti,className:"w-full sm:w-auto",children:ty}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tl,className:"w-full sm:w-auto",children:tv})]}):(0,a.jsx)(d.$n,{size:"sm",icon:tg?"automation":"add",onClick:tr,className:"w-full sm:w-auto",children:tg?"Open Automation":"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!tf&&(e=[...tu,...eA.filter(e=>!tu.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eI.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eI.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tA,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tS(e),children:"Disable All"})]}))]}),!!en&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:en}),(()=>{let e,t,s;if(tf)return(0,a.jsx)(A,{providerStorageAlias:tj,providerDisplayAlias:tk,modelAliases:et,copied:e8,onCopy:e9,onSetAlias:tE,onDeleteAlias:tO,connections:x,isAnthropic:th});let i=[...tu,...eA.filter(e=>!tu.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eI),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),c=Object.entries(et).filter(([e,t])=>{let s=`${tj}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return tn.passthroughModels?!tu.some(e=>e.id===a):!tu.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${tj}/`.length),alias:e,fullModel:t})),m=Math.min(e4,Math.max(1,Math.ceil(n.length/e6))),u=n.slice((m-1)*e6,m*e6);return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[c.map(e=>(0,a.jsx)(C,{model:{id:e.id},fullModel:`${tk}/${e.id}`,alias:e.alias,copied:e8,onCopy:e9,onSetAlias:()=>{},onDeleteAlias:()=>tO(e.alias),testStatus:el[e.id],onTest:x.length>0||tm?()=>t3(e.id):void 0,isTesting:ed===e.id,isCustom:!0,isFree:!1},e.id)),u.map(e=>{let t=`${tj}/${e.id}`,s=`${r}/${e.id}`,i=Object.entries(et).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(C,{model:e,fullModel:`${tk}/${e.id}`,alias:i,copied:e8,onCopy:e9,onSetAlias:t=>tE(e.id,t,tj),onDeleteAlias:()=>tO(i),testStatus:el[e.id],onTest:x.length>0||tm?()=>t3(e.id):void 0,isTesting:ed===e.id,isFree:e.isFree,onDisable:()=>tN(e.id)},e.id)}),n.length>e6&&(0,a.jsx)("div",{className:"w-full",children:(0,a.jsx)(d.dK,{currentPage:m,pageSize:e6,totalItems:n.length,onPageChange:e3,onPageSizeChange:e=>{e7(e),e3(1)}})}),(0,a.jsxs)("button",{onClick:()=>eu(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===r&&x.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:t_,disabled:eW,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:eW?{animation:"spin 1s linear infinite"}:void 0,children:eW?"progress_activity":"download"}),eW?(0,p.Tl)("Fetching..."):(0,p.Tl)("Fetch Qoder Models")]}),eC.length>0&&(e=new Set(Object.values(et)),t=new Set(tu.map(e=>e.id)),0===(s=eC.filter(s=>!e.has(`${tj}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tE(e.id,t,tj)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>tC(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),t4,"kiro"===r?(0,a.jsx)(d.Mh,{isOpen:S,providerInfo:tn,onSuccess:tz,onRefresh:tI,initialBulkJobId:eH?.jobId||null,onBulkJobChange:tU,onClose:()=>$(!1)}):"cursor"===r?(0,a.jsx)(d.G9,{isOpen:S,onSuccess:tz,onClose:()=>$(!1)}):"gitlab"===r?(0,a.jsx)(d.vj,{isOpen:S,providerInfo:tn,onSuccess:tz,onClose:()=>$(!1)}):(0,a.jsx)(d.LF,{isOpen:S,provider:r,providerInfo:tn,onSuccess:tz,onClose:()=>$(!1)}),"iflow"===r&&(0,a.jsx)(d.vE,{isOpen:T,onSuccess:()=>{tI(),M(!1)},onClose:()=>M(!1)}),"codebuddy"===r&&(0,a.jsx)(d.xl,{isOpen:K,connectionIds:tQ,onSuccess:()=>{tI(),L(!1)},onClose:()=>L(!1)}),(0,a.jsx)(P,{isOpen:F,provider:r,providerName:tn.name,isCompatible:tf,isAnthropic:th,authType:tn?.authType,authHint:tn?.authHint,website:tn?.website,proxyPools:w,error:B,onSave:tq,onBulkDone:tI,onClose:()=>{W(""),J(!1)}}),(0,a.jsx)(d.wI,{isOpen:Q,connection:Y,proxyPools:w,onSave:tM,onClose:()=>H(!1)}),tf&&(0,a.jsx)(E,{isOpen:V,node:v,onSave:tT,onClose:()=>G(!1),isAnthropic:th}),!tf&&(0,a.jsx)(O,{isOpen:em,providerAlias:tj,providerDisplayAlias:tk,onSave:async e=>{let t=tn?.passthroughModels?e.split("/").pop():e;await tE(e,t,tj),eu(!1)},onClose:()=>eu(!1)}),(0,a.jsx)(d.uo,{isOpen:eO,onClose:()=>e_(!1),onConfirm:()=>{(window.localStorage.setItem(tt,"true"),e_(!1),td)?ta():tl()},title:"Risk Notice",message:tn?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!eP,onClose:()=>eE(null),onConfirm:eP?.onConfirm,title:eP?.title||"Confirm",message:eP?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},42911:(e,t,s)=>{Promise.resolve().then(s.bind(s,37044))}},e=>{e.O(0,[2574,3862,4343,1321,5497,8441,3794,7358],()=>e(e.s=42911)),_N_E=e.O()}]);
3
+ sk-key-only-auto-named`;function P({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:u,error:p,onSave:x,onBulkDone:h,onClose:f}){let b="__none__",g="ollama-local"===t,y="cookie"===n,v="xai"===t&&!y,j=y?"Cookie Value":"API Key",k="azure"===t,w="cloudflare-ai"===t,N=c.Q2?.[t]?.regions||null,C=c.Q2?.[t]?.defaultRegion||N?.[0]?.id||"",[S,A]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:b,ollamaHostUrl:""}),[$,T]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[O,E]=(0,i.useState)({accountId:""}),[_,D]=(0,i.useState)(C),[R,z]=(0,i.useState)(!1),[U,q]=(0,i.useState)(null),[M,L]=(0,i.useState)(!1),[K,F]=(0,i.useState)("single"),[J,B]=(0,i.useState)(""),[W,G]=(0,i.useState)(null),Q=()=>g&&S.ollamaHostUrl.trim()?{baseUrl:S.ollamaHostUrl.trim()}:k?{azureEndpoint:$.azureEndpoint,apiVersion:$.apiVersion,deployment:$.deployment,organization:$.organization}:w?{accountId:O.accountId}:N&&_?{region:_}:void 0,H=async()=>{z(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:Q()})}),s=await e.json();q(s.valid?"success":"failed")}catch{q("failed")}finally{z(!1)}},V=async()=>{if(t&&(g||S.apiKey)&&(g||S.name)&&(!l||S.defaultModel.trim())){L(!0);try{let e=!1;try{z(!0),q(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:Q()})});e=!!(await s.json()).valid,q(e?"success":"failed")}catch{q("failed")}finally{z(!1)}await x({name:S.name||(g?"Ollama Local":""),apiKey:S.apiKey,defaultModel:l?S.defaultModel.trim():void 0,priority:S.priority,proxyPoolId:S.proxyPoolId===b?null:S.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:Q()})}finally{L(!1)}}},Z=async()=>{let e=J.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;L(!0),G(null);let s=0,a=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}L(!1),G({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===K?"primary":"ghost",onClick:()=>{F("single"),G(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===K?"primary":"ghost",onClick:()=>{F("bulk"),G(null)},children:"Bulk Add"})]}),"bulk"===K&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:I,value:J,onChange:e=>B(e.target.value)}),W&&(0,a.jsxs)("div",{className:`text-sm font-medium ${W.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",W.success," added",W.failed>0?`, ✗ ${W.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:M||!J.trim(),children:M?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===K&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:S.name,onChange:e=>A({...S,name:e.target.value}),placeholder:g?"Ollama Local":"Production Key"}),g&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:S.ollamaHostUrl,onChange:e=>A({...S,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:H,disabled:R||M,variant:"secondary",children:R?"Checking...":"Check"})})]}),!g&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:j,type:y?"text":"password",value:S.apiKey,onChange:e=>A({...S,apiKey:e.target.value}),placeholder:y?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:H,disabled:!S.apiKey||R||M,variant:"secondary",children:R?"Checking...":"Check"})})]}),v&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),y&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),N&&(0,a.jsx)(d.l6,{label:"Region",value:_,onChange:e=>D(e.target.value),options:N.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:S.defaultModel,onChange:e=>A({...S,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),g&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),U&&(0,a.jsx)(d.Ex,{variant:"success"===U?"success":"error",children:"success"===U?"Valid":"Invalid"}),p&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:p}),l&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),w&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:O.accountId,onChange:e=>E({...O,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:$.azureEndpoint,onChange:e=>T({...$,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:$.deployment,onChange:e=>T({...$,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:$.apiVersion,onChange:e=>T({...$,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:$.organization,onChange:e=>T({...$,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:S.priority,onChange:e=>A({...S,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:S.proxyPoolId,onChange:e=>A({...S,proxyPoolId:e.target.value}),options:[{value:b,label:"None"},...(u||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(u||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:V,fullWidth:!0,disabled:M||!g&&(!S.name||!S.apiKey)||l&&!S.defaultModel.trim()||k&&(!$.azureEndpoint||!$.deployment||!$.organization)||w&&!O.accountId,children:M?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function O({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(""),[f,b]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{m(!1)}}},j=async()=>{b(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:u,type:r?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();y(t.valid?"success":"failed")}catch{y("failed")}finally{b(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:u,onChange:e=>p(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!u||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),g&&(0,a.jsx)(d.Ex,{variant:"success"===g?"success":"error",children:"success"===g?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function E({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,m]=(0,i.useState)(null),[u,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),m(null),p(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},b=async()=>{let e=f(n.trim());if(e){m("testing"),p("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();m(a.ok?"ok":"error"),p(a.error||"")}catch(e){m("error"),p(e.message)}}},g=async()=>{let e=f(n.trim());if(e&&!x){h(!0);try{await l(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),m(null),p("")},onKeyDown:e=>{"Enter"===e.key&&b()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:b,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:u||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:g,fullWidth:!0,size:"sm",disabled:!n.trim()||x,children:x?"Adding...":"Add Model"})]})]})})}P.propTypes={isOpen:N().bool.isRequired,provider:N().string,providerName:N().string,isCompatible:N().bool,isAnthropic:N().bool,authType:N().string,authHint:N().string,website:N().string,proxyPools:N().arrayOf(N().shape({id:N().string,name:N().string})),error:N().string,onSave:N().func.isRequired,onBulkDone:N().func,onClose:N().func.isRequired},O.propTypes={isOpen:N().bool.isRequired,node:N().shape({id:N().string,name:N().string,prefix:N().string,apiType:N().string,baseUrl:N().string}),onSave:N().func.isRequired,onClose:N().func.isRequired,isAnthropic:N().bool},E.propTypes={isOpen:N().bool.isRequired,providerAlias:N().string.isRequired,providerDisplayAlias:N().string.isRequired,onSave:N().func.isRequired,onClose:N().func.isRequired};let _="kiro-bulk-import-active-job",D="Bulk import progress expired or was cleared.";function R(e){return["completed","cancelled","failed"].includes(e)}async function z(e){if(!e)return null;let t=await fetch(`/api/oauth/kiro/bulk-import/${e}`,{cache:"no-store"}),s=await t.json();return{res:t,data:s}}async function U(e="active"){let t=await fetch(`/api/oauth/kiro/bulk-import/latest?scope=${encodeURIComponent(e)}`,{cache:"no-store"}),s=await t.json();return{res:t,data:s}}async function q(e){let t=new AbortController,s=window.setTimeout(()=>t.abort(),8e3);try{let s=await fetch(e,{cache:"no-store",signal:t.signal}),a=null;try{a=await s.json()}catch{a=null}return{response:s,data:a}}finally{window.clearTimeout(s)}}function M(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[x,b]=(0,i.useState)([]),[g,y]=(0,i.useState)(!0),[v,j]=(0,i.useState)(null),[w,N]=(0,i.useState)([]),[S,$]=(0,i.useState)(!1),[I,M]=(0,i.useState)(!1),[L,K]=(0,i.useState)(!1),[F,J]=(0,i.useState)(!1),[B,W]=(0,i.useState)(""),[G,Q]=(0,i.useState)(!1),[H,V]=(0,i.useState)(!1),[Z,X]=(0,i.useState)(!1),[Y,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)({}),[ea,ei]=(0,i.useState)(!1),[el,er]=(0,i.useState)({}),[en,eo]=(0,i.useState)(""),[ed,ec]=(0,i.useState)(null),[em,eu]=(0,i.useState)(!1),[ep,ex]=(0,i.useState)([]),[eh,ef]=(0,i.useState)("__none__"),[eb,eg]=(0,i.useState)(!1),[ey,ev]=(0,i.useState)(null),[ej,ek]=(0,i.useState)(""),[ew,eN]=(0,i.useState)("auto"),[eC,eS]=(0,i.useState)([]),[eA,e$]=(0,i.useState)([]),[eT,eI]=(0,i.useState)([]),[eP,eO]=(0,i.useState)(null),[eE,e_]=(0,i.useState)(!1),[eD,eR]=(0,i.useState)(!1),[ez,eU]=(0,i.useState)(!1),[eq,eM]=(0,i.useState)(null),[eL,eK]=(0,i.useState)({}),[eF,eJ]=(0,i.useState)(null),eB=(0,i.useRef)(!1),[eW,eG]=(0,i.useState)(!1),[eQ,eH]=(0,i.useState)(null),[eV,eZ]=(0,i.useState)(""),[eX,eY]=(0,i.useState)(1),[e0,e1]=(0,i.useState)(20),[e2,e5]=(0,i.useState)("all"),[e4,e3]=(0,i.useState)(1),[e6,e7]=(0,i.useState)(20),{copied:e8,copy:e9}=(0,u.C)(),te=(0,i.useRef)(0),tt="ag_risk_confirmed",ts=(0,i.useCallback)(()=>{eH(null),eZ(""),te.current=0,window.localStorage.removeItem(_)},[]),ta=()=>{$(!0)},ti=()=>{"kiro"===r||"codebuddy"===r?s.push(`/dashboard/automation?provider=${r}`):("kiro"===r&&eQ?.jobId&&R(eQ.status)&&ts(),"antigravity"===r&&"true"!==window.localStorage.getItem(tt))?e_(!0):td?ta():(W(""),J(!0))},tl=()=>{W(""),J(!0)},tr=()=>{td?ti():tl()},tn=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],to=tn?.authModes||[],td=!!c.zN[r]||!!c.IS[r]||to.includes("oauth"),tc=!!c.fg[r]||to.includes("apikey"),tm=!!c.IS[r]?.noAuth,tu=(0,m.KC)(r),tp=(0,c.wG)(r),tx=(0,c.mq)(r),th=(0,c.gb)(r),tf=tx||th,tb=!tf&&td&&tc,tg="kiro"===r||"codebuddy"===r,ty="xai"===r?"Grok Build OAuth":"OAuth",tv="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let tj=tf?r:tp,tk=tf?v?.prefix||r:tp,tw=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tj)}`,{cache:"no-store"}),t=await e.json();e.ok&&eI(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tj]),tN=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tj,ids:[e]})})).ok&&await tw()}catch(e){console.log("Error disabling model:",e)}},tC=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tj)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tw()}catch(e){console.log("Error enabling model:",e)}},tS=async e=>{e.length&&eO({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eO(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tj,ids:e})})).ok&&await tw()}catch(e){console.log("Error disabling all models:",e)}}})},tA=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tj)}`,{method:"DELETE"})).ok&&await tw()}catch(e){console.log("Error enabling all models:",e)}},t$=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&es(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&e$(e.models)}).catch(()=>{})},[r]);let tT=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.allSettled([q("/api/providers"),q("/api/provider-nodes"),q("/api/proxy-pools?isActive=true"),q("/api/settings")]),i="fulfilled"===e.status?e.value.response:null,l="fulfilled"===e.status?e.value.data:{},n="fulfilled"===t.status?t.value.response:null,o="fulfilled"===t.status?t.value.data:{},d="fulfilled"===s.status?s.value.response:null,c="fulfilled"===s.status?s.value.data:{},m="fulfilled"===a.status?a.value.response:null,u=m?.ok&&a.value.data||{};if(i?.ok){let e=(l.connections||[]).filter(e=>e.provider===r);b(e)}d?.ok&&N(c.proxyPools||[]);let p=(u.providerStrategies||{})[r]||{};ev(p.fallbackStrategy||null),ek(null!=p.stickyRoundRobinLimit?String(p.stickyRoundRobinLimit):"1");let x=(u.providerThinking||{})[r]||{};if(eN(x.mode||"auto"),n?.ok){let e=(o.nodes||[]).find(e=>e.id===r)||null;if(!e&&tf)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let{response:t,data:s}=await q("/api/provider-nodes");if(t.ok&&(e=(s.nodes||[]).find(e=>e.id===r)||null))break}j(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[r,tf]),tI=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(j(s.node),await tT(),V(!1))}catch(e){console.log("Error updating provider node:",e)}},tP=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[r]:l[r]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,i.useEffect)(()=>{tT(),t$(),tw()},[tT,t$,tw]),(0,i.useEffect)(()=>{eY(1),e3(1),e5("all")},[r]),(0,i.useEffect)(()=>{eY(1)},[e2,e0]),(0,i.useEffect)(()=>{e3(1)},[e6,eT.length,tu.length,eA.length]),(0,i.useEffect)(()=>{if("kiro"!==r)return;let e=window.localStorage.getItem(_),t=!1;return(async()=>{try{if(eZ(""),eQ?.jobId)return;let a=await U();if(!t&&a.res.ok&&a.data?.job){eH(a.data.job),te.current=a.data.job.summary?.success||0,window.localStorage.setItem(_,a.data.job.jobId);return}if(e){var s;let a=await z(e);if(!t&&a?.res.ok&&a.data?.job&&(s=a.data.job.status,["queued","running","needs_manual"].includes(s))){eH(a.data.job),te.current=a.data.job.summary?.success||0;return}ts(),eZ(D)}}catch{t||eZ(D)}})(),()=>{t=!0}},[ts,eQ?.jobId,r]),(0,i.useEffect)(()=>{if("kiro"!==r||!eQ?.jobId||R(eQ.status))return;let e=window.setInterval(async()=>{try{let e=await z(eQ.jobId);if(e?.res.ok&&e.data?.job){let t=e.data.job.summary?.success||0;t>te.current&&(te.current=t,await tT()),eZ(""),eH(e.data.job);return}if(e?.res.status===404){let e=await U();if(e.res.ok&&e.data?.job){let t=e.data.job.summary?.success||0;t>te.current&&(te.current=t,await tT()),eZ(""),eH(e.data.job),window.localStorage.setItem(_,e.data.job.jobId);return}ts(),eZ(D)}}catch{}},2e3);return()=>window.clearInterval(e)},[ts,tT,eQ?.jobId,eQ?.status,r]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&h(e).then(eS)},[r]);let tO=async(e,t,s=tp)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await t$();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tE=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await t$()}catch(e){console.log("Error deleting alias:",e)}},t_=async()=>{if(eW)return;let e=x.find(e=>!1!==e.isActive);if(!e)return void alert((0,p.Tl)("Please add an active Qoder connection first"));eG(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,p.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,p.Tl)("No models returned"));let i=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,""),a=`${tj}/${s}`;!Object.values(et).includes(a)&&(et[s]||(await tO(s,s,tj),i+=1))}0===i?alert((0,p.Tl)("All models already exist, no new models added")):alert((0,p.Tl)("Successfully added")+` ${i} `+(0,p.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,p.Tl)("Error fetching models")+": "+e.message)}finally{eG(!1)}},tD=async()=>{if(eD||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eB.current=!1,eR(!0),eU(!1),eM(null),eK(e),eJ({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<x.length;e+=1){if(eB.current){eJ({total:x.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=x[e];eM(a.id),eK(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eK(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eK(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eJ({total:x.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eM(null),eR(!1),eU(!1),eB.current=!1}},tR=async e=>{eO({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eO(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&b(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tz=()=>{tT(),$(!1)},tU=(0,i.useCallback)(e=>{(eH(e),eZ(""),e?.jobId)?(window.localStorage.setItem(_,e.jobId),te.current=Math.max(te.current,e.summary?.success||0)):ts()},[ts]),tq=async e=>{W("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tT(),J(!1);return}W(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),W("Failed to save connection")}},tM=async e=>{try{(await fetch(`/api/providers/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tT(),Q(!1))}catch(e){console.log("Error updating connection:",e)}},tL=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&b(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tK=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],b(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tT()}},tF=x.filter(e=>k(e,e2)),tJ=f.reduce((e,t)=>(e[t.id]="all"===t.id?x.length:x.filter(e=>k(e,t.id)).length,e),{}),tB=ep.filter(e=>x.some(t=>t.id===e)),tW=x.filter(e=>tB.includes(e.id)),tG="codebuddy"===r?(tW.length>0?tW:x).map(e=>e.id):[],tQ=tF.length>0&&tF.every(e=>tB.includes(e.id)),tH=(()=>{if(0===tW.length)return"";let e=new Set(tW.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let s=w.find(e=>e.id===t);return`All selected currently bound to ${s?.name||t}`}return"Selected connections have mixed proxy bindings"})(),tV=()=>{eb||X(!1)},tZ=async e=>{eg(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tT(),X(!1)}finally{eg(!1)}},tX=e=>tZ(tW.map(t=>({connectionId:t.id,proxyPoolId:e}))),tY=e=>{let t="gsuite"===e?"GSuite (non-Gmail)":"Gmail (@gmail.com)";eO({title:`Delete ${t}`,message:`Delete ALL ${t} accounts for this provider? This cannot be undone.`,onConfirm:async()=>{eO(null);try{(await fetch("/api/providers/bulk-delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:tn?.id||r,emailFilter:e})})).ok&&(ex([]),await tT())}catch(e){console.error("bulk delete error:",e)}}})},t0=Math.max(1,Math.ceil(tF.length/e0)),t1=Math.min(eX,t0),t2=tF.slice((t1-1)*e0,t1*e0),t5=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:t2.map((e,t)=>{let s,i=x.findIndex(t=>t.id===e.id);return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("label",{className:"flex w-8 shrink-0 items-center justify-center",children:(0,a.jsx)("input",{type:"checkbox",checked:(s=e.id,tB.includes(s)),onChange:()=>{var t;return t=e.id,void ex(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"size-4 rounded border-black/20 dark:border-white/20","aria-label":`Select ${e.name||e.email||e.id}`})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(T,{connection:e,proxyPools:w,isOAuth:td,isFirst:0===i,isLast:i===x.length-1,onMoveUp:()=>tK(i,i-1),onMoveDown:()=>tK(i,i+1),onToggleActive:t=>tL(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&b(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ee(e),Q(!0)},onDelete:()=>tR(e.id),oneByOneStatus:eL[e.id]||null})})]},e.id)})}),t4=w.filter(e=>!0===e.isActive),t3=(0,a.jsx)(d.aF,{isOpen:Z,onClose:tV,title:`Apply Proxy (${tW.length} selected)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=w.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tZ(tW.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eb||0===t4.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tX(null),disabled:eb,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),w.map(e=>(0,a.jsxs)("button",{onClick:()=>tX(e.id),disabled:eb||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eb&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tV,variant:"ghost",fullWidth:!0,disabled:eb,children:"Cancel"})]})}),t6=async e=>{if(!ed){ec(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tj}/${e}`})}),s=await t.json();er(t=>({...t,[e]:s.ok?"ok":"error"})),eo(s.ok?"":s.error||"Model not reachable")}catch{er(t=>({...t,[e]:"error"})),eo("Network error")}finally{ec(null)}}};return g?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):tn?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${tn.color}15`},children:ea?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:tn.color},children:tn.textIcon||tn.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:tx&&tn.apiType?"responses"===tn.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":th?"/providers/anthropic-m.png":`/providers/${tn.id}.png`,alt:tn.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>ei(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:tn.name}),(tn.notice?.apiKeyUrl||tn.notice?.signupUrl||tn.website)&&(0,a.jsxs)("a",{href:tn.notice?.apiKeyUrl||tn.notice?.signupUrl||tn.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),tn.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),tn.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:tn.deprecationNotice})]}),tn.notice?.text&&!tn.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:tn.notice.text}),tn.notice.apiKeyUrl&&(0,a.jsx)("a",{href:tn.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),tf&&v&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:th?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[th?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",th?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{W(""),J(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>V(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eO({title:"Delete Compatible Node",message:`Delete this ${th?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eO(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tm?(0,a.jsx)(d.gw,{providerId:r}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[x.length>0&&w.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>{if(0===tW.length)return;let e=[...new Set(tW.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"))];ef(1===e.length?e[0]:"__none__"),X(!0)},disabled:0===tW.length,children:"Apply Proxy"}),x.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tD,disabled:eD,children:eD?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eD&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eD&&(eB.current=!0,eU(!0))},disabled:ez,children:ez?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===ey,onChange:e=>{let t=e?"round-robin":null,s=e?ej||"1":ej;e&&!ej&&ek("1"),ev(t),tP(t,s)}}),"round-robin"===ey&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:ej,onChange:e=>{var t;ek(t=e.target.value),tP("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),x.length>0&&(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 rounded-lg border border-black/5 bg-black/[0.02] p-3 dark:border-white/5 dark:bg-white/[0.02]",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:tQ,onChange:()=>{tQ?ex(e=>e.filter(e=>!tF.some(t=>t.id===e))):ex(e=>Array.from(new Set([...e,...tF.map(e=>e.id)])))},className:"size-4 rounded border-black/20 dark:border-white/20"}),tQ?"Unselect visible":"Select visible"]}),(0,a.jsxs)(d.Ex,{variant:"default",children:[tF.length," visible"]}),tW.length>0&&(0,a.jsxs)(d.Ex,{variant:"default",children:[tW.length," selected"]}),tH&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:tH}),tW.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:()=>{ex([]),ef("__none__")},children:"Clear"}),tW.length>0&&(0,a.jsxs)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:()=>{0!==tW.length&&eO({title:"Delete Selected Connections",message:`Delete ${tW.length} selected connection(s)? This permanently removes the selected accounts.`,onConfirm:async()=>{for(let e of(eO(null),tW))try{await fetch(`/api/providers/${e.id}`,{method:"DELETE"})}catch(e){console.log("Error deleting selected connection:",e)}ex(e=>e.filter(e=>!tW.some(t=>t.id===e))),await tT()}})},children:["Delete Selected (",tW.length,")"]}),(0,a.jsxs)("button",{type:"button",onClick:()=>tY("gsuite"),className:"flex h-8 items-center gap-1 rounded-lg border border-orange-500/30 px-2 text-xs text-orange-500 transition-colors hover:bg-orange-500/10",title:"Delete all GSuite accounts (non-Gmail)",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"domain"}),"Delete GSuite"]}),(0,a.jsxs)("button",{type:"button",onClick:()=>tY("gmail"),className:"flex h-8 items-center gap-1 rounded-lg border border-rose-500/30 px-2 text-xs text-rose-500 transition-colors hover:bg-rose-500/10",title:"Delete all Gmail accounts (@gmail.com)",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"mail"}),"Delete Gmail"]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:f.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>e5(e.id),className:`rounded-full border px-2.5 py-1 text-xs transition-colors ${e2===e.id?"border-primary/50 bg-primary/10 text-primary":"border-border text-text-muted hover:border-primary/30 hover:text-text-main"}`,children:[e.label,(0,a.jsx)("span",{className:"ml-1 text-[10px] opacity-70",children:tJ[e.id]||0})]},e.id))})]}),0===x.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:td?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tb&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",ty," or ",tv,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:tb?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ti,children:ty}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tl,children:tv})]}):(0,a.jsxs)(a.Fragment,{children:[!tf&&"iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>M(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:tg?"automation":"add",onClick:tr,children:tg?"Open Automation":tf?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}),"kiro"===r&&eQ?.jobId&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 rounded-lg border border-primary/20 bg-primary/[0.06] px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-text-main",children:"Bulk import progress is still available"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Status: ",eQ.status," | Success: ",eQ.summary?.success||0," | Running: ",eQ.summary?.running||0," | Queued: ",eQ.summary?.queued||0]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"monitoring",variant:"secondary",onClick:()=>s.push("/dashboard/automation?provider=kiro"),children:"Resume Bulk Progress"}),R(eQ.status)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"close",onClick:ts,children:"Clear"})]})]}),"kiro"===r&&!eQ?.jobId&&eV&&(0,a.jsx)("div",{className:"mt-4 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:eV})]}):(0,a.jsxs)(a.Fragment,{children:[eF&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eF.total]}),(0,a.jsxs)("span",{children:["Completed: ",eF.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eF.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eF.failed]}),eF.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eD&&eq&&(0,a.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eq)?.name||eq]})]})}),"kiro"===r&&eQ?.jobId&&(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 rounded-lg border border-primary/20 bg-primary/[0.06] px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-text-main",children:"Bulk import progress is still available"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Status: ",eQ.status," | Success: ",eQ.summary?.success||0," | Running: ",eQ.summary?.running||0," | Queued: ",eQ.summary?.queued||0]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"monitoring",variant:"secondary",onClick:()=>s.push("/dashboard/automation?provider=kiro"),children:"Resume Bulk Progress"}),R(eQ.status)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"close",onClick:ts,children:"Clear"})]})]}),"kiro"===r&&!eQ?.jobId&&eV&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:eV}),t5,"kiro"===r&&t0>1&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Page ",t1," of ",t0," • Showing ",(t1-1)*e0+1,"-",Math.min(t1*e0,tF.length)," of ",tF.length," connections"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",disabled:t1<=1,onClick:()=>eY(e=>Math.max(1,e-1)),children:"Previous"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",disabled:t1>=t0,onClick:()=>eY(e=>Math.min(t0,e+1)),children:"Next"})]})]}),"kiro"!==r&&tF.length>0&&(0,a.jsx)(d.dK,{currentPage:t1,pageSize:e0,totalItems:tF.length,onPageChange:eY,onPageSizeChange:e=>{e1(e),eY(1)},className:"mt-2"}),x.length>0&&0===tF.length&&(0,a.jsx)("div",{className:"py-8 text-center text-sm text-text-muted",children:"No connections match this status filter."}),!tf&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>M(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codebuddy"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>{x.length>1&&0===tW.length?alert("Select the CodeBuddy connection(s) that should use this quota cookie first."):K(!0)},title:"Attach CodeBuddy web cookie for quota tracking",className:"w-full sm:w-auto",children:"Quota Cookie"}),tb?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ti,className:"w-full sm:w-auto",children:ty}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tl,className:"w-full sm:w-auto",children:tv})]}):(0,a.jsx)(d.$n,{size:"sm",icon:tg?"automation":"add",onClick:tr,className:"w-full sm:w-auto",children:tg?"Open Automation":"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!tf&&(e=[...tu,...eA.filter(e=>!tu.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eT.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eT.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tA,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tS(e),children:"Disable All"})]}))]}),!!en&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:en}),(()=>{let e,t,s;if(tf)return(0,a.jsx)(A,{providerStorageAlias:tj,providerDisplayAlias:tk,modelAliases:et,copied:e8,onCopy:e9,onSetAlias:tO,onDeleteAlias:tE,connections:x,isAnthropic:th});let i=[...tu,...eA.filter(e=>!tu.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eT),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),c=Object.entries(et).filter(([e,t])=>{let s=`${tj}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return tn.passthroughModels?!tu.some(e=>e.id===a):!tu.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${tj}/`.length),alias:e,fullModel:t})),m=Math.min(e4,Math.max(1,Math.ceil(n.length/e6))),u=n.slice((m-1)*e6,m*e6);return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[c.map(e=>(0,a.jsx)(C,{model:{id:e.id},fullModel:`${tk}/${e.id}`,alias:e.alias,copied:e8,onCopy:e9,onSetAlias:()=>{},onDeleteAlias:()=>tE(e.alias),testStatus:el[e.id],onTest:x.length>0||tm?()=>t6(e.id):void 0,isTesting:ed===e.id,isCustom:!0,isFree:!1},e.id)),u.map(e=>{let t=`${tj}/${e.id}`,s=`${r}/${e.id}`,i=Object.entries(et).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(C,{model:e,fullModel:`${tk}/${e.id}`,alias:i,copied:e8,onCopy:e9,onSetAlias:t=>tO(e.id,t,tj),onDeleteAlias:()=>tE(i),testStatus:el[e.id],onTest:x.length>0||tm?()=>t6(e.id):void 0,isTesting:ed===e.id,isFree:e.isFree,onDisable:()=>tN(e.id)},e.id)}),n.length>e6&&(0,a.jsx)("div",{className:"w-full",children:(0,a.jsx)(d.dK,{currentPage:m,pageSize:e6,totalItems:n.length,onPageChange:e3,onPageSizeChange:e=>{e7(e),e3(1)}})}),(0,a.jsxs)("button",{onClick:()=>eu(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===r&&x.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:t_,disabled:eW,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:eW?{animation:"spin 1s linear infinite"}:void 0,children:eW?"progress_activity":"download"}),eW?(0,p.Tl)("Fetching..."):(0,p.Tl)("Fetch Qoder Models")]}),eC.length>0&&(e=new Set(Object.values(et)),t=new Set(tu.map(e=>e.id)),0===(s=eC.filter(s=>!e.has(`${tj}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tO(e.id,t,tj)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>tC(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),t3,"kiro"===r?(0,a.jsx)(d.Mh,{isOpen:S,providerInfo:tn,onSuccess:tz,onRefresh:tT,initialBulkJobId:eQ?.jobId||null,onBulkJobChange:tU,onClose:()=>$(!1)}):"cursor"===r?(0,a.jsx)(d.G9,{isOpen:S,onSuccess:tz,onClose:()=>$(!1)}):"gitlab"===r?(0,a.jsx)(d.vj,{isOpen:S,providerInfo:tn,onSuccess:tz,onClose:()=>$(!1)}):(0,a.jsx)(d.LF,{isOpen:S,provider:r,providerInfo:tn,onSuccess:tz,onClose:()=>$(!1)}),"iflow"===r&&(0,a.jsx)(d.vE,{isOpen:I,onSuccess:()=>{tT(),M(!1)},onClose:()=>M(!1)}),"codebuddy"===r&&(0,a.jsx)(d.xl,{isOpen:L,connectionIds:tG,onSuccess:()=>{tT(),K(!1)},onClose:()=>K(!1)}),(0,a.jsx)(P,{isOpen:F,provider:r,providerName:tn.name,isCompatible:tf,isAnthropic:th,authType:tn?.authType,authHint:tn?.authHint,website:tn?.website,proxyPools:w,error:B,onSave:tq,onBulkDone:tT,onClose:()=>{W(""),J(!1)}}),(0,a.jsx)(d.wI,{isOpen:G,connection:Y,proxyPools:w,onSave:tM,onClose:()=>Q(!1)}),tf&&(0,a.jsx)(O,{isOpen:H,node:v,onSave:tI,onClose:()=>V(!1),isAnthropic:th}),!tf&&(0,a.jsx)(E,{isOpen:em,providerAlias:tj,providerDisplayAlias:tk,onSave:async e=>{let t=tn?.passthroughModels?e.split("/").pop():e;await tO(e,t,tj),eu(!1)},onClose:()=>eu(!1)}),(0,a.jsx)(d.uo,{isOpen:eE,onClose:()=>e_(!1),onConfirm:()=>{(window.localStorage.setItem(tt,"true"),e_(!1),td)?ta():tl()},title:"Risk Notice",message:tn?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!eP,onClose:()=>eO(null),onConfirm:eP?.onConfirm,title:eP?.title||"Confirm",message:eP?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},42911:(e,t,s)=>{Promise.resolve().then(s.bind(s,37044))}},e=>{e.O(0,[2574,3862,4343,1321,5497,8441,3794,7358],()=>e(e.s=42911)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{5498:(e,t,a)=>{Promise.resolve().then(a.bind(a,75095)),Promise.resolve().then(a.bind(a,25086))},75095:(e,t,a)=>{"use strict";a.d(t,{default:()=>A});var r=a(95155),s=a(12115),l=a(57250),n=a(42793);function i(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function o(e,t){if(!t||"object"!=typeof t)return[];let a=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.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])=>{a.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])=>{a.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])=>{a.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))&&a.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"autoclaw":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:"points"===e?"Points":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?a.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let r=(0,n.KC)(e);if(r.length>0){let e=new Map(r.map((e,t)=>[e.id,t]));a.sort((t,a)=>{let r=t.modelKey||t.name,s=a.modelKey||a.name;return(e.get(r)??999)-(e.get(s)??999)})}return a}function c({quotas:e=[],compact:t=!1,sortMode:a="default",showSortLabel:l=!1}){let[n,o]=(0,s.useState)(1),d=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):i(e?.used,e?.total)})),[e]),u=(0,s.useMemo)(()=>"remaining-asc"===a?[...d].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===a?[...d].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):d,[d,a]),m=Math.max(1,Math.ceil(u.length/10));if((0,s.useEffect)(()=>{o(1)},[a,e]),(0,s.useEffect)(()=>{o(e=>Math.min(e,m))},[m]),!e||0===e.length)return null;let x=u.slice((n-1)*10,10*n),h=0===u.length?0:(n-1)*10+1,b=Math.min(10*n,u.length),p=t?"py-1 px-1.5":"py-2 px-3",g=t?"text-[11px]":"text-sm",f=t?"text-[11px]":"text-sm",v=t?"text-[10px] leading-tight":"text-xs";return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"text-[10px] text-text-muted",children:[u.length," quota",u.length>1?"s":""]}),l&&(0,r.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,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsx)("table",{className:"w-full table-fixed text-left",children:(0,r.jsx)("tbody",{children:x.map(e=>{var a;let s=(a=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:a>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},l=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,a=new Date,r=t-a;if(r<=0)return"-";let s=Math.ceil(r/6e4);if(s<60)return`${s}m`;let l=Math.floor(s/60),n=s%60;if(l<24)return`${l}h ${n}m`;let i=Math.floor(l/24);return`${i}d ${l%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),n=function(e){if(!e)return null;try{let t=new Date(e),a=new Date,r=new Date(a.getFullYear(),a.getMonth(),a.getDate()),s=new Date(r);s.setDate(s.getDate()+1);let l="";l=t>=r&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${l}, ${n}`}catch{return null}}(e.resetAt);return(0,r.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,r.jsx)("td",{className:`${p} w-[30%]`,children:(0,r.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,r.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,r.jsx)("span",{className:`${g} font-medium text-text-primary truncate`,children:e.name})]})}),(0,r.jsx)("td",{className:`${p} w-[45%]`,children:(0,r.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,r.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,r.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,r.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,r.jsxs)("span",{className:"text-text-muted",children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]}),(0,r.jsxs)("span",{className:`font-medium ${s.text}`,children:[e.remaining,"%"]})]})]})}),(0,r.jsx)("td",{className:`${p} w-[25%]`,children:"-"!==l||n?t?(0,r.jsx)("div",{className:`${f} text-text-primary font-medium truncate`,title:n||"",children:"-"!==l?`in ${l}`:n}):(0,r.jsxs)("div",{className:"space-y-0.5",children:["-"!==l&&(0,r.jsxs)("div",{className:`${f} text-text-primary font-medium`,children:["in ",l]}),n&&(0,r.jsx)("div",{className:`${v} text-text-muted`,children:n})]}):(0,r.jsx)("div",{className:`${f} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),m>1&&(0,r.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,r.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,r.jsxs)("span",{children:["Showing ",h,"-",b," of ",u.length]}),(0,r.jsxs)("span",{children:["Page ",n," / ",m]})]}),(0,r.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,r.jsx)("button",{type:"button",onClick:()=>o(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,r.jsx)("button",{type:"button",onClick:()=>o(e=>Math.min(m,e+1)),disabled:n===m,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var d=a(98542),u=a(84588),m=a(35497),x=a(52679);function h(e){let t=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return t(e.email)?e.email:(t(e.name),e.name)}function b(e,t){let a=t[e.id]?.quotas?.[0];return a&&"number"==typeof a.remaining?a.remaining:1/0}function p(e){return x.Q2[e]?.name||e}function g(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function f(e,t){let a=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>a.has(e)))}async function v(e,t){return await e(t)}let y="quotaCacheData";function k(){try{let e=window.localStorage.getItem(y);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function w(e,t){try{let a=k();a[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(y,JSON.stringify(a))}catch(e){console.error("Error writing quota cache:",e)}}let j="quotaAutoRefresh",N=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],S=[{value:"single",label:"Satuan",icon:"account_circle"},{value:"bulk",label:"Bulk",icon:"stacks"}],C=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}],$=[10,20,50,100];function A(){let[e,t]=(0,s.useState)([]),[a,n]=(0,s.useState)({}),[A,q]=(0,s.useState)({}),[E,P]=(0,s.useState)({}),[M,D]=(0,s.useState)(!0),[I,O]=(0,s.useState)(null),[T,L]=(0,s.useState)(!1),[_,z]=(0,s.useState)(!1),[F,U]=(0,s.useState)(60),[R,J]=(0,s.useState)(!0),[K,B]=(0,s.useState)(null),[Q,W]=(0,s.useState)(null),[G,H]=(0,s.useState)(!1),[Y,V]=(0,s.useState)(null),[X,Z]=(0,s.useState)([]),[ee,et]=(0,s.useState)("all"),[ea,er]=(0,s.useState)([]),[es,el]=(0,s.useState)("single"),[en,ei]=(0,s.useState)("all"),[eo,ec]=(0,s.useState)("default"),[ed,eu]=(0,s.useState)(!1),[em,ex]=(0,s.useState)(!1),[eh,eb]=(0,s.useState)(!1),[ep,eg]=(0,s.useState)({}),[ef,ev]=(0,s.useState)({}),[ey,ek]=(0,s.useState)(1),[ew,ej]=(0,s.useState)(20),[eN,eS]=(0,s.useState)(String(20)),[eC,e$]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[eA,eq]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eE=(0,s.useRef)(null),eP=(0,s.useRef)(null),eM=(0,s.useCallback)(async(e=ey)=>{try{var a,r;let s=new URLSearchParams({page:String(e),pageSize:String(ew),accountStatus:en,sort:"priority"});"all"!==ee&&s.set("provider",ee);let l=await fetch(`/api/providers/client?${s.toString()}`);if(!l.ok)throw Error("Failed to fetch connections");let n=await l.json(),i=n.connections||[],o=(a=n.pagination,a||{page:1,pageSize:ew,total:0,totalPages:1}),c=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(n.totals,i.length);return t(i),er(n.providerOptions||[]),e$(o),eq(c),ek((r=n.pagination,r?.page||e)),i}catch(e){return console.error("Error fetching connections:",e),t([]),er([]),e$({page:1,pageSize:ew,total:0,totalPages:1}),eq({eligibleConnections:0,providerFilteredConnections:0}),[]}},[en,ey,ew,ee]),eD=(0,s.useCallback)(async(e,t,a=!1)=>{q(t=>({...t,[e]:!0})),P(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}${a?"?refresh=1":""}`);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};n(t=>({...t,[e]:r})),w(e,r);return}throw Error(`HTTP ${r.status}: ${a}`)}let s=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,s);let l={quotas:o(t,s),plan:s.plan||null,message:s.message||null,raw:s};n(t=>({...t,[e]:l})),w(e,l)}catch(a){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,a),P(t=>({...t,[e]:a.message||"Failed to fetch quota"}))}finally{q(t=>({...t,[e]:!1}))}},[]),eI=(0,s.useCallback)(async(e,t)=>{await eD(e,t),O(new Date)},[eD]),eO=(0,s.useCallback)(async(e,t=!1)=>{if(e&&"all"!==e){ev(t=>({...t,[e]:!0}));try{let a=`/api/usage/aggregate?provider=${encodeURIComponent(e)}${t?"&refresh=1":""}`,r=await fetch(a);if(!r.ok)throw Error("Failed to fetch aggregate");let s=await r.json(),l=o(e,s);eg(t=>({...t,[e]:{quotas:l,plan:s.plan||null,accountCount:s.accountCount||0,accountsWithQuota:s.accountsWithQuota||0,deadCount:s.deadCount||0}}))}catch(t){console.error(`[ProviderLimits] Aggregate fetch error for ${e}:`,t)}finally{ev(t=>({...t,[e]:!1}))}}},[]),eT=(0,s.useCallback)(async(e,t)=>{if("bulk"===es&&t){await eO(t,!0),O(new Date);return}e?.length&&(q(t=>({...t,...Object.fromEntries(e.map(e=>[e,!0]))})),await Promise.all(e.map(e=>eD(e,t))),O(new Date))},[eD,es,eO]),eL=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){B(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){n(t=>{let a={...t};return delete a[e],a}),q(t=>{let a={...t};return delete a[e],a}),P(t=>{let a={...t};return delete a[e],a});try{let t=k();t[e]&&(delete t[e],window.localStorage.setItem(y,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await v(eM,ey)}}catch(e){console.error("Error deleting connection:",e)}finally{B(null)}}},[eM,ey]),e_=(0,s.useCallback)(async(e,t)=>{W(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(n(e=>({...e})),await v(eM,ey))}catch(e){console.error("Error updating connection status:",e)}finally{W(null)}},[eM,ey]),ez=(0,s.useCallback)(async e=>{if(!Y?.id)return;let t=Y.id,a=Y.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eM(),H(!1),V(null),x.wb.includes(a)&&await eD(t,a))}catch(e){console.error("Error saving connection:",e)}},[Y,eM,eD]);(0,s.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&Z(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eF=(0,s.useCallback)(async()=>{if(!_){z(!0),U(60);try{let e=await eM(ey);q(g(e)),P(t=>f(t,e)),n(t=>f(t,e)),await Promise.all(e.map(e=>eD(e.id,e.provider,!0))),"bulk"===es&&("all"!==ee?[ee]:ea.map(e=>e.value||e).filter(e=>"all"!==e)).forEach(e=>eO(e,!0)),O(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{z(!1)}}},[_,eM,eD,ey,es,ee,ea,eO]);(0,s.useEffect)(()=>{(async()=>{J(!0);let e=await eM(ey);J(!1),q(g(e)),P(t=>f(t,e)),n(t=>f(t,e)),await Promise.all(e.map(e=>eD(e.id,e.provider))),O(new Date)})()},[eM,eD,ey]),(0,s.useEffect)(()=>{"bulk"!==es||("all"!==ee?[ee]:ea.map(e=>e.value||e).filter(e=>"all"!==e)).forEach(e=>eO(e))},[es,ee,ea,eO]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(j);D(null===e||"true"===e),L(!0)},[]),(0,s.useEffect)(()=>{T&&window.localStorage.setItem(j,String(M))},[M,T]),(0,s.useEffect)(()=>{if(!T||!M){eE.current&&(clearInterval(eE.current),eE.current=null),eP.current&&(clearInterval(eP.current),eP.current=null);return}return eE.current=setInterval(()=>{eF()},6e4),eP.current=setInterval(()=>{U(e=>e<=1?60:e-1)},1e3),()=>{eE.current&&clearInterval(eE.current),eP.current&&clearInterval(eP.current)}},[M,eF,T]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(eE.current&&(clearInterval(eE.current),eE.current=null),eP.current&&(clearInterval(eP.current),eP.current=null)):M&&T&&(eE.current=setInterval(eF,6e4),eP.current=setInterval(()=>{U(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[M,eF,T]);let eU=(0,s.useMemo)(()=>(function(e,t,a,r,s){if("codex"===r&&"default"!==s)return[...e].sort((e,a)=>{let r=b(e,t),l=b(a,t),n="remaining-asc"===s?r-l:l-r;return 0!==n?n:(h(e)||"").localeCompare(h(a)||"")});if(!a)return e;let l=e=>{let a=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return a.length>0?Math.min(...a):1/0};return[...e].sort((e,t)=>{let a=l(e)-l(t);return 0!==a?a:(e.provider||"").localeCompare(t.provider||"")||(h(e)||"").localeCompare(h(t)||"")})})(e,a,ed,ee,eo),[e,a,ed,ee,eo]),eR=(0,s.useMemo)(()=>{let e;return e=new Map,eU.forEach(t=>{t.provider&&(e.has(t.provider)||e.set(t.provider,[]),e.get(t.provider).push(t))}),[...e.entries()].map(([e,t])=>(function(e,t,a,r,s){if(!t.length)return null;let l=[],n=[],i=null,o=!1;return t.forEach(e=>{let t=a[e.id];Array.isArray(t?.quotas)&&l.push(...t.quotas),t?.message&&!i&&(i=t.message),s[e.id]&&n.push(s[e.id]),r[e.id]&&(o=!0)}),{id:`${e}-aggregate`,provider:e,name:p(e),email:`${t.length} accounts`,isActive:t.some(e=>e.isActive??!0),isAggregate:!0,quota:{quotas:function(e=[]){let t=new Map;return e.forEach(e=>{if(!e?.name)return;let a=t.get(e.name)||{name:e.name,used:0,total:0,resetAt:e.resetAt||null};a.used+=Number(e.used)||0,a.total+=Number(e.total)||0,e.resetAt&&(!a.resetAt||new Date(e.resetAt).getTime()<new Date(a.resetAt).getTime())&&(a.resetAt=e.resetAt),t.set(e.name,a)}),[...t.values()]}(l),message:0===l.length&&i||null},isLoading:o,error:!l.length&&n.length>0?n[0]:null,connectionIds:t.map(e=>e.id)}})(e,t,a,A,E)).filter(Boolean)},[eU,a,A,E]),eJ=(0,s.useMemo)(()=>Object.keys(ep).length?eR.map(e=>{let t=ep[e.provider];return t&&t.quotas?.length?{...e,email:`${t.accountCount||e.connectionIds?.length||0} accounts`,quota:{...e.quota,quotas:t.quotas,message:null},isLoading:ef[e.provider]||!1}:e}):eR,[eR,ep,ef]),eK=(0,s.useMemo)(()=>"bulk"===es?eJ:eU,[es,eJ,eU]),eB=e=>{let t=a[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=i(e.used,e.total))},eQ=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eh){eb(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await v(eM,ey)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eb(!1)}}},[eh,eM,ey]),eW="all"===ee?"All providers":ee,eG=eA.eligibleConnections>0,eH=eK.length>0,eY=eA.eligibleConnections?eA.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===ee?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===en?"turned off":"active"===en?"active":"matching"} accounts found for ${ee}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},eV=function(e){var t;let{start:a,end:r}=(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 ${a}-${r} of ${e.total}`}(eC),eX=!$.includes(ew);return R||eG?R||eH?(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>ex(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":em,title:"Filter quota providers",children:[(0,r.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===ee?(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,r.jsx)(l.A,{src:`/providers/${ee}.png`,alt:ee,size:18,className:"size-[18px] rounded object-contain",fallbackText:ee.slice(0,2).toUpperCase()}),(0,r.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:eW})]}),(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),em&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>ex(!1)}),(0,r.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>{"all"!==ee&&ek(1),et("all"),ex(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ee?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,r.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ee&&(0,r.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,r.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,r.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:ea.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>{ee!==e&&ek(1),et(e),ex(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ee===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,r.jsx)(l.A,{src:`/providers/${e}.png`,alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,r.jsx)("span",{className:"font-medium capitalize",children:e}),ee===e&&(0,r.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,r.jsx)("div",{className:"inline-flex h-8 overflow-hidden rounded-lg border border-black/10 bg-black/[0.02] dark:border-white/10 dark:bg-white/[0.03]",children:S.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>el(e.value),"aria-pressed":es===e.value,className:`flex h-full items-center gap-1.5 px-2 text-xs transition-colors ${es===e.value?"bg-primary text-white":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,title:`Show quota in ${e.label} mode`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:e.icon}),(0,r.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.value))}),(0,r.jsx)("select",{value:en,onChange:e=>{let t=e.target.value;en!==t&&ek(1),ei(t)},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:N.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===ee&&(0,r.jsx)("select",{value:eo,onChange:e=>ec(e.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:C.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.jsxs)("button",{type:"button",onClick:()=>eu(e=>!e),"aria-pressed":ed,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${ed?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>{eQ(eU.filter(e=>(e.isActive??!0)&&eB(e)).map(e=>e.id),!1)},disabled:eh,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>{eQ(eU.filter(e=>!(e.isActive??!0)&&!eB(e)).map(e=>e.id),!0)},disabled:eh,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,r.jsxs)("button",{onClick:()=>D(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:M?"Disable auto-refresh":"Enable auto-refresh",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px] ${M?"text-primary":"text-text-muted"}`,children:M?"toggle_on":"toggle_off"}),(0,r.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),M&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",F,"s)"]})]}),(0,r.jsx)("button",{type:"button",onClick:eF,disabled:_,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px] ${_?"animate-spin":""}`,children:"refresh"})})]})}),ed&&(0,r.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:eK.map(e=>{let t=!0===e.isAggregate,s=t?e.quota:a[e.id],n=t?e.isLoading:A[e.id],i=t?e.error:E[e.id],o=!1===e.isActive,m=!t&&(K===e.id||Q===e.id);return(0,r.jsxs)(u.default,{padding:"none",className:`min-w-0 ${o?"opacity-60":""}`,children:[(0,r.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,r.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,r.jsx)(l.A,{src:`/providers/${e.provider}.png`,alt:e.provider,size:32,className:"object-contain",fallbackText:e.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:e.name||p(e.provider)}),h(e)?(0,r.jsx)("p",{className:"text-xs text-text-muted truncate",children:h(e)}):null]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,r.jsx)("button",{type:"button",onClick:()=>t?eT(e.connectionIds,e.provider):eI(e.id,e.provider),disabled:n||m,"aria-label":"Refresh quota",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",title:"Refresh quota",children:(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${n?"animate-spin":""}`,children:"refresh"})}),!t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>{V(e),H(!0)},disabled:m,"aria-label":"Edit connection",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",title:"Edit connection",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,r.jsx)("button",{type:"button",onClick:()=>eL(e.id),disabled:m,"aria-label":"Delete connection",className:"p-1.5 rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",title:"Delete connection",children:(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] ${K===e.id?"animate-pulse":""}`,children:"delete"})}),(0,r.jsx)("div",{className:"inline-flex items-center pl-0.5",title:e.isActive??!0?"Disable connection":"Enable connection",children:(0,r.jsx)(d.default,{size:"sm",checked:e.isActive??!0,disabled:m,onChange:t=>e_(e.id,t)})})]})]})]})}),(0,r.jsx)("div",{className:"px-2 py-1.5",children:n?(0,r.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):i?(0,r.jsxs)("div",{className:"text-center py-5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,r.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:i})]}):s?.message?(0,r.jsx)("div",{className:"text-center py-5",children:(0,r.jsx)("p",{className:"text-xs text-text-muted",children:s.message})}):(0,r.jsx)(c,{quotas:s?.quotas,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==eo})})]},e.id)})}),(0,r.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted",children:eV}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsxs)("select",{value:eX?"custom":String(ew),onChange:e=>{let t=e.target.value;if("custom"===t)return;let a=Number.parseInt(t,10);Number.isFinite(a)&&(ek(1),ej(a),eS(String(a)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[$.map(e=>(0,r.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,r.jsx)("option",{value:"custom",children:"Custom"})]}),(0,r.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:eN,onChange:e=>eS(e.target.value),onBlur:()=>{let e=Number.parseInt(eN,10);if(!Number.isFinite(e))return void eS(String(ew));let t=Math.min(500,Math.max(1,e));ek(1),ej(t),eS(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eN,10);if(!Number.isFinite(t))return void eS(String(ew));let a=Math.min(500,Math.max(1,t));ek(1),ej(a),eS(String(a))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eC.page," / ",eC.totalPages]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("button",{type:"button",onClick:()=>ek(1),disabled:eC.page<=1||R||_,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,r.jsx)("button",{type:"button",onClick:()=>ek(e=>Math.max(1,e-1)),disabled:eC.page<=1||R||_,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,r.jsx)("button",{type:"button",onClick:()=>ek(e=>Math.min(eC.totalPages,e+1)),disabled:eC.page>=eC.totalPages||R||_,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,r.jsx)("button",{type:"button",onClick:()=>ek(eC.totalPages),disabled:eC.page>=eC.totalPages||R||_,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,r.jsx)(m.wI,{isOpen:G,connection:Y,proxyPools:X,onSave:ez,onClose:()=>{H(!1),V(null)}})]}):(0,r.jsx)(u.default,{padding:"lg",children:(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:eY.icon}),(0,r.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:eY.title}),(0,r.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:eY.description})]})}):(0,r.jsx)(u.default,{padding:"lg",children:(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,r.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,r.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}}},e=>{e.O(0,[2574,3862,4343,1321,5497,8441,3794,7358],()=>e(e.s=5498)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,641,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1446,1451,1512,1557,1566,1666,1674,1697,1747,1860,1907,1910,1946,1949,2121,2154,2198,2284,2296,2536,2757,2772,2785,2797,2919,2922,3025,3038,3078,3079,3295,3397,3472,3549,3562,3568,3705,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4829,4896,4993,5018,5107,5177,5211,5226,5460,5466,5637,5685,5745,5746,5922,5990,6091,6107,6121,6268,6278,6319,6454,6479,6529,6580,6594,6644,6724,6740,6743,6819,6872,6919,6988,7111,7131,7158,7241,7254,7306,7311,7423,7429,7445,7473,7508,7520,7758,7777,7824,7851,8018,8026,8057,8165,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8918,8948,8974,8975,9027,9069,9088,9123,9141,9199,9321,9338,9359,9461,9515,9678,9709,9762,9817],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);