zevairouter 1.0.192 → 1.0.194

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 (1305) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +50 -3
  3. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  4. package/cli/app/.next-cli-build/app-path-routes-manifest.json +26 -15
  5. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  6. package/cli/app/.next-cli-build/prerender-manifest.json +24 -0
  7. package/cli/app/.next-cli-build/required-server-files.json +12 -3
  8. package/cli/app/.next-cli-build/routes-manifest.json +88 -3
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +2 -2
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +2 -2
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +17 -18
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  64. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  65. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  66. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  67. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  68. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  69. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  70. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  71. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  72. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  73. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  74. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  75. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +2 -2
  76. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  77. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  78. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -0
  79. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -0
  80. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -0
  81. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +2 -2
  82. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  83. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  84. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  85. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  87. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  88. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  90. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  91. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  92. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  93. package/cli/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  94. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  95. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  96. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  97. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  98. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  99. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  100. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  101. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  102. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  103. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  104. package/cli/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  105. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  106. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  107. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  108. package/cli/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  109. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  110. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  111. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  112. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  113. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  114. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  115. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +15 -2
  132. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  134. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  135. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  140. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  150. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  152. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  154. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +15 -0
  158. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -0
  159. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route_client-reference-manifest.js +1 -0
  160. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  169. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -0
  187. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -0
  188. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route_client-reference-manifest.js +1 -0
  189. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/health/route.js +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  216. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/metrics/route.js +2 -2
  230. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  296. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -0
  316. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -0
  317. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route_client-reference-manifest.js +1 -0
  318. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  319. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -0
  333. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -0
  334. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route_client-reference-manifest.js +1 -0
  335. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  339. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  341. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  345. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js +1 -1
  346. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  347. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  353. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  357. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  358. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  359. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  360. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  361. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  362. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  363. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  364. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  365. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
  366. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  367. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  368. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  369. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  370. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  371. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  372. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  373. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  374. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  375. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  376. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  377. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  378. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  379. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  380. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  381. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  382. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  383. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  384. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  385. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  386. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  387. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  388. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  389. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  390. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  391. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  392. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  393. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  394. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  395. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  396. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  397. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  398. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  399. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  400. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  401. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  402. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  403. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  404. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  405. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  406. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  407. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  408. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  409. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  410. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  411. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  412. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  413. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  414. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  415. package/cli/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  416. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  417. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js +1 -1
  418. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  419. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js +1 -1
  420. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  421. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js +1 -1
  422. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  423. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js +1 -1
  424. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  425. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js +1 -1
  426. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  427. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js +1 -1
  428. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  429. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js +2 -2
  430. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  431. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js +1 -1
  432. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  433. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  434. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  435. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  436. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  437. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  438. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  439. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  440. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  441. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  442. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  443. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  444. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  445. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  446. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  447. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  448. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  449. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  450. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  451. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  452. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  453. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  454. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  455. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  456. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  457. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  458. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  459. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -0
  460. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -0
  461. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route_client-reference-manifest.js +1 -0
  462. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  463. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  464. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  465. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  466. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  467. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  468. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  469. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  470. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  471. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  472. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  473. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  474. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  475. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  476. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  477. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  478. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  479. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  480. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  481. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  482. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  483. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  484. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  485. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  486. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  487. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  488. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  489. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  490. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  491. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  492. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  493. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  494. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  495. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  496. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  497. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  498. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  499. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  500. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  501. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  502. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  503. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  504. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  505. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  506. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  507. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  508. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  509. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  510. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  511. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  512. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -0
  513. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -0
  514. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route_client-reference-manifest.js +1 -0
  515. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -0
  516. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -0
  517. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route_client-reference-manifest.js +1 -0
  518. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -0
  519. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -0
  520. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route_client-reference-manifest.js +1 -0
  521. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -0
  522. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -0
  523. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route_client-reference-manifest.js +1 -0
  524. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  525. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  526. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  527. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  528. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  529. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  530. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  531. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  532. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  533. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  534. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  535. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  536. package/cli/app/.next-cli-build/server/app/callback/page.js +2 -2
  537. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  538. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  539. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  540. package/cli/app/.next-cli-build/server/app/callback.rsc +4 -4
  541. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  542. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  543. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  544. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  545. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  546. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  547. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  548. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +6 -6
  549. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  550. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  551. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  552. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  553. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +6 -6
  554. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  555. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +4 -4
  556. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +2 -2
  557. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  558. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  559. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  560. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  561. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  562. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  563. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  564. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  565. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  566. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  567. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  568. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  569. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  570. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  571. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  572. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  573. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  574. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  575. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  576. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  577. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  578. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  579. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  580. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  581. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  582. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  583. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  584. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  585. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  586. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  587. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  588. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +6 -6
  589. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  590. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  591. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  592. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  593. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +6 -6
  594. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  595. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +4 -4
  596. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +2 -2
  597. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  598. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  599. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  600. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  601. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  602. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  603. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  604. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  605. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  606. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  607. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  608. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  609. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  610. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  611. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  612. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  613. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  614. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  615. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  616. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  617. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  618. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  619. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  620. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  621. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  622. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  623. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  624. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  625. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  626. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  627. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  628. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  629. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +6 -6
  630. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  631. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
  632. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  633. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  634. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +6 -6
  635. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
  636. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +4 -4
  637. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +2 -2
  638. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  639. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  640. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  641. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  642. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  643. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  644. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  645. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  646. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  647. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  648. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  649. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  650. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  651. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  652. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  653. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  654. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  655. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  656. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  657. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  658. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  659. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  660. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  661. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  662. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  663. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  664. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  665. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  666. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  667. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  668. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  669. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  670. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  671. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  672. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  673. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  674. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  675. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  676. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  677. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  678. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  679. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  680. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  681. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  682. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  683. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  684. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  685. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  686. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  687. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  688. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  689. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  690. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  691. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  692. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  693. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  694. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  695. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  696. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  697. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  698. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  699. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  700. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  701. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  702. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
  703. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
  704. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  705. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  706. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  707. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  708. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  709. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  710. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -0
  711. package/cli/app/.next-cli-build/server/app/dashboard/skills.meta +17 -0
  712. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +26 -0
  713. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +9 -0
  714. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +5 -0
  715. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
  716. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +6 -0
  717. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +26 -0
  718. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +6 -0
  719. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +8 -0
  720. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +5 -0
  721. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  722. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  723. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  724. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  725. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  726. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  727. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  728. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  729. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  730. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  731. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  732. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  733. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  734. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  735. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  736. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  737. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  738. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  739. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  740. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  741. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  742. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  743. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  744. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  745. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  746. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  747. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  748. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  749. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  750. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  751. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  752. package/cli/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  753. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  754. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  755. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  756. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  757. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  758. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  759. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  760. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  761. package/cli/app/.next-cli-build/server/app/index.rsc +4 -4
  762. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  763. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  764. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  765. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  766. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  767. package/cli/app/.next-cli-build/server/app/landing/page.js +2 -2
  768. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  769. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  770. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  771. package/cli/app/.next-cli-build/server/app/landing.rsc +5 -5
  772. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  773. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  774. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  775. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  776. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  777. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  778. package/cli/app/.next-cli-build/server/app/login/page.js +2 -2
  779. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  780. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  781. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  782. package/cli/app/.next-cli-build/server/app/login.rsc +5 -5
  783. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  784. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  785. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  786. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  787. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  788. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  789. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  790. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  791. package/cli/app/.next-cli-build/server/app/page.js +2 -2
  792. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  793. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  794. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js +7 -0
  795. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -0
  796. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route_client-reference-manifest.js +1 -0
  797. package/cli/app/.next-cli-build/server/app-paths-manifest.json +26 -15
  798. package/cli/app/.next-cli-build/server/chunks/1051.js +1 -1
  799. package/cli/app/.next-cli-build/server/chunks/1131.js +1 -1
  800. package/cli/app/.next-cli-build/server/chunks/2594.js +1 -0
  801. package/cli/app/.next-cli-build/server/chunks/3110.js +2 -2
  802. package/cli/app/.next-cli-build/server/chunks/3245.js +1 -1
  803. package/cli/app/.next-cli-build/server/chunks/3949.js +1 -1
  804. package/cli/app/.next-cli-build/server/chunks/3999.js +2 -2
  805. package/cli/app/.next-cli-build/server/chunks/4055.js +1 -1
  806. package/cli/app/.next-cli-build/server/chunks/412.js +2 -2
  807. package/cli/app/.next-cli-build/server/chunks/4177.js +1 -1
  808. package/cli/app/.next-cli-build/server/chunks/4404.js +1 -1
  809. package/cli/app/.next-cli-build/server/chunks/4566.js +1 -1
  810. package/cli/app/.next-cli-build/server/chunks/4621.js +1 -1
  811. package/cli/app/.next-cli-build/server/chunks/4632.js +1 -1
  812. package/cli/app/.next-cli-build/server/chunks/4720.js +1 -1
  813. package/cli/app/.next-cli-build/server/chunks/4721.js +2 -2
  814. package/cli/app/.next-cli-build/server/chunks/4827.js +1 -1
  815. package/cli/app/.next-cli-build/server/chunks/5024.js +1 -1
  816. package/cli/app/.next-cli-build/server/chunks/5217.js +1 -1
  817. package/cli/app/.next-cli-build/server/chunks/5272.js +1 -0
  818. package/cli/app/.next-cli-build/server/chunks/5295.js +1 -1
  819. package/cli/app/.next-cli-build/server/chunks/5307.js +1 -1
  820. package/cli/app/.next-cli-build/server/chunks/5330.js +4 -4
  821. package/cli/app/.next-cli-build/server/chunks/5436.js +2 -2
  822. package/cli/app/.next-cli-build/server/chunks/5470.js +1 -1
  823. package/cli/app/.next-cli-build/server/chunks/5681.js +1 -1
  824. package/cli/app/.next-cli-build/server/chunks/5800.js +1 -1
  825. package/cli/app/.next-cli-build/server/chunks/5949.js +2 -2
  826. package/cli/app/.next-cli-build/server/chunks/6306.js +1 -0
  827. package/cli/app/.next-cli-build/server/chunks/6492.js +1 -1
  828. package/cli/app/.next-cli-build/server/chunks/6652.js +1 -1
  829. package/cli/app/.next-cli-build/server/chunks/{2607.js → 6814.js} +44 -30
  830. package/cli/app/.next-cli-build/server/chunks/7239.js +1 -1
  831. package/cli/app/.next-cli-build/server/chunks/7276.js +1 -1
  832. package/cli/app/.next-cli-build/server/chunks/7319.js +46 -46
  833. package/cli/app/.next-cli-build/server/chunks/7774.js +26 -26
  834. package/cli/app/.next-cli-build/server/chunks/8028.js +1 -1
  835. package/cli/app/.next-cli-build/server/chunks/8255.js +1 -1
  836. package/cli/app/.next-cli-build/server/chunks/8274.js +1 -1
  837. package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
  838. package/cli/app/.next-cli-build/server/chunks/8371.js +1 -1
  839. package/cli/app/.next-cli-build/server/chunks/8895.js +2 -2
  840. package/cli/app/.next-cli-build/server/chunks/891.js +1 -1
  841. package/cli/app/.next-cli-build/server/chunks/8910.js +2 -0
  842. package/cli/app/.next-cli-build/server/chunks/9048.js +1 -1
  843. package/cli/app/.next-cli-build/server/chunks/9489.js +1 -1
  844. package/cli/app/.next-cli-build/server/chunks/9609.js +1 -1
  845. package/cli/app/.next-cli-build/server/functions-config-manifest.json +3 -0
  846. package/cli/app/.next-cli-build/server/instrumentation.js +1 -1
  847. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  848. package/cli/app/.next-cli-build/server/middleware.js +2 -2
  849. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  850. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  851. package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  852. package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  853. package/cli/app/.next-cli-build/static/N33cGp0GHLlYx_2SN4jOL/_buildManifest.js +1 -0
  854. package/cli/app/.next-cli-build/static/chunks/5013-0a29f80c29f9d1df.js +70 -0
  855. package/cli/app/.next-cli-build/static/chunks/523-6328fbe601833f42.js +3 -0
  856. package/cli/app/.next-cli-build/static/chunks/{5497-6ca1837aad0c6a5d.js → 5497-2f2c675f9d614163.js} +2 -2
  857. package/cli/app/.next-cli-build/static/chunks/620-d66c99f6d178b897.js +1 -0
  858. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-bd827e591cfc8125.js → page-d0eab68d26a6c8dd.js} +1 -1
  859. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-80ae115554408efe.js → page-ad3a80f25ab53e9e.js} +1 -1
  860. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-c3d7b126bbcdeaa2.js +1 -0
  861. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-f12cb6a2bcaec9fe.js +58 -0
  862. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-146309ef654004c5.js → page-582192ff2deb4283.js} +2 -2
  863. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-9216318a6a117917.js → page-31ff11d0e98b18b4.js} +1 -1
  864. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-be7d9bbb3ce0bb40.js +3 -0
  865. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-7f25296cd5a4eeab.js +1 -0
  866. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-0e14e25d17dbce65.js +1 -0
  867. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-70d91c4985cf0c22.js +1 -0
  868. package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-fa930ad780d3fadd.js +1 -0
  869. package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-fa930ad780d3fadd.js +1 -0
  870. package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-fa930ad780d3fadd.js +1 -0
  871. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-fa930ad780d3fadd.js +1 -0
  872. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-fa930ad780d3fadd.js +1 -0
  873. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-fa930ad780d3fadd.js +1 -0
  874. package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-fa930ad780d3fadd.js +1 -0
  875. package/cli/app/.next-cli-build/static/chunks/app/api/cache/stats/route-fa930ad780d3fadd.js +1 -0
  876. package/cli/app/.next-cli-build/static/chunks/app/api/changelog/route-fa930ad780d3fadd.js +1 -0
  877. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-fa930ad780d3fadd.js +1 -0
  878. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-fa930ad780d3fadd.js +1 -0
  879. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-fa930ad780d3fadd.js +1 -0
  880. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-fa930ad780d3fadd.js +1 -0
  881. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-fa930ad780d3fadd.js +1 -0
  882. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-fa930ad780d3fadd.js +1 -0
  883. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-fa930ad780d3fadd.js +1 -0
  884. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-fa930ad780d3fadd.js +1 -0
  885. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-fa930ad780d3fadd.js +1 -0
  886. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-fa930ad780d3fadd.js +1 -0
  887. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-fa930ad780d3fadd.js +1 -0
  888. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-fa930ad780d3fadd.js +1 -0
  889. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-fa930ad780d3fadd.js +1 -0
  890. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-fa930ad780d3fadd.js +1 -0
  891. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-fa930ad780d3fadd.js +1 -0
  892. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-fa930ad780d3fadd.js +1 -0
  893. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-fa930ad780d3fadd.js +1 -0
  894. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-fa930ad780d3fadd.js +1 -0
  895. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-fa930ad780d3fadd.js +1 -0
  896. package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-fa930ad780d3fadd.js +1 -0
  897. package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-fa930ad780d3fadd.js +1 -0
  898. package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-fa930ad780d3fadd.js +1 -0
  899. package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-fa930ad780d3fadd.js +1 -0
  900. package/cli/app/.next-cli-build/static/chunks/app/api/context/route-fa930ad780d3fadd.js +1 -0
  901. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/chat/completions/route-fa930ad780d3fadd.js +1 -0
  902. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/cli-tools/keys/route-fa930ad780d3fadd.js +1 -0
  903. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/media/[operation]/route-fa930ad780d3fadd.js +1 -0
  904. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/media/videos/[id]/route-fa930ad780d3fadd.js +1 -0
  905. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-fa930ad780d3fadd.js +1 -0
  906. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-fa930ad780d3fadd.js +1 -0
  907. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-fa930ad780d3fadd.js +1 -0
  908. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/start/route-fa930ad780d3fadd.js +1 -0
  909. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/status/route-fa930ad780d3fadd.js +1 -0
  910. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-fa930ad780d3fadd.js +1 -0
  911. package/cli/app/.next-cli-build/static/chunks/app/api/health/ready/route-fa930ad780d3fadd.js +1 -0
  912. package/cli/app/.next-cli-build/static/chunks/app/api/health/route-fa930ad780d3fadd.js +1 -0
  913. package/cli/app/.next-cli-build/static/chunks/app/api/init/route-fa930ad780d3fadd.js +1 -0
  914. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-fa930ad780d3fadd.js +1 -0
  915. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-fa930ad780d3fadd.js +1 -0
  916. package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-fa930ad780d3fadd.js +1 -0
  917. package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-fa930ad780d3fadd.js +1 -0
  918. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-fa930ad780d3fadd.js +1 -0
  919. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-fa930ad780d3fadd.js +1 -0
  920. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-fa930ad780d3fadd.js +1 -0
  921. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-fa930ad780d3fadd.js +1 -0
  922. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-fa930ad780d3fadd.js +1 -0
  923. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-fa930ad780d3fadd.js +1 -0
  924. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-fa930ad780d3fadd.js +1 -0
  925. package/cli/app/.next-cli-build/static/chunks/app/api/metrics/route-fa930ad780d3fadd.js +1 -0
  926. package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-fa930ad780d3fadd.js +1 -0
  927. package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-fa930ad780d3fadd.js +1 -0
  928. package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-fa930ad780d3fadd.js +1 -0
  929. package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-fa930ad780d3fadd.js +1 -0
  930. package/cli/app/.next-cli-build/static/chunks/app/api/models/route-fa930ad780d3fadd.js +1 -0
  931. package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-fa930ad780d3fadd.js +1 -0
  932. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-fa930ad780d3fadd.js +1 -0
  933. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +1 -0
  934. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +1 -0
  935. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-fa930ad780d3fadd.js +1 -0
  936. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-fa930ad780d3fadd.js +1 -0
  937. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-fa930ad780d3fadd.js +1 -0
  938. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +1 -0
  939. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +1 -0
  940. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route-fa930ad780d3fadd.js +1 -0
  941. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/latest/route-fa930ad780d3fadd.js +1 -0
  942. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/route-fa930ad780d3fadd.js +1 -0
  943. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +1 -0
  944. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +1 -0
  945. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-fa930ad780d3fadd.js +1 -0
  946. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-fa930ad780d3fadd.js +1 -0
  947. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-fa930ad780d3fadd.js +1 -0
  948. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-fa930ad780d3fadd.js +1 -0
  949. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-fa930ad780d3fadd.js +1 -0
  950. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +1 -0
  951. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +1 -0
  952. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route-fa930ad780d3fadd.js +1 -0
  953. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/latest/route-fa930ad780d3fadd.js +1 -0
  954. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-fa930ad780d3fadd.js +1 -0
  955. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-token/route-fa930ad780d3fadd.js +1 -0
  956. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/quota-cookie/route-fa930ad780d3fadd.js +1 -0
  957. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-fa930ad780d3fadd.js +1 -0
  958. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-fa930ad780d3fadd.js +1 -0
  959. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-fa930ad780d3fadd.js +1 -0
  960. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-fa930ad780d3fadd.js +1 -0
  961. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +1 -0
  962. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +1 -0
  963. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/route-fa930ad780d3fadd.js +1 -0
  964. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/latest/route-fa930ad780d3fadd.js +1 -0
  965. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-fa930ad780d3fadd.js +1 -0
  966. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-token/route-fa930ad780d3fadd.js +1 -0
  967. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-fa930ad780d3fadd.js +1 -0
  968. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-fa930ad780d3fadd.js +1 -0
  969. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-fa930ad780d3fadd.js +1 -0
  970. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +1 -0
  971. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +1 -0
  972. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-fa930ad780d3fadd.js +1 -0
  973. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-fa930ad780d3fadd.js +1 -0
  974. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-fa930ad780d3fadd.js +1 -0
  975. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-fa930ad780d3fadd.js +1 -0
  976. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-fa930ad780d3fadd.js +1 -0
  977. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-fa930ad780d3fadd.js +1 -0
  978. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-fa930ad780d3fadd.js +1 -0
  979. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +1 -0
  980. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +1 -0
  981. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-fa930ad780d3fadd.js +1 -0
  982. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-fa930ad780d3fadd.js +1 -0
  983. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-fa930ad780d3fadd.js +1 -0
  984. package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-fa930ad780d3fadd.js +1 -0
  985. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-fa930ad780d3fadd.js +1 -0
  986. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-fa930ad780d3fadd.js +1 -0
  987. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-fa930ad780d3fadd.js +1 -0
  988. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-fa930ad780d3fadd.js +1 -0
  989. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-fa930ad780d3fadd.js +1 -0
  990. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-fa930ad780d3fadd.js +1 -0
  991. package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-fa930ad780d3fadd.js +1 -0
  992. package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-fa930ad780d3fadd.js +1 -0
  993. package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-fa930ad780d3fadd.js +1 -0
  994. package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-fa930ad780d3fadd.js +1 -0
  995. package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-fa930ad780d3fadd.js +1 -0
  996. package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-fa930ad780d3fadd.js +1 -0
  997. package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-fa930ad780d3fadd.js +1 -0
  998. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-fa930ad780d3fadd.js +1 -0
  999. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-fa930ad780d3fadd.js +1 -0
  1000. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-fa930ad780d3fadd.js +1 -0
  1001. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-fa930ad780d3fadd.js +1 -0
  1002. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-fa930ad780d3fadd.js +1 -0
  1003. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-fa930ad780d3fadd.js +1 -0
  1004. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-fa930ad780d3fadd.js +1 -0
  1005. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-fa930ad780d3fadd.js +1 -0
  1006. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-fa930ad780d3fadd.js +1 -0
  1007. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-fa930ad780d3fadd.js +1 -0
  1008. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-fa930ad780d3fadd.js +1 -0
  1009. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-fa930ad780d3fadd.js +1 -0
  1010. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-fa930ad780d3fadd.js +1 -0
  1011. package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-fa930ad780d3fadd.js +1 -0
  1012. package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-fa930ad780d3fadd.js +1 -0
  1013. package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-fa930ad780d3fadd.js +1 -0
  1014. package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-fa930ad780d3fadd.js +1 -0
  1015. package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-fa930ad780d3fadd.js +1 -0
  1016. package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-fa930ad780d3fadd.js +1 -0
  1017. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/setup/route-fa930ad780d3fadd.js +1 -0
  1018. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/status/route-fa930ad780d3fadd.js +1 -0
  1019. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/unlock/route-fa930ad780d3fadd.js +1 -0
  1020. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/input/route-fa930ad780d3fadd.js +1 -0
  1021. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/resize/route-fa930ad780d3fadd.js +1 -0
  1022. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/route-fa930ad780d3fadd.js +1 -0
  1023. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/stream/route-fa930ad780d3fadd.js +1 -0
  1024. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/route-fa930ad780d3fadd.js +1 -0
  1025. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-fa930ad780d3fadd.js +1 -0
  1026. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-fa930ad780d3fadd.js +1 -0
  1027. package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-fa930ad780d3fadd.js +1 -0
  1028. package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-fa930ad780d3fadd.js +1 -0
  1029. package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-fa930ad780d3fadd.js +1 -0
  1030. package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-fa930ad780d3fadd.js +1 -0
  1031. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-fa930ad780d3fadd.js +1 -0
  1032. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-fa930ad780d3fadd.js +1 -0
  1033. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-fa930ad780d3fadd.js +1 -0
  1034. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-fa930ad780d3fadd.js +1 -0
  1035. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-fa930ad780d3fadd.js +1 -0
  1036. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-fa930ad780d3fadd.js +1 -0
  1037. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-fa930ad780d3fadd.js +1 -0
  1038. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-fa930ad780d3fadd.js +1 -0
  1039. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-fa930ad780d3fadd.js +1 -0
  1040. package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-fa930ad780d3fadd.js +1 -0
  1041. package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-fa930ad780d3fadd.js +1 -0
  1042. package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-fa930ad780d3fadd.js +1 -0
  1043. package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-fa930ad780d3fadd.js +1 -0
  1044. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-fa930ad780d3fadd.js +1 -0
  1045. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-fa930ad780d3fadd.js +1 -0
  1046. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-fa930ad780d3fadd.js +1 -0
  1047. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-fa930ad780d3fadd.js +1 -0
  1048. package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-fa930ad780d3fadd.js +1 -0
  1049. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-fa930ad780d3fadd.js +1 -0
  1050. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-fa930ad780d3fadd.js +1 -0
  1051. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-fa930ad780d3fadd.js +1 -0
  1052. package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-fa930ad780d3fadd.js +1 -0
  1053. package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-fa930ad780d3fadd.js +1 -0
  1054. package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-fa930ad780d3fadd.js +1 -0
  1055. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-fa930ad780d3fadd.js +1 -0
  1056. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-fa930ad780d3fadd.js +1 -0
  1057. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-fa930ad780d3fadd.js +1 -0
  1058. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-fa930ad780d3fadd.js +1 -0
  1059. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-fa930ad780d3fadd.js +1 -0
  1060. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-fa930ad780d3fadd.js +1 -0
  1061. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-fa930ad780d3fadd.js +1 -0
  1062. package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-fa930ad780d3fadd.js +1 -0
  1063. package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-fa930ad780d3fadd.js +1 -0
  1064. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-fa930ad780d3fadd.js +1 -0
  1065. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-fa930ad780d3fadd.js +1 -0
  1066. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-fa930ad780d3fadd.js +1 -0
  1067. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-fa930ad780d3fadd.js +1 -0
  1068. package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-fa930ad780d3fadd.js +1 -0
  1069. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-fa930ad780d3fadd.js +1 -0
  1070. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-fa930ad780d3fadd.js +1 -0
  1071. package/cli/app/.next-cli-build/static/chunks/app/api/version/route-fa930ad780d3fadd.js +1 -0
  1072. package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-fa930ad780d3fadd.js +1 -0
  1073. package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-fa930ad780d3fadd.js +1 -0
  1074. package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-fa930ad780d3fadd.js +1 -0
  1075. package/cli/app/.next-cli-build/static/chunks/app/page-fa930ad780d3fadd.js +1 -0
  1076. package/cli/app/.next-cli-build/static/chunks/app/provider-icons/[provider]/route-fa930ad780d3fadd.js +1 -0
  1077. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-fa930ad780d3fadd.js +1 -0
  1078. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-fa930ad780d3fadd.js +1 -0
  1079. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-fa930ad780d3fadd.js +1 -0
  1080. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-fa930ad780d3fadd.js +1 -0
  1081. package/cli/app/.next-cli-build/static/css/0bac84af14d15099.css +1 -0
  1082. package/cli/app/CHANGELOG.md +22 -0
  1083. package/cli/app/package.json +5 -4
  1084. package/cli/app/public/providers/nebius.png +0 -0
  1085. package/cli/app/public/providers/siliconflow.png +0 -0
  1086. package/cli/app/server.js +1 -1
  1087. package/cli/app/src/lib/db/migrate.js +8 -2
  1088. package/cli/cli.js +14 -0
  1089. package/cli/package.json +1 -1
  1090. package/cli/src/cli/commands/xaiVideo.js +300 -0
  1091. package/package.json +5 -4
  1092. package/cli/app/.next-cli-build/static/EEihXestozORJ8znRIdjp/_buildManifest.js +0 -1
  1093. package/cli/app/.next-cli-build/static/chunks/523-24d141baca2cf3ac.js +0 -3
  1094. package/cli/app/.next-cli-build/static/chunks/620-249977f9b2e0b7fa.js +0 -1
  1095. package/cli/app/.next-cli-build/static/chunks/6617-24b58186724a353a.js +0 -56
  1096. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a24beb4d9b7bc1c2.js +0 -1
  1097. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-a17208b586055f9b.js +0 -59
  1098. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-5482865f680033fb.js +0 -3
  1099. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-7abc7eb028939fe1.js +0 -1
  1100. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-be41e2947cffd2de.js +0 -1
  1101. package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-019be2a89a04d0df.js +0 -1
  1102. package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-019be2a89a04d0df.js +0 -1
  1103. package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-019be2a89a04d0df.js +0 -1
  1104. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-019be2a89a04d0df.js +0 -1
  1105. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-019be2a89a04d0df.js +0 -1
  1106. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-019be2a89a04d0df.js +0 -1
  1107. package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-019be2a89a04d0df.js +0 -1
  1108. package/cli/app/.next-cli-build/static/chunks/app/api/cache/stats/route-019be2a89a04d0df.js +0 -1
  1109. package/cli/app/.next-cli-build/static/chunks/app/api/changelog/route-019be2a89a04d0df.js +0 -1
  1110. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-019be2a89a04d0df.js +0 -1
  1111. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-019be2a89a04d0df.js +0 -1
  1112. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-019be2a89a04d0df.js +0 -1
  1113. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-019be2a89a04d0df.js +0 -1
  1114. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-019be2a89a04d0df.js +0 -1
  1115. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-019be2a89a04d0df.js +0 -1
  1116. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-019be2a89a04d0df.js +0 -1
  1117. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-019be2a89a04d0df.js +0 -1
  1118. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-019be2a89a04d0df.js +0 -1
  1119. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-019be2a89a04d0df.js +0 -1
  1120. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-019be2a89a04d0df.js +0 -1
  1121. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-019be2a89a04d0df.js +0 -1
  1122. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-019be2a89a04d0df.js +0 -1
  1123. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-019be2a89a04d0df.js +0 -1
  1124. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-019be2a89a04d0df.js +0 -1
  1125. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-019be2a89a04d0df.js +0 -1
  1126. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-019be2a89a04d0df.js +0 -1
  1127. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-019be2a89a04d0df.js +0 -1
  1128. package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-019be2a89a04d0df.js +0 -1
  1129. package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-019be2a89a04d0df.js +0 -1
  1130. package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-019be2a89a04d0df.js +0 -1
  1131. package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-019be2a89a04d0df.js +0 -1
  1132. package/cli/app/.next-cli-build/static/chunks/app/api/context/route-019be2a89a04d0df.js +0 -1
  1133. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/chat/completions/route-019be2a89a04d0df.js +0 -1
  1134. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/cli-tools/keys/route-019be2a89a04d0df.js +0 -1
  1135. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/media/[operation]/route-019be2a89a04d0df.js +0 -1
  1136. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-019be2a89a04d0df.js +0 -1
  1137. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-019be2a89a04d0df.js +0 -1
  1138. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-019be2a89a04d0df.js +0 -1
  1139. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/start/route-019be2a89a04d0df.js +0 -1
  1140. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/status/route-019be2a89a04d0df.js +0 -1
  1141. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-019be2a89a04d0df.js +0 -1
  1142. package/cli/app/.next-cli-build/static/chunks/app/api/health/ready/route-019be2a89a04d0df.js +0 -1
  1143. package/cli/app/.next-cli-build/static/chunks/app/api/health/route-019be2a89a04d0df.js +0 -1
  1144. package/cli/app/.next-cli-build/static/chunks/app/api/init/route-019be2a89a04d0df.js +0 -1
  1145. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-019be2a89a04d0df.js +0 -1
  1146. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-019be2a89a04d0df.js +0 -1
  1147. package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-019be2a89a04d0df.js +0 -1
  1148. package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-019be2a89a04d0df.js +0 -1
  1149. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-019be2a89a04d0df.js +0 -1
  1150. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-019be2a89a04d0df.js +0 -1
  1151. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-019be2a89a04d0df.js +0 -1
  1152. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-019be2a89a04d0df.js +0 -1
  1153. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-019be2a89a04d0df.js +0 -1
  1154. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-019be2a89a04d0df.js +0 -1
  1155. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-019be2a89a04d0df.js +0 -1
  1156. package/cli/app/.next-cli-build/static/chunks/app/api/metrics/route-019be2a89a04d0df.js +0 -1
  1157. package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-019be2a89a04d0df.js +0 -1
  1158. package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-019be2a89a04d0df.js +0 -1
  1159. package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-019be2a89a04d0df.js +0 -1
  1160. package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-019be2a89a04d0df.js +0 -1
  1161. package/cli/app/.next-cli-build/static/chunks/app/api/models/route-019be2a89a04d0df.js +0 -1
  1162. package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-019be2a89a04d0df.js +0 -1
  1163. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-019be2a89a04d0df.js +0 -1
  1164. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-019be2a89a04d0df.js +0 -1
  1165. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-019be2a89a04d0df.js +0 -1
  1166. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-019be2a89a04d0df.js +0 -1
  1167. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-019be2a89a04d0df.js +0 -1
  1168. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-019be2a89a04d0df.js +0 -1
  1169. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route-019be2a89a04d0df.js +0 -1
  1170. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route-019be2a89a04d0df.js +0 -1
  1171. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route-019be2a89a04d0df.js +0 -1
  1172. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/latest/route-019be2a89a04d0df.js +0 -1
  1173. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/route-019be2a89a04d0df.js +0 -1
  1174. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-019be2a89a04d0df.js +0 -1
  1175. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-019be2a89a04d0df.js +0 -1
  1176. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-019be2a89a04d0df.js +0 -1
  1177. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-019be2a89a04d0df.js +0 -1
  1178. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-019be2a89a04d0df.js +0 -1
  1179. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-019be2a89a04d0df.js +0 -1
  1180. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-019be2a89a04d0df.js +0 -1
  1181. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route-019be2a89a04d0df.js +0 -1
  1182. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route-019be2a89a04d0df.js +0 -1
  1183. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route-019be2a89a04d0df.js +0 -1
  1184. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/latest/route-019be2a89a04d0df.js +0 -1
  1185. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-019be2a89a04d0df.js +0 -1
  1186. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-token/route-019be2a89a04d0df.js +0 -1
  1187. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/quota-cookie/route-019be2a89a04d0df.js +0 -1
  1188. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-019be2a89a04d0df.js +0 -1
  1189. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-019be2a89a04d0df.js +0 -1
  1190. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-019be2a89a04d0df.js +0 -1
  1191. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-019be2a89a04d0df.js +0 -1
  1192. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route-019be2a89a04d0df.js +0 -1
  1193. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route-019be2a89a04d0df.js +0 -1
  1194. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/route-019be2a89a04d0df.js +0 -1
  1195. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/latest/route-019be2a89a04d0df.js +0 -1
  1196. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-019be2a89a04d0df.js +0 -1
  1197. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-token/route-019be2a89a04d0df.js +0 -1
  1198. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-019be2a89a04d0df.js +0 -1
  1199. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-019be2a89a04d0df.js +0 -1
  1200. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-019be2a89a04d0df.js +0 -1
  1201. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-019be2a89a04d0df.js +0 -1
  1202. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-019be2a89a04d0df.js +0 -1
  1203. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-019be2a89a04d0df.js +0 -1
  1204. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-019be2a89a04d0df.js +0 -1
  1205. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-019be2a89a04d0df.js +0 -1
  1206. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-019be2a89a04d0df.js +0 -1
  1207. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-019be2a89a04d0df.js +0 -1
  1208. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-019be2a89a04d0df.js +0 -1
  1209. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-019be2a89a04d0df.js +0 -1
  1210. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-019be2a89a04d0df.js +0 -1
  1211. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-019be2a89a04d0df.js +0 -1
  1212. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-019be2a89a04d0df.js +0 -1
  1213. package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-019be2a89a04d0df.js +0 -1
  1214. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-019be2a89a04d0df.js +0 -1
  1215. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-019be2a89a04d0df.js +0 -1
  1216. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-019be2a89a04d0df.js +0 -1
  1217. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-019be2a89a04d0df.js +0 -1
  1218. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-019be2a89a04d0df.js +0 -1
  1219. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-019be2a89a04d0df.js +0 -1
  1220. package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-019be2a89a04d0df.js +0 -1
  1221. package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-019be2a89a04d0df.js +0 -1
  1222. package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-019be2a89a04d0df.js +0 -1
  1223. package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-019be2a89a04d0df.js +0 -1
  1224. package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-019be2a89a04d0df.js +0 -1
  1225. package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-019be2a89a04d0df.js +0 -1
  1226. package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-019be2a89a04d0df.js +0 -1
  1227. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-019be2a89a04d0df.js +0 -1
  1228. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-019be2a89a04d0df.js +0 -1
  1229. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-019be2a89a04d0df.js +0 -1
  1230. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-019be2a89a04d0df.js +0 -1
  1231. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-019be2a89a04d0df.js +0 -1
  1232. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-019be2a89a04d0df.js +0 -1
  1233. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-019be2a89a04d0df.js +0 -1
  1234. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-019be2a89a04d0df.js +0 -1
  1235. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-019be2a89a04d0df.js +0 -1
  1236. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-019be2a89a04d0df.js +0 -1
  1237. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-019be2a89a04d0df.js +0 -1
  1238. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-019be2a89a04d0df.js +0 -1
  1239. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-019be2a89a04d0df.js +0 -1
  1240. package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-019be2a89a04d0df.js +0 -1
  1241. package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-019be2a89a04d0df.js +0 -1
  1242. package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-019be2a89a04d0df.js +0 -1
  1243. package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-019be2a89a04d0df.js +0 -1
  1244. package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-019be2a89a04d0df.js +0 -1
  1245. package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-019be2a89a04d0df.js +0 -1
  1246. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/setup/route-019be2a89a04d0df.js +0 -1
  1247. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/status/route-019be2a89a04d0df.js +0 -1
  1248. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/unlock/route-019be2a89a04d0df.js +0 -1
  1249. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/input/route-019be2a89a04d0df.js +0 -1
  1250. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/resize/route-019be2a89a04d0df.js +0 -1
  1251. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/route-019be2a89a04d0df.js +0 -1
  1252. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/stream/route-019be2a89a04d0df.js +0 -1
  1253. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/route-019be2a89a04d0df.js +0 -1
  1254. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-019be2a89a04d0df.js +0 -1
  1255. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-019be2a89a04d0df.js +0 -1
  1256. package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-019be2a89a04d0df.js +0 -1
  1257. package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-019be2a89a04d0df.js +0 -1
  1258. package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-019be2a89a04d0df.js +0 -1
  1259. package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-019be2a89a04d0df.js +0 -1
  1260. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-019be2a89a04d0df.js +0 -1
  1261. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-019be2a89a04d0df.js +0 -1
  1262. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-019be2a89a04d0df.js +0 -1
  1263. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-019be2a89a04d0df.js +0 -1
  1264. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-019be2a89a04d0df.js +0 -1
  1265. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-019be2a89a04d0df.js +0 -1
  1266. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-019be2a89a04d0df.js +0 -1
  1267. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-019be2a89a04d0df.js +0 -1
  1268. package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-019be2a89a04d0df.js +0 -1
  1269. package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-019be2a89a04d0df.js +0 -1
  1270. package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-019be2a89a04d0df.js +0 -1
  1271. package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-019be2a89a04d0df.js +0 -1
  1272. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-019be2a89a04d0df.js +0 -1
  1273. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-019be2a89a04d0df.js +0 -1
  1274. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-019be2a89a04d0df.js +0 -1
  1275. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-019be2a89a04d0df.js +0 -1
  1276. package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-019be2a89a04d0df.js +0 -1
  1277. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-019be2a89a04d0df.js +0 -1
  1278. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-019be2a89a04d0df.js +0 -1
  1279. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-019be2a89a04d0df.js +0 -1
  1280. package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-019be2a89a04d0df.js +0 -1
  1281. package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-019be2a89a04d0df.js +0 -1
  1282. package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-019be2a89a04d0df.js +0 -1
  1283. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-019be2a89a04d0df.js +0 -1
  1284. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-019be2a89a04d0df.js +0 -1
  1285. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-019be2a89a04d0df.js +0 -1
  1286. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-019be2a89a04d0df.js +0 -1
  1287. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-019be2a89a04d0df.js +0 -1
  1288. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-019be2a89a04d0df.js +0 -1
  1289. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-019be2a89a04d0df.js +0 -1
  1290. package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-019be2a89a04d0df.js +0 -1
  1291. package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-019be2a89a04d0df.js +0 -1
  1292. package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-019be2a89a04d0df.js +0 -1
  1293. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-019be2a89a04d0df.js +0 -1
  1294. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-019be2a89a04d0df.js +0 -1
  1295. package/cli/app/.next-cli-build/static/chunks/app/api/version/route-019be2a89a04d0df.js +0 -1
  1296. package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-019be2a89a04d0df.js +0 -1
  1297. package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-019be2a89a04d0df.js +0 -1
  1298. package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-019be2a89a04d0df.js +0 -1
  1299. package/cli/app/.next-cli-build/static/chunks/app/page-019be2a89a04d0df.js +0 -1
  1300. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-019be2a89a04d0df.js +0 -1
  1301. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-019be2a89a04d0df.js +0 -1
  1302. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-019be2a89a04d0df.js +0 -1
  1303. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-019be2a89a04d0df.js +0 -1
  1304. package/cli/app/.next-cli-build/static/css/da8bb26878f01d92.css +0 -1
  1305. /package/cli/app/.next-cli-build/static/{EEihXestozORJ8znRIdjp → N33cGp0GHLlYx_2SN4jOL}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{24636:(e,t,s)=>{Promise.resolve().then(s.bind(s,47295))},47295:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var a=s(95155),l=s(12115),r=s(44923),o=s(87256),i=s(39768),n=s(5020),c=s(35497),d=s(11059);s(52679);let m=/^[a-zA-Z0-9_.\-]+$/;function x(){let[e,t]=(0,l.useState)([]),[s,r]=(0,l.useState)(!0),[o,i]=(0,l.useState)(!1),[n,m]=(0,l.useState)(null),[x,u]=(0,l.useState)([]),[b,g]=(0,l.useState)({}),[f,j]=(0,l.useState)(null),[y,v]=(0,l.useState)(1),[w,N]=(0,l.useState)(20),{copied:k,copy:C}=(0,d.C)();(0,l.useEffect)(()=>{S()},[]);let S=async()=>{try{let[e,s,a]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings")]),l=await e.json(),r=await s.json(),o=a.ok?await a.json():{};e.ok&&t((l.combos||[]).filter(e=>!e.kind)),s.ok&&u(r.connections||[]),g(o.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},E=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await S(),i(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},M=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await S(),m(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},O=async s=>{j({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{j(null);try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&t(e.filter(e=>e.id!==s))}catch(e){console.log("Error deleting combo:",e)}}})},$=async(e,t)=>{try{let s={...b};t?s[e]={fallbackStrategy:"round-robin"}:delete s[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})}),g(s)}catch(e){console.log("Error updating combo strategy:",e)}};(0,l.useEffect)(()=>{v(t=>Math.min(t,Math.max(1,Math.ceil(e.length/w))))},[e.length,w]);let _=Math.min(y,Math.max(1,Math.ceil(e.length/w))),D=e.slice((_-1)*w,_*w);return s?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(c.Qv,{}),(0,a.jsx)(c.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold",children:"Combos"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Create model combos with fallback support"})]}),(0,a.jsx)(c.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto",children:"Create Combo"})]}),0===e.length?(0,a.jsx)(c.Zp,{children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,a.jsx)(c.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[D.map(e=>(0,a.jsx)(h,{combo:e,copied:k,onCopy:C,onEdit:()=>m(e),onDelete:()=>O(e.id),roundRobinEnabled:b[e.name]?.fallbackStrategy==="round-robin",onToggleRoundRobin:t=>$(e.name,t)},e.id)),(0,a.jsx)(c.dK,{currentPage:_,pageSize:w,totalItems:e.length,onPageChange:v,onPageSizeChange:e=>{N(e),v(1)}})]}),(0,a.jsx)(p,{isOpen:o,onClose:()=>i(!1),onSave:E,activeProviders:x},"create"),(0,a.jsx)(p,{isOpen:!!n,combo:n,onClose:()=>m(null),onSave:e=>M(n.id,e),activeProviders:x},n?.id||"new"),(0,a.jsx)(c.uo,{isOpen:!!f,onClose:()=>j(null),onConfirm:f?.onConfirm,title:f?.title||"Confirm",message:f?.message,variant:"danger"})]})}function h({combo:e,copied:t,onCopy:s,onEdit:l,onDelete:r,roundRobinEnabled:o,onToggleRoundRobin:i}){return(0,a.jsx)(c.Zp,{padding:"sm",className:"group",children:(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,a.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,t)=>(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1.5 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[220px]",children:e},t)),e.models.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-1.5 rounded-lg bg-black/[0.02] px-2 py-1.5 dark:bg-white/[0.02] sm:justify-start sm:bg-transparent sm:px-0 sm:py-0 sm:dark:bg-transparent",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(c.lM,{size:"sm",checked:o,onChange:i})]}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,a.jsxs)("button",{onClick:t=>{t.stopPropagation(),s(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:t===`combo-${e.id}`?"check":"content_copy"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,a.jsxs)("button",{onClick:l,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",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:r,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]})})}function u({id:e,index:t,model:s,isFirst:r,isLast:n,onEdit:c,onMoveUp:d,onMoveDown:m,onRemove:x}){let{attributes:h,listeners:p,setNodeRef:b,transform:g,isDragging:f}=(0,o.gl)({id:e}),j={transform:i.Ks.Transform.toString(g),opacity:f?.4:1,zIndex:f?999:void 0},[y,v]=(0,l.useState)(!1),[w,N]=(0,l.useState)(s),k=()=>{let e=w.trim();e&&e!==s?c(e):N(s),v(!1)};return(0,a.jsxs)("div",{ref:b,style:j,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${f?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,a.jsx)("button",{...h,...p,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,a.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,a.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,a.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,a.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),y?(0,a.jsx)("input",{autoFocus:!0,value:w,onChange:e=>N(e.target.value),onBlur:k,onKeyDown:e=>{"Enter"===e.key&&k(),"Escape"===e.key&&(N(s),v(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,a.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>v(!0),title:"Click to edit",children:s}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:d,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:m,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,a.jsx)("button",{onClick:x,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function p({isOpen:e,combo:t,onClose:s,onSave:i,activeProviders:d,kindFilter:x=null}){let[h,b]=(0,l.useState)(t?.name||""),[g,f]=(0,l.useState)(t?.models||[]),[j,y]=(0,l.useState)(!1),[v,w]=(0,l.useState)(!1),[N,k]=(0,l.useState)(""),[C,S]=(0,l.useState)({}),E=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:o.JR})),M=g.map((e,t)=>({uid:`item-${t}`,model:e})),O=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();S(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,l.useEffect)(()=>{e&&O()},[e]);let $=e=>e.trim()?m.test(e)?(k(""),!0):(k("Only letters, numbers, -, _ and . allowed"),!1):(k("Name is required"),!1),_=async()=>{$(h)&&(w(!0),await i({name:h.trim(),models:g}),w(!1))},D=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.aF,{isOpen:e,onClose:s,title:D?"Edit Combo":"Create Combo",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.pd,{label:"Combo Name",value:h,onChange:e=>{let t=e.target.value;b(t),t?$(t):k("")},placeholder:"my-combo",error:N}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===g.length?(0,a.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,a.jsx)(r.Mp,{sensors:E,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=M.findIndex(e=>e.uid===t.id),a=M.findIndex(e=>e.uid===s.id);-1!==e&&-1!==a&&f(t=>(0,o.be)(t,e,a))}},modifiers:[n.FN,n.gj],children:(0,a.jsx)(o.gB,{items:M.map(e=>e.uid),strategy:o._G,children:(0,a.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:M.map(({uid:e,model:t},s)=>(0,a.jsx)(u,{id:e,index:s,model:t,isFirst:0===s,isLast:s===M.length-1,onEdit:e=>{let t=[...g];t[s]=e,f(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...g];[t[e-1],t[e]]=[t[e],t[e-1]],f(t)})(s),onMoveDown:()=>(e=>{if(e===g.length-1)return;let t=[...g];[t[e],t[e+1]]=[t[e+1],t[e]],f(t)})(s),onRemove:()=>{f(g.filter((e,t)=>t!==s))}},e))})})}),(0,a.jsxs)("button",{onClick:()=>y(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,a.jsx)(c.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(c.$n,{onClick:_,fullWidth:!0,size:"sm",disabled:!h.trim()||!!N||v,children:v?"Saving...":D?"Save":"Create"})]})]})}),(0,a.jsx)(c.rq,{isOpen:j,onClose:()=>y(!1),onSelect:e=>{g.includes(e.value)||f([...g,e.value])},onDeselect:e=>{f(g.filter(t=>t!==e.value))},activeProviders:d,modelAliases:C,title:"Add Model to Combo",kindFilter:x,addedModelValues:g,closeOnSelect:!1})]})}}},e=>{e.O(0,[2574,3862,3745,3339,7055,620,5497,8441,3794,7358],()=>e(e.s=24636)),_N_E=e.O()}]);
@@ -1,59 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{54909:(e,t,s)=>{Promise.resolve().then(s.bind(s,94588))},62199:(e,t,s)=>{"use strict";s.d(t,{O:()=>a});let r=Object.freeze({"/v1/embeddings":"embeddings","/v1/images/generations":"images","/v1/audio/speech":"speech","/v1/audio/transcriptions":"transcriptions","/v1/search":"search","/v1/web/fetch":"fetch"});function a(e){if("string"!=typeof e)return null;let t=e.indexOf("?"),s=-1===t?e:e.slice(0,t),a=-1===t?"":e.slice(t),l=r[s];return l?`/api/dashboard/media/${l}${a}`:null}},70217:(e,t,s)=>{"use strict";s.d(t,{BU:()=>u,G9:()=>o,d4:()=>d,gJ:()=>r,i2:()=>c});let r=[{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"]}],a={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}},l={policy_suspended:"banned",credential_rejected:"auth_error",reauth_required:"auth_error",authentication:"auth_error",entitlement_or_quota:"quota_exhausted",rate_limited:"rate_limited",permission_denied:"auth_error",upstream_transient:"connection_error"};function n(e){if(!e)return"";if("string"==typeof e)return e.toLowerCase();try{return JSON.stringify(e).toLowerCase()}catch{return String(e).toLowerCase()}}function o(e={},t=Date.now()){let s=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>new Date(e).getTime()).filter(e=>Number.isFinite(e)&&e>t);return s.length>0?new Date(Math.min(...s)).toISOString():null}function i(e,t=""){let s=a[e]||a.unknown;return{key:e,...s,reason:t}}function d(e={}){var t;let s=(t=e).quarantinedAt?i(l[n(t.failureClass)]||"unknown",t.quarantineReason||t.lastError||"Connection is quarantined"):null;if(s)return s;if(!1===e.isActive)return i("disabled","Connection is disabled");if(function(e={}){return null!==o(e)}(e))return i("cooldown","Model cooldown is active");if(function(e){if(!e)return!1;let t=new Date(e).getTime();return Number.isFinite(t)&&t>Date.now()}(e.rateLimitedUntil))return i("rate_limited","Rate limit cooldown is active");let r=n(e.testStatus||e.status),a=n(e.lastErrorType||e.errorType),c=n(e.errorCode||e.statusCode),u=n(e.lastError||e.error),m=`${r} ${a} ${c} ${u}`.trim();return!m||["active","success","ok"].includes(r)?i("active",""):m.includes("ban")||m.includes("suspend")||m.includes("restricted")?i("banned",e.lastError||"Account appears restricted"):m.includes("exhaust")||m.includes("quota exceeded")||m.includes("insufficient_quota")||m.includes("payment required")||"402"===c?i("quota_exhausted",e.lastError||"Quota exhausted"):a.includes("rate_limited")||m.includes("rate limit")||m.includes("too many requests")||"429"===c?i("rate_limited",e.lastError||"Rate limited"):a.includes("auth")||a.includes("token")||m.includes("unauthorized")||m.includes("invalid api key")||m.includes("token invalid")||m.includes("token expired")||m.includes("revoked")||"401"===c||"403"===c?i("auth_error",e.lastError||"Authentication failed"):a.includes("network")||m.includes("network")||m.includes("timeout")||m.includes("fetch failed")||m.includes("econn")||m.includes("dns")||m.includes("proxy")?i("connection_error",e.lastError||"Connection failed"):["error","expired","unavailable","failed"].includes(r)?i("connection_error",e.lastError||e.testStatus||"Connection failed"):i("unknown",e.lastError||e.testStatus||"")}function c(e,t){if(!t||"all"===t)return!0;let s=r.find(e=>e.id===t);return!s||s.keys.includes(d(e).key)}function u(e){return e?.severity==="success"?"success":e?.severity==="error"?"error":"default"}},81277:(e,t,s)=>{"use strict";s.d(t,{c:()=>l});var r=s(12115),a=s(70217);function l(e={}){let[t,s]=(0,r.useState)(null),n=JSON.stringify(Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).sort(([e],[t])=>e.localeCompare(t)));return(0,r.useEffect)(()=>(function(e,t,s={}){let r=s.now||Date.now,l=s.setTimer||globalThis.setTimeout,n=s.clearTimer||globalThis.clearTimeout,o=!1,i=null,d=()=>{if(i=null,o)return;let s=r(),n=(0,a.G9)(e,s);t(n),n&&(i=l(d,Math.min(Math.max(1,new Date(n).getTime()-s+1),0x7fffffff)))};return i=l(d,0),()=>{o=!0,null!==i&&n(i),i=null}})(Object.fromEntries(JSON.parse(n)),s),[n]),t}},94588:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>M});var r=s(95155),a=s(73321),l=s(98500),n=s.n(l),o=s(12115),i=s(35497),d=s(57250),c=s(52679),u=s(28777),m=s(11059),p=s(14051),x=s.n(p),h=s(81277);function b({until:e}){let[t,s]=(0,o.useState)("");return((0,o.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let r=Math.floor(t/1e3);r<60?s(`${r}s`):r<3600?s(`${Math.floor(r/60)}m ${r%60}s`):s(`${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`)};t();let r=setInterval(t,1e3);return()=>clearInterval(r)},[e]),t)?(0,r.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function f({connection:e,proxyPools:t,isOAuth:s,isFirst:a,isLast:l,onMoveUp:n,onMoveDown:d,onToggleActive:c,onUpdateProxy:u,onEdit:m,onDelete:p}){let[x,g]=(0,o.useState)(!1),[y,v]=(0,o.useState)(!1),j=(0,o.useRef)(null),w=new Map((t||[]).map(e=>[e.id,e])),N=e.providerSpecificData?.proxyPoolId||null,k=N?w.get(N):null,C=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,S=!!N||C,$=k?`Pool: ${k.name}`:N?`Pool: ${N} (inactive/missing)`:C?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",_="",T=k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(T)try{let e=new URL(T);_=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{_=T}let E=k?.noProxy||e.providerSpecificData?.connectionNoProxy||"",R=k?.isActive===!0?"success":N||C?"error":"default",O=(0,h.c)(e),A=null!==O;(0,o.useEffect)(()=>{if(!x)return;let e=e=>{j.current&&!j.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[x]);let P="unavailable"!==e.testStatus||A?e.testStatus:"active",I=s?e.name||e.email||e.displayName||"OAuth Account":e.name,L=async e=>{v(!0);try{await u("__none__"===e?null:e)}finally{v(!1),g(!1)}};return(0,r.jsxs)("div",{className:`group flex flex-col gap-3 p-2 rounded-lg sm:flex-row sm:items-center sm:justify-between hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,r.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("button",{onClick:n,disabled:a,className:`p-0.5 rounded ${a?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,r.jsx)("button",{onClick:d,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,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,r.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:s?"lock":"key"}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-medium truncate",children:I}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,r.jsx)(i.Ex,{variant:!1===e.isActive?"default":"active"===P||"success"===P?"success":"error"===P||"expired"===P||"unavailable"===P?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":P||"Unknown"}),S&&(0,r.jsx)(i.Ex,{variant:R,size:"sm",children:"Proxy"}),A&&!1!==e.isActive&&(0,r.jsx)(b,{until:O}),e.lastError&&!1!==e.isActive&&(0,r.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),S&&(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:$,children:$}),_&&(0,r.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:_}),E&&(0,r.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(0,r.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,r.jsxs)("div",{className:"relative",ref:j,children:[(0,r.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${S?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,r.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),x&&(0,r.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,r.jsx)("button",{onClick:()=>L("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!N?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,r.jsx)("button",{onClick:()=>L(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${N===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,r.jsxs)("button",{onClick:m,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,r.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,r.jsxs)("button",{onClick:p,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,r.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,r.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function g({isOpen:e,provider:t,providerName:s,proxyPools:a,onSave:l,onClose:n}){let d="__none__",[c,u]=(0,o.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[m,p]=(0,o.useState)(!1),[x,h]=(0,o.useState)(null),[b,f]=(0,o.useState)(!1),y=async()=>{p(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),s=await e.json();h(s.valid?"success":"failed")}catch{h("failed")}finally{p(!1)}},v=async()=>{if(t&&c.apiKey){f(!0);try{let e=!1;try{p(!0),h(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await s.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{p(!1)}await l({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{f(!1)}}};return t?(0,r.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:n,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,r.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.name,onChange:e=>u({...c,name:e.target.value}),placeholder:"Production Key"})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,r.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.apiKey,onChange:e=>u({...c,apiKey:e.target.value})})]}),(0,r.jsx)("div",{className:"pt-6",children:(0,r.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||m||b,variant:"secondary",children:m?"Checking...":"Check"})})]}),x&&(0,r.jsx)(i.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Invalid"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,r.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.priority,onChange:e=>u({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,r.jsx)(i.l6,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>u({...c,proxyPoolId:e.target.value}),options:[{value:d,label:"None"},...(a||[]).map(e=>({value:e.id,label:e.name}))]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!c.name||!c.apiKey||b,children:b?"Saving...":"Save"}),(0,r.jsx)(i.$n,{onClick:n,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function y({providerId:e,isOAuth:t}){let[s,a]=(0,o.useState)([]),[l,n]=(0,o.useState)([]),[d,c]=(0,o.useState)(!0),[u,m]=(0,o.useState)(""),[p,x]=(0,o.useState)(!1),[h,b]=(0,o.useState)(!1),[v,j]=(0,o.useState)(null),[w,N]=(0,o.useState)(null),[k,C]=(0,o.useState)("1"),S=(0,o.useRef)(null),$=(0,o.useRef)("1"),[_,T]=(0,o.useState)(null),E=async e=>{if(!e.ok)return null;try{return await e.json()}catch{return null}},R=(0,o.useCallback)(async()=>{try{let[t,s,r]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await E(t),o=await E(s),i=await E(r)||{},d=null===l,c=null===o;d||a((l.connections||[]).filter(t=>t.provider===e)),c||n(o.proxyPools||[]),d||c?m("Connection data could not be loaded. Check that the server is running, then retry."):m("");let u=(i.providerStrategies||{})[e]||{};N(u.fallbackStrategy||null),C(null!=u.stickyRoundRobinLimit?String(u.stickyRoundRobinLimit):"1"),$.current=null!=u.stickyRoundRobinLimit?String(u.stickyRoundRobinLimit):"1"}catch(e){console.log("ConnectionsCard fetch error:",e),m("Connection data could not be loaded. Check that the server is running, then retry.")}finally{c(!1)}},[e]);(0,o.useEffect)(()=>{R()},[R]);let O=async(t,s)=>{try{let r=await fetch("/api/settings",{cache:"no-store"}),a=(r.ok?await r.json():{}).providerStrategies||{},l={};t&&(l.fallbackStrategy=t),"round-robin"===t&&""!==s&&(l.stickyRoundRobinLimit=Number(s)||3);let n={...a};0===Object.keys(l).length?delete n[e]:n[e]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("saveStrategy error:",e)}},A=async(e,t)=>{let r=[...s];[r[e],r[t]]=[r[t],r[e]],a(r);try{let[s,a]=await Promise.all([fetch(`/api/providers/${r[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e+1})}),fetch(`/api/providers/${r[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t+1})})]);s.ok&&a.ok||await R()}catch{await R()}},P=async e=>{T({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{T(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&a(t=>t.filter(t=>t.id!==e))}catch(e){console.log("delete error:",e)}}})},I=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&a(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("toggle error:",e)}},L=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&a(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("proxy error:",e)}},M=async t=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})})).ok&&(await R(),x(!1))}catch(e){console.log("save apikey error:",e)}},D=async e=>{try{(await fetch(`/api/providers/${v.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await R(),b(!1))}catch(e){console.log("update connection error:",e)}};return d?(0,r.jsx)(i.Zp,{children:(0,r.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Zp,{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,r.jsx)(i.lM,{checked:"round-robin"===w,onChange:e=>{let t=e?"round-robin":null;N(t),e&&!k&&C("1");let s=e?k||"1":k;$.current=s,S.current&&(clearTimeout(S.current),S.current=null),O(t,s)}}),"round-robin"===w&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,r.jsx)("input",{type:"number",min:1,value:k,onChange:e=>{C(e.target.value),$.current=e.target.value,S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{O("round-robin",$.current)},500)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),u&&(0,r.jsxs)("div",{className:"mb-4 flex flex-col gap-2 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-600 dark:border-red-800 dark:bg-red-900/20 dark:text-red-400 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("span",{children:u}),(0,r.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:()=>{c(!0),R()},children:"Retry"})]}),0!==s.length||u?s.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:s.map((e,a)=>(0,r.jsx)(f,{connection:e,proxyPools:l,isOAuth:t,isFirst:0===a,isLast:a===s.length-1,onMoveUp:()=>A(a,a-1),onMoveDown:()=>A(a,a+1),onToggleActive:t=>I(e.id,t),onUpdateProxy:t=>L(e.id,t),onEdit:()=>{j(e),b(!0)},onDelete:()=>P(e.id)},e.id))}),(0,r.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,r.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>x(!0),children:"Add"})})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,r.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>x(!0),children:"Add Connection"})]})]}),(0,r.jsx)(g,{isOpen:p,provider:e,proxyPools:l,onSave:M,onClose:()=>x(!1)}),(0,r.jsx)(i.wI,{isOpen:h,connection:v,proxyPools:l,onSave:D,onClose:()=>b(!1)}),(0,r.jsx)(i.uo,{isOpen:!!_,onClose:()=>T(null),onConfirm:_?.onConfirm,title:_?.title||"Confirm",message:_?.message,variant:"danger"})]})}function v({model:e,fullModel:t,copied:s,onCopy:a,testStatus:l,isCustom:n,isFree:o,onDeleteAlias:i,onTest:d,isTesting:c}){let u="ok"===l?"#22c55e":"error"===l?"#ef4444":void 0;return(0,r.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===l?"border-green-500/40":"error"===l?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-base",style:u?{color:u}:void 0,children:"ok"===l?"check_circle":"error"===l?"cancel":"smart_toy"}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,r.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,r.jsxs)("div",{className:"relative group/btn",children:[(0,r.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,r.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:c?"Testing...":"Test"})]}),(0,r.jsxs)("div",{className:"relative group/btn",children:[(0,r.jsx)("button",{onClick:()=>a(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,r.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:s===`model-${e.id}`?"Copied!":"Copy"})]}),o&&(0,r.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),n&&(0,r.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function j({isOpen:e,onSave:t,onClose:s}){let[a,l]=(0,o.useState)(""),n=()=>{a.trim()&&(t(a.trim()),l(""))};return(0,r.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,r.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:a,onChange:e=>l(e.target.value),onKeyDown:e=>"Enter"===e.key&&n(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:n,fullWidth:!0,disabled:!a.trim(),children:"Add"}),(0,r.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function w({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:a,copy:l}=(0,m.C)(),[n,d]=(0,o.useState)({}),[p,x]=(0,o.useState)([]),[h,b]=(0,o.useState)({}),[f,g]=(0,o.useState)(null),[y,N]=(0,o.useState)(null),[k,C]=(0,o.useState)(!1),[S,$]=(0,o.useState)([]),_=s||(0,c.wG)(e),T=t||"llm",E=(0,o.useCallback)(async()=>{try{let[t,s,r]=await Promise.all([fetch("/api/models/alias"),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/custom",{cache:"no-store"})]),a=await t.json(),l=await s.json(),n=await r.json();t.ok&&d(a.aliases||{}),s.ok&&$((l.connections||[]).filter(t=>t.provider===e)),r.ok&&x(n.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[e]);(0,o.useEffect)(()=>{E()},[E]);let R=async(e,t)=>{let s=`${_}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await E()}catch(e){console.log("set alias error:",e)}},O=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await E()}catch(e){console.log("delete alias error:",e)}},A=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:_,id:e,type:T})})).ok&&(await E(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},P=async e=>{try{let t=new URLSearchParams({providerAlias:_,id:e,type:T});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await E(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},I=async e=>{if(!f){g(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${_}/${e}`,kind:t})}),r=await s.json();b(t=>({...t,[e]:r.ok?"ok":"error"})),N(r.ok?null:{modelId:e,message:r.error||"Model not reachable"})}catch{b(t=>({...t,[e]:"error"})),N({modelId:e,message:"Network error"})}finally{g(null)}}},L=(0,u.KC)(e),M=t?L.filter(e=>e.kinds?e.kinds.includes(t):(e.type||"llm")===t):L,D=p.filter(e=>e.providerAlias===_&&(e.type||"llm")===T&&!M.some(t=>t.id===e.id)),U=(0,o.useMemo)(()=>{let e={};for(let[t,s]of Object.entries(n))s in e||(e[s]=t);return e},[n]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Zp,{children:[(0,r.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,r.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),y&&(0,r.jsxs)("p",{className:"text-xs text-red-500 mb-3 break-words",children:[y.modelId,": ",y.message]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-3",children:[M.map(e=>{let t=U[`${_}/${e.id}`];return(0,r.jsx)(v,{model:e,fullModel:`${_}/${e.id}`,alias:t,copied:a,onCopy:l,onSetAlias:t=>R(e.id,t),onDeleteAlias:()=>O(t),testStatus:h[e.id],onTest:S.length>0?()=>I(e.id):void 0,isTesting:f===e.id,isFree:e.isFree},e.id)}),D.map(e=>(0,r.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${_}/${e.id}`,copied:a,onCopy:l,onSetAlias:()=>{},onDeleteAlias:()=>P(e.id),testStatus:h[e.id],onTest:S.length>0?()=>I(e.id):void 0,isTesting:f===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,r.jsxs)("button",{onClick:()=>C(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,r.jsx)(j,{isOpen:k,onSave:async e=>{await A(e),C(!1)},onClose:()=>C(!1)})]})}b.propTypes={until:x().string.isRequired},f.propTypes={connection:x().shape({id:x().string,name:x().string,email:x().string,displayName:x().string,testStatus:x().string,isActive:x().bool,lastError:x().string,priority:x().number}).isRequired,proxyPools:x().array,isOAuth:x().bool.isRequired,isFirst:x().bool.isRequired,isLast:x().bool.isRequired,onMoveUp:x().func.isRequired,onMoveDown:x().func.isRequired,onToggleActive:x().func.isRequired,onUpdateProxy:x().func,onEdit:x().func.isRequired,onDelete:x().func.isRequired},g.propTypes={isOpen:x().bool.isRequired,provider:x().string,providerName:x().string,proxyPools:x().array,onSave:x().func.isRequired,onClose:x().func.isRequired},y.propTypes={providerId:x().string.isRequired,isOAuth:x().bool},v.propTypes={model:x().shape({id:x().string.isRequired}).isRequired,fullModel:x().string.isRequired,copied:x().string,onCopy:x().func.isRequired,testStatus:x().oneOf(["ok","error"]),isCustom:x().bool,isFree:x().bool,onDeleteAlias:x().func,onTest:x().func,isTesting:x().bool},j.propTypes={isOpen:x().bool.isRequired,onSave:x().func.isRequired,onClose:x().func.isRequired},w.propTypes={providerId:x().string.isRequired,kindFilter:x().string,providerAliasOverride:x().string};let N={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},nvidia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},hyperbolic:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},deepgram:{hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/deepgram/voices"},huggingface:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},cartesia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},playht:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},coqui:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},tortoise:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},inworld:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"inworld-tts-models",apiEndpoint:"/api/media-providers/tts/inworld/voices"},qwen:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},minimax:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices",defaultVoiceId:"English_expressive_narrator"},"minimax-cn":{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices?provider=minimax-cn",defaultVoiceId:"English_expressive_narrator"},gemini:{hasLanguageDropdown:!1,hasLanguageHint:!0,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"gemini-tts-models",voiceKey:"gemini-tts-voices",voicesPerModel:!0}};var k=s(717),C=s(91781),S=s(62199);function $({label:e,children:t}){return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,r.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,r.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}let _=`// Audio will appear here after running.
2
- // Example JSON response (response_format=json):
3
- {
4
- "format": "mp3",
5
- "audio": "//NExAANaAIIAUAAANNNNNNNN..." // base64 encoded MP3
6
- }`,T=`{
7
- "object": "list",
8
- "data": [{
9
- "object": "embedding",
10
- "index": 0,
11
- "embedding": [0.002301, -0.019212, 0.004815, -0.031249, ...]
12
- }],
13
- "model": "...",
14
- "usage": { "prompt_tokens": 9, "total_tokens": 9 }
15
- }`,E="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png";function R(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}let O={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
16
- "results": [
17
- { "title": "...", "url": "...", "snippet": "..." }
18
- ]
19
- }`,extraFields:[{key:"search_type",label:"Type",type:"select",default:"web",options:["web","news"]},{key:"max_results",label:"Max results",type:"number",default:5,min:1,max:100},{key:"country",label:"Country",type:"text",default:""},{key:"language",label:"Language",type:"text",default:""}]},webFetch:{inputLabel:"URL",inputPlaceholder:"https://example.com",defaultInput:"https://example.com",bodyKey:"url",defaultResponse:`{
20
- "content": "...",
21
- "title": "...",
22
- "url": "..."
23
- }`,extraFields:[{key:"format",label:"Format",type:"select",default:"markdown",options:["markdown","text","html"]},{key:"max_characters",label:"Max chars",type:"number",default:0,min:0}]},image:{inputLabel:"Prompt",inputPlaceholder:"A cute cat wearing a hat",defaultInput:"A cute cat wearing a hat",bodyKey:"prompt",defaultResponse:`{
24
- "data": [
25
- { "url": "...", "b64_json": "..." }
26
- ]
27
- }`,extraFields:[{key:"n",label:"n",type:"number",default:1,min:1,max:4},{key:"size",label:"Size",type:"select",default:"auto",options:["auto","1024x1024","1024x1536","1536x1024","1024x1792","1792x1024"]},{key:"quality",label:"Quality",type:"select",default:"auto",options:["auto","low","medium","high","standard","hd"]},{key:"background",label:"Background",type:"select",default:"auto",options:["auto","transparent","opaque"]},{key:"style",label:"Style",type:"select",default:"",options:["","vivid","natural"]},{key:"response_format",label:"Format",type:"select",default:"",options:["","url","b64_json"]},{key:"image_detail",label:"Image Detail",type:"select",default:"high",options:["auto","low","high","original"]},{key:"output_format",label:"Codec",type:"select",default:"png",options:["png","jpeg","webp"]}]},imageToText:{inputLabel:"Image URL",inputPlaceholder:"https://example.com/image.png",defaultInput:"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg",bodyKey:"url",extraBody:{prompt:"Describe this image in detail"},defaultResponse:`{
28
- "text": "A cat sitting on a windowsill...",
29
- "model": "..."
30
- }`},video:{inputLabel:"Prompt",inputPlaceholder:"A serene lake at sunset",defaultInput:"A serene lake at sunset",bodyKey:"prompt",defaultResponse:`{
31
- "data": [
32
- { "url": "..." }
33
- ]
34
- }`},music:{inputLabel:"Prompt",inputPlaceholder:"A calm piano melody",defaultInput:"A calm piano melody",bodyKey:"prompt",defaultResponse:`{
35
- "data": [
36
- { "url": "...", "format": "mp3" }
37
- ]
38
- }`}};function A({providerId:e,customAlias:t}){let s=(0,c.gC)(e),a=s?t||e:(0,c.wG)(e),l=s?[]:(0,u.KC)(e).filter(e=>"embedding"===e.type),[n,d]=(0,o.useState)(l[0]?.id??""),[p,x]=(0,o.useState)("The quick brown fox jumps over the lazy dog"),[h,b]=(0,o.useState)(""),[f,g]=(0,o.useState)(""),[y,v]=(0,o.useState)(!1),[j,w]=(0,o.useState)(""),[N,k]=(0,o.useState)(""),[C,_]=(0,o.useState)(null),[E,R]=(0,o.useState)(!1),[O,P]=(0,o.useState)(""),{copied:I,copy:L}=(0,m.C)(),{copied:M,copy:D}=(0,m.C)();(0,o.useEffect)(()=>{w(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&k(e.publicUrl)}).catch(()=>{})},[]);let U=y?N:j,K=n?`${a}/${n}`:"",B=()=>{let e={model:K,input:p.trim()},t=Number(h);return h&&Number.isFinite(t)&&t>0&&(e.dimensions=t),e},F=`curl -X POST ${U}/v1/embeddings \\
39
- -H "Content-Type: application/json" \\
40
- -H "Authorization: Bearer ${f||"YOUR_KEY"}" \\
41
- -d '${JSON.stringify(B())}'`,q=async()=>{if(!p.trim()||!K)return;R(!0),P(""),_(null);let e=Date.now();try{let t={"Content-Type":"application/json"};f&&(t.Authorization=`Bearer ${f}`);let s=await fetch((0,S.O)("/v1/embeddings"),{method:"POST",headers:t,body:JSON.stringify(B())}),r=Date.now()-e,a=await s.json().catch(()=>null);if(!s.ok)return void P(a?.error?.message||a?.error||`HTTP ${s.status}`);if(null==a)return void P("Invalid response from server");_({data:a,latencyMs:r})}catch(e){P(e.message||"Network error")}finally{R(!1)}},J=C?JSON.stringify(C.data,null,2):"";return(0,r.jsxs)(i.Zp,{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,r.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,r.jsx)($,{label:"Model",children:s?(0,r.jsx)("input",{value:n,onChange:e=>d(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}):(0,r.jsx)("select",{value:n,onChange:e=>d(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,r.jsx)($,{label:"Endpoint",children:(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsx)("input",{value:U,onChange:e=>y?k(e.target.value):w(e.target.value),className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"}),N&&(0,r.jsxs)("button",{onClick:()=>v(e=>!e),title:y?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${y?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,r.jsx)($,{label:"API Key",children:(0,r.jsx)("input",{type:"password",value:f,onChange:e=>g(e.target.value),placeholder:"sk-...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,r.jsx)($,{label:"Input",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{value:p,onChange:e=>x(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),p&&(0,r.jsx)("button",{type:"button",onClick:()=>x(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,r.jsx)($,{label:"Dimensions",children:(0,r.jsx)("input",{type:"number",min:"1",value:h,onChange:e=>b(e.target.value),placeholder:"optional, e.g. 512, 1024 (leave empty for default)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,r.jsxs)("div",{className:"mt-1",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsxs)("button",{onClick:()=>L(F),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:I?"check":"content_copy"}),I?"Copied":"Copy"]}),(0,r.jsxs)("button",{onClick:q,disabled:E||!p.trim()||!K,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:E?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),E?"Running...":"Run"]})]})]}),(0,r.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:F})]}),O&&(0,r.jsx)("p",{className:"text-xs text-red-500 break-words",children:O}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,r.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",C&&(0,r.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",C.latencyMs,"ms"]})]}),C&&(0,r.jsxs)("button",{onClick:()=>D(J),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:M?"check":"content_copy"}),M?"Copied":"Copy"]})]}),(0,r.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:(e=>{if(!e)return T;let t=JSON.parse(JSON.stringify(e));return(t.data||[]).forEach(e=>{Array.isArray(e.embedding)&&e.embedding.length>4&&(e.embedding=[...e.embedding.slice(0,4).map(e=>parseFloat(e.toFixed(6))),`... (${e.embedding.length} dims)`])}),JSON.stringify(t,null,2)})(C?.data)})]})]})]})}function P({providerId:e}){let t,s=(0,c.wG)(e),a=N[e]||N["edge-tts"],[l,n]=(0,o.useState)(a.defaultVoiceId||""),[d,p]=(0,o.useState)(""),[x,h]=(0,o.useState)(a.defaultVoiceId||""),[b,f]=(0,o.useState)([]),[g,y]=(0,o.useState)(""),[v,j]=(0,o.useState)(()=>{let t=c.Q2[e]?.ttsConfig?.models;if(t?.length)return t[0].id;if(a.hasModelSelector&&a.modelKey){let e=(0,u.KC)(a.modelKey);return e?.[0]?.id||""}return""}),[w,T]=(0,o.useState)("Hello, this is a text to speech test."),[E,R]=(0,o.useState)(!1),[O,A]=(0,o.useState)(""),[I,L]=(0,o.useState)(""),[M,D]=(0,o.useState)("mp3"),[U,K]=(0,o.useState)(""),[B,F]=(0,o.useState)(null),[q,J]=(0,o.useState)(!1),[z,V]=(0,o.useState)(""),[H,W]=(0,o.useState)(null),{copied:G,copy:Y}=(0,m.C)(),Q=(0,o.useRef)("");(0,o.useEffect)(()=>()=>{if(Q.current)try{URL.revokeObjectURL(Q.current)}catch{}},[]);let[Z,X]=(0,o.useState)(!1),[ee,et]=(0,o.useState)([]),[es,er]=(0,o.useState)(!1),[ea,el]=(0,o.useState)(""),[en,eo]=(0,o.useState)(""),[ei,ed]=(0,o.useState)({}),[ec,eu]=(0,o.useState)("");(0,o.useEffect)(()=>{if(A(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&L(e.publicUrl)}).catch(()=>{}),"hardcoded"===a.voiceSource){let t=a.hasModelSelector&&a.modelKey&&(0,u.KC)(a.modelKey)?.[0]?.id||"",s=a.voicesPerModel&&t?(0,k.jY)(e,t)||[]:(0,u.KC)(a.voiceKey||e).filter(e=>"tts"===e.type);if(s.length)if(a.hasBrowseButton){let e=s.find(e=>"en"===e.id)||s[0];y(e.id),n(e.id),p(e.name),f([{id:e.id,name:e.name}])}else f(s),n(s[0].id),p(s[0].name||s[0].id)}},[e]),(0,o.useEffect)(()=>{if(!a.voicesPerModel||!v)return;let t=(0,k.jY)(e,v)||[];f(t),t.length&&(n(t[0].id),p(t[0].name||t[0].id))},[v]);let em=async()=>{if(X(!0),el(""),eo(""),!ee.length){er(!0);try{if("hardcoded"===a.voiceSource){let t=a.voiceKey||e,s=(0,u.KC)(t).filter(e=>"tts"===e.type),r={};for(let e of s)r[e.id]||(r[e.id]={code:e.id,name:e.name,voices:[{id:e.id,name:e.name}]});ed(r),et(Object.values(r).sort((e,t)=>e.name.localeCompare(t.name)))}else{let t=a.apiEndpoint?a.apiEndpoint:`/api/media-providers/tts/voices?provider=${"local-device"===e?"local-device":"edge-tts"}`,s=await fetch(t),r=await s.json();if(r.error)return void eo(r.error);et(r.languages||[]),ed(r.byLang||{})}}catch(e){eo(e.message)}finally{er(!1)}}},ep=ea?ee.filter(e=>e.name.toLowerCase().includes(ea.toLowerCase())||e.code.toLowerCase().includes(ea.toLowerCase())):ee,ex=E?I:O,eh=a.hasVoiceIdInput&&x||l,eb=a.hasModelSelector&&v&&eh?`${s}/${v}/${eh}`:a.hasModelSelector&&v?`${s}/${v}`:eh?`${s}/${eh}`:"",ef=(t={model:eb,input:w},a.hasLanguageHint&&ec&&(t.language=ec),t),eg=`curl -X POST ${ex}/v1/audio/speech${"json"===M?"?response_format=json":""} \\
42
- -H "Content-Type: application/json" \\
43
- -H "Authorization: Bearer YOUR_KEY" \\
44
- -d '${JSON.stringify(ef)}' \\
45
- ${"json"===M?"":"--output speech.mp3"}`,ey=async()=>{if(!w.trim()||!eb)return;if(J(!0),V(""),Q.current){try{URL.revokeObjectURL(Q.current)}catch{}Q.current=""}K(""),F(null);let e=Date.now();try{let t=(0,S.O)(`/v1/audio/speech${"json"===M?"?response_format=json":""}`),s=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...ef,input:w.trim()})});if(W(Date.now()-e),!s.ok){let e=await s.json().catch(()=>({}));V(e?.error?.message||e?.error||`HTTP ${s.status}`);return}if("json"===M){let e=await s.json().catch(()=>null);if(!e||"string"!=typeof e.audio||!e.audio)return void V(e?.error?.message||e?.error||"TTS response did not include audio data");F(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob()),r=URL.createObjectURL(t);Q.current=r,K(r)}else{let e=await s.blob(),t=URL.createObjectURL(e);Q.current=t,K(t)}}catch(e){V(e.message||"Network error")}finally{J(!1)}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Zp,{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,r.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,r.jsx)($,{label:"Endpoint",children:(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ex,"/v1/audio/speech"]}),I&&(0,r.jsxs)("button",{onClick:()=>R(e=>!e),title:E?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${E?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,r.jsx)($,{label:"API Key",children:(0,r.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:(0,r.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),a.hasModelSelector&&(a.modelKey||c.Q2[e]?.ttsConfig?.models?.length)&&(0,r.jsx)($,{label:"Model",children:(0,r.jsx)("select",{value:v,onChange:e=>j(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:((c.Q2[e]?.ttsConfig?.models?.length?c.Q2[e].ttsConfig.models:(0,u.KC)(a.modelKey))||[]).map(e=>(0,r.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),a.hasLanguageHint&&(0,r.jsx)($,{label:"Language",children:(0,r.jsxs)("select",{value:ec,onChange:e=>eu(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,r.jsx)("option",{value:"",children:"Auto-detect"}),C.I.map(e=>(0,r.jsx)("option",{value:e.name,children:e.name},e.id))]})}),a.hasBrowseButton&&(0,r.jsx)($,{label:"Language",children:(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsx)("button",{onClick:em,className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:g?(0,r.jsx)("span",{className:"text-text-main",children:ee.find(e=>e.code===g)?.name||g}):(0,r.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,r.jsxs)("button",{onClick:em,className:"flex w-full items-center justify-center gap-1 text-xs px-2.5 py-1.5 rounded-lg border border-border text-text-muted hover:text-primary hover:border-primary/40 transition-colors sm:w-auto sm:shrink-0",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),b.length>0&&(0,r.jsx)($,{label:"Voice",children:(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:b.map(e=>(0,r.jsxs)("button",{onClick:()=>{n(e.id),p(e.name),a.hasVoiceIdInput&&h(e.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${l===e.id?"bg-primary/15 border-primary/40 text-primary font-medium":"border-border text-text-muted hover:text-primary hover:border-primary/40"}`,children:[e.name,e.gender?` \xb7 ${e.gender[0].toUpperCase()}`:"",!0===e.free_users_allowed&&(0,r.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-green-500/15 text-green-600 border border-green-500/20",children:"Free"}),!1===e.free_users_allowed&&(0,r.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-amber-500/15 text-amber-600 border border-amber-500/20",children:"Paid"})]},e.id))})}),a.hasVoiceIdInput&&(0,r.jsx)($,{label:"Voice ID",children:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{value:x,onChange:e=>{h(e.target.value),n(e.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),x&&(0,r.jsx)("button",{type:"button",onClick:()=>{h(""),n("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),a.hasLanguageDropdown&&(0,r.jsx)($,{label:"Language",children:(0,r.jsx)("select",{value:l,onChange:t=>{let s=(0,u.KC)(e).filter(e=>"tts"===e.type).find(e=>e.id===t.target.value);n(t.target.value),p(s?.name||t.target.value)},className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(0,u.KC)(e).filter(e=>"tts"===e.type).map(e=>(0,r.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,r.jsx)($,{label:"Input",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{value:w,onChange:e=>T(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),w&&(0,r.jsx)("button",{type:"button",onClick:()=>T(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,r.jsx)($,{label:"Output Format",children:(0,r.jsxs)("select",{value:M,onChange:e=>D(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,r.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,r.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,r.jsxs)("div",{className:"mt-1",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsxs)("button",{onClick:()=>Y(eg),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:G?"check":"content_copy"}),G?"Copied":"Copy"]}),(0,r.jsxs)("button",{onClick:ey,disabled:q||!w.trim()||!eb,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:q?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),q?"Generating...":"Run"]})]})]}),(0,r.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:eg})]}),z&&(0,r.jsx)("p",{className:"text-xs text-red-500 break-words",children:z}),U?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,r.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",H&&(0,r.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",H,"ms"]})]}),(0,r.jsxs)("a",{href:U,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,r.jsx)("audio",{controls:!0,src:U,className:"w-full"}),B&&(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,r.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify({format:B.format,audio:B.audio?`${B.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,r.jsx)("pre",{className:"mt-1.5 bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-50",children:_})]})]})]}),Z&&(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center sm:items-center",style:{backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(2px)"},onClick:()=>X(!1),children:(0,r.jsxs)("div",{className:"border border-border rounded-xl shadow-2xl w-full max-w-md mx-4 flex flex-col max-h-[80vh]",style:{backgroundColor:"var(--color-bg)",isolation:"isolate"},onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,r.jsx)("button",{onClick:()=>X(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,r.jsx)("input",{autoFocus:!0,value:ea,onChange:e=>el(e.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,r.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[en&&(0,r.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:en}),es?(0,r.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,r.jsxs)("div",{className:"flex flex-col gap-0.5",children:[ep.map(e=>(0,r.jsxs)("button",{onClick:()=>{let t;return X(!1),y(e.code),void(f(t=ei[e.code]?.voices||[]),t.length&&(n(t[0].id),p(t[0].name),a.hasVoiceIdInput&&h(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${g===e.code?"bg-primary/10 text-primary":""}`,children:[(0,r.jsx)("span",{className:"text-sm",children:e.name}),(0,r.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:[e.voices.length," voices"]}),g===e.code&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===ep.length&&(0,r.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}function I({providerId:e,kind:t}){let s=(0,c.wG)(e),a=(0,c.rs)(s)===e?s:e,l=c.rj.find(e=>e.id===t),n=O[t],d=n||{},p=(0,u.KC)(e).filter(e=>e.type===t),x=new Set(["image","video","music","imageToText"]).has(t),h=x&&0===p.length,[b,f]=(0,o.useState)(p[0]?.id??""),g=p.find(e=>e.id===b),y=!!g?.capabilities?.includes("edit"),v=!!g?.capabilities?.includes("mask"),[j,w]=(0,o.useState)(d.defaultInput||""),[N,k]=(0,o.useState)(""),[C,_]=(0,o.useState)(""),[T,A]=(0,o.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[P,L]=(0,o.useState)(!1),[M,D]=(0,o.useState)(""),[U,K]=(0,o.useState)(""),[B,F]=(0,o.useState)(null),[q,J]=(0,o.useState)(null),[z,V]=(0,o.useState)(null),[H,W]=(0,o.useState)("json"),[G,Y]=(0,o.useState)(""),[Q,Z]=(0,o.useState)(!1),[X,ee]=(0,o.useState)(""),[et,es]=(0,o.useState)([]),[er,ea]=(0,o.useState)(""),{copied:el,copy:en}=(0,m.C)(),{copied:eo,copy:ei}=(0,m.C)(),ed=(0,o.useRef)(null);if((0,o.useEffect)(()=>()=>{ed.current?.abort()},[]),(0,o.useEffect)(()=>{D(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&K(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{es((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!l||!n)return null;let ec=P?U:M,eu=l.endpoint.path,em=x?b?`${a}/${b}`:h?"":a:a,ep="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===b?{image:E}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===b?{image:E,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},ex=N.trim()||ep.image||"",eh=C.trim()||ep.mask_image||"",eb=R(ex),ef=R(eh),eg=Object.entries(T).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),ey={model:em,[n.bodyKey]:j,...n.extraBody,...eg,...y&&ex?{image:ex}:{},...v&&eh?{mask_image:eh}:{}},ev="image"===t&&"binary"===H,ej="image"===t&&"codex"===e&&!ev,ew=`${eu}${ev?"?response_format=binary":""}`,eN=(0,S.O)(ew),ek=`-H "Content-Type: application/json" \\
46
- -H "Authorization: Bearer YOUR_KEY"${er?` \\
47
- -H "x-connection-id: ${er}"`:""}${ej?` \\
48
- -H "Accept: text/event-stream"`:""}`,eC=`curl -X ${l.endpoint.method} ${ec}${ew} \\
49
- ${ek.replace(/\\\n /g,"\\\n ")} \\
50
- -d '${JSON.stringify(ey)}'${ev?" \\\n --output image.png":""}`,eS=async()=>{if(!eN)return void ee("Not supported by this router build");if(!j.trim()||!em)return;if(Z(!0),ee(""),F(null),J(null),V(null),G){try{URL.revokeObjectURL(G)}catch{}Y("")}let e=Date.now();try{let t={"Content-Type":"application/json"};er&&(t["x-connection-id"]=er),ej&&(t.Accept="text/event-stream");let s={...ey,model:em},r=await fetch(eN,{method:l.endpoint.method,headers:t,body:JSON.stringify(s)});if(!r.ok){let e=await r.json().catch(()=>({}));ee(e?.error?.message||e?.error||`HTTP ${r.status}`);return}let a=r.headers.get("content-type")||"";if(a.startsWith("image/")){let t=await r.blob(),s=URL.createObjectURL(t);Y(s),F({data:{binary:!0,mime:a,size:t.size},latencyMs:Date.now()-e});return}if(a.includes("text/event-stream")&&r.body){let t=new AbortController;ed.current=t;let s=r.body.getReader(),a=()=>{s.cancel().catch(()=>{})};t.signal.addEventListener("abort",a,{once:!0});let l=new TextDecoder,n="",o=null,i=null;try{for(;;){let e;if(t.signal.aborted)return;let{done:r,value:a}=await s.read();if(r)break;for(n+=l.decode(a,{stream:!0});-1!==(e=n.indexOf("\n\n"));){let t=n.slice(0,e);n=n.slice(e+2);let s=null,r="";for(let e of t.split("\n"))e.startsWith("event:")?s=e.slice(6).trim():e.startsWith("data:")&&(r+=e.slice(5).trim());if(s)try{let e=r?JSON.parse(r):{};"progress"===s?J(e):"partial_image"===s?V(e):"done"===s?o=e:"error"===s&&(i=e?.message||"Stream error")}catch{}}}}catch(e){if(t.signal.aborted)return;throw e}finally{t.signal.removeEventListener("abort",a),ed.current===t&&(ed.current=null)}let d=Date.now()-e;if(i)return void ee(i);o&&F({data:o,latencyMs:d})}else{let t=await r.json(),s=Date.now()-e;F({data:t,latencyMs:s})}}catch(e){ee(e.message||"Network error")}finally{Z(!1)}},e$=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(e$);let t={};for(let[s,r]of Object.entries(e))t[s]="b64_json"===s&&"string"==typeof r&&r.length>100?`<${r.length} chars base64>`:e$(r);return t},e_=B?JSON.stringify(e$(B.data),null,2):"";return(0,r.jsxs)(i.Zp,{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,r.jsxs)("div",{className:"flex flex-col gap-2.5",children:[p.length>0?(0,r.jsx)($,{label:"Model",children:(0,r.jsx)("select",{value:b,onChange:e=>f(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:p.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):h?(0,r.jsx)($,{label:"Model",children:(0,r.jsx)("input",{value:b,onChange:e=>f(e.target.value),placeholder:"Enter model id (provider-specific)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}):null,(0,r.jsx)($,{label:"Endpoint",children:(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ec,eu]}),U&&(0,r.jsxs)("button",{onClick:()=>L(e=>!e),title:P?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${P?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,r.jsx)($,{label:"API Key",children:(0,r.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:(0,r.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),et.length>0&&(0,r.jsx)($,{label:"Connection",children:(0,r.jsxs)("select",{value:er,onChange:e=>ea(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,r.jsx)("option",{value:"",children:"Auto (by priority)"}),et.map(e=>{let t=e.providerSpecificData?.chatgptPlanType,s=e.email||e.name||e.id.slice(0,8);return(0,r.jsxs)("option",{value:e.id,children:[s,t?` [${t}]`:""]},e.id)})]})}),(0,r.jsx)($,{label:n.inputLabel,children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:n.inputPlaceholder,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),j&&(0,r.jsx)("button",{type:"button",onClick:()=>w(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),y&&(0,r.jsx)($,{label:"Ref Image (URL)",children:(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:ep.image||"https://example.com/source.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),N&&(0,r.jsx)("button",{type:"button",onClick:()=>k(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eb&&(0,r.jsx)("img",{src:eb,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),v&&(0,r.jsx)($,{label:"Mask (URL)",children:(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{value:C,onChange:e=>_(e.target.value),placeholder:ep.mask_image||"https://example.com/mask.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),C&&(0,r.jsx)("button",{type:"button",onClick:()=>_(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),ef&&(0,r.jsx)("img",{src:ef,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),(n.extraFields||[]).filter(e=>0===p.length||Array.isArray(g?.params)&&g.params.includes(e.key)).map(e=>(0,r.jsx)($,{label:e.label,children:"select"===e.type?(0,r.jsx)("select",{value:T[e.key]??"",onChange:t=>A(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(e.options||[]).map(e=>(0,r.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,r.jsx)("input",{type:"text",value:T[e.key]??"",placeholder:e.placeholder,onChange:t=>A(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}):(0,r.jsx)("input",{type:"number",value:T[e.key]??"",min:e.min,max:e.max,onChange:t=>A(s=>({...s,[e.key]:""===t.target.value?"":Number(t.target.value)})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})},e.key)),"image"===t&&(0,r.jsx)($,{label:"Output Format",children:(0,r.jsxs)("select",{value:H,onChange:e=>W(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,r.jsx)("option",{value:"json",children:"JSON (Base64)"}),(0,r.jsx)("option",{value:"binary",children:"Binary File"})]})}),(0,r.jsxs)("div",{className:"mt-1",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[eN&&(0,r.jsxs)("button",{onClick:()=>en(eC),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:el?"check":"content_copy"}),el?"Copied":"Copy"]}),(0,r.jsxs)("button",{onClick:eS,disabled:!eN||Q||!j.trim()||!em,title:eN?void 0:"Not supported by this router build",className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:Q?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),eN?Q?"Running...":"Run":"Unavailable"]})]})]}),eN?(0,r.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:eC}):(0,r.jsx)("div",{className:"rounded-lg border border-border bg-sidebar px-3 py-2.5 text-xs text-text-muted",children:"Not supported by this router build"})]}),(Q||q)&&ej&&(0,r.jsxs)("div",{className:"flex flex-col gap-2 px-3 py-2 rounded-lg bg-sidebar border border-border sm:flex-row sm:items-center sm:gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:Q?{animation:"spin 1s linear infinite"}:void 0,children:Q?"progress_activity":"check_circle"}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:[q?.stage||"starting",!Q&&q?.bytesReceived?` \xb7 ${(q.bytesReceived/1024).toFixed(1)} KB`:""]})]}),z?.b64_json&&!B&&(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,r.jsx)("img",{src:`data:image/png;base64,${z.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),X&&(0,r.jsx)("p",{className:"text-xs text-red-500 break-words",children:X}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,r.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",B&&(0,r.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",B.latencyMs,"ms"]})]}),B&&(0,r.jsxs)("button",{onClick:()=>ei(e_),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eo?"check":"content_copy"}),eo?"Copied":"Copy"]})]}),(0,r.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:B?e_:n.defaultResponse}),"image"===t&&(G||B?.data?.data?.[0])&&(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,r.jsxs)("a",{href:G||(B?.data?.data?.[0]?.b64_json?`data:image/png;base64,${B.data.data[0].b64_json}`:B?.data?.data?.[0]?.url||""),download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,r.jsx)("img",{src:G||(B?.data?.data?.[0]?.b64_json?`data:image/png;base64,${B.data.data[0].b64_json}`:B?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function L({providerId:e}){let t=(0,c.wG)(e),s=(0,u.KC)(e).filter(e=>"stt"===e.type),[a,l]=(0,o.useState)([]),n=[...s,...a],[d,p]=(0,o.useState)(s[0]?.id??""),x=n.find(e=>e.id===d),h=Array.isArray(x?.params)?x.params:[],[b,f]=(0,o.useState)(null),[g,y]=(0,o.useState)(""),[v,j]=(0,o.useState)(""),[w,N]=(0,o.useState)("json"),[k,C]=(0,o.useState)(""),[_,T]=(0,o.useState)(!1),[E,R]=(0,o.useState)(""),[O,A]=(0,o.useState)(""),[P,I]=(0,o.useState)(null),[M,D]=(0,o.useState)(null),[U,K]=(0,o.useState)(!1),[B,F]=(0,o.useState)(""),{copied:q,copy:J}=(0,m.C)(),{copied:z,copy:V}=(0,m.C)();(0,o.useEffect)(()=>{R(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&A(e.publicUrl)}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{l((e.models||[]).filter(e=>"stt"===e.type&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let H=_?O:E,W=d?`${t}/${d}`:"",G=`curl -X POST ${H}/v1/audio/transcriptions \\
51
- -H "Authorization: Bearer YOUR_KEY" \\
52
- -F "file=@${b?.name||"audio.mp3"}" \\
53
- -F "model=${W}"${h.includes("language")&&g?` \\
54
- -F "language=${g}"`:""}${h.includes("response_format")?` \\
55
- -F "response_format=${w}"`:""}${h.includes("temperature")&&k?` \\
56
- -F "temperature=${k}"`:""}${h.includes("prompt")&&v?` \\
57
- -F "prompt=${v}"`:""}`,Y=async()=>{if(!b||!W)return;K(!0),F(""),I(null);let e=Date.now();try{let t=new FormData;t.append("file",b),t.append("model",W),h.includes("language")&&g&&t.append("language",g),h.includes("response_format")&&t.append("response_format",w),h.includes("temperature")&&k&&t.append("temperature",k),h.includes("prompt")&&v&&t.append("prompt",v);let s=await fetch((0,S.O)("/v1/audio/transcriptions"),{method:"POST",body:t});D(Date.now()-e);let r=(s.headers.get("content-type")||"").includes("application/json")?await s.json():await s.text();if(!s.ok)return void F(r?.error?.message||r?.error||r||`HTTP ${s.status}`);I(r)}catch(e){F(e.message||"Network error")}finally{K(!1)}},Q="string"==typeof P?P:P?JSON.stringify(P,null,2):`{
58
- "text": "Hello world..."
59
- }`;return(0,r.jsxs)(i.Zp,{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,r.jsxs)("div",{className:"flex flex-col gap-2.5",children:[n.length>0?(0,r.jsx)($,{label:"Model",children:(0,r.jsx)("select",{value:d,onChange:e=>p(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:n.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,r.jsx)($,{label:"Model",children:(0,r.jsx)("input",{value:d,onChange:e=>p(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,r.jsx)($,{label:"Endpoint",children:(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[H,"/v1/audio/transcriptions"]}),O&&(0,r.jsxs)("button",{onClick:()=>T(e=>!e),title:_?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${_?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,r.jsx)($,{label:"API Key",children:(0,r.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:(0,r.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),(0,r.jsx)($,{label:"Audio File",children:(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>f(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),b&&(0,r.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[b.name," \xb7 ",(b.size/1024).toFixed(1)," KB"]})]})}),h.includes("language")&&(0,r.jsx)($,{label:"Language",children:(0,r.jsx)("input",{value:g,onChange:e=>y(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),h.includes("prompt")&&(0,r.jsx)($,{label:"Prompt",children:(0,r.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("temperature")&&(0,r.jsx)($,{label:"Temperature",children:(0,r.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:k,onChange:e=>C(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("response_format")&&(0,r.jsx)($,{label:"Response Format",children:(0,r.jsxs)("select",{value:w,onChange:e=>N(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,r.jsx)("option",{value:"json",children:"json"}),(0,r.jsx)("option",{value:"text",children:"text"}),(0,r.jsx)("option",{value:"srt",children:"srt"}),(0,r.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,r.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,r.jsxs)("div",{className:"mt-1",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsxs)("button",{onClick:()=>J(G),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:q?"check":"content_copy"}),q?"Copied":"Copy"]}),(0,r.jsxs)("button",{onClick:Y,disabled:U||!b||!W,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:U?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),U?"Transcribing...":"Run"]})]})]}),(0,r.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:G})]}),B&&(0,r.jsx)("p",{className:"text-xs text-red-500 break-words",children:B}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,r.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",P&&M&&(0,r.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",M,"ms"]})]}),P&&(0,r.jsxs)("button",{onClick:()=>V(Q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:z?"check":"content_copy"}),z?"Copied":"Copy"]})]}),(0,r.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:Q})]})]})]})}function M(){let{kind:e,id:t}=(0,a.useParams)(),s=(0,a.useRouter)(),l=c.rj.find(t=>t.id===e),u=(0,c.gC)(t)&&"embedding"===e,[m,p]=(0,o.useState)(null),[x,h]=(0,o.useState)(u),[b,f]=(0,o.useState)(!1),[g,v]=(0,o.useState)(!1),j=async()=>{if(confirm("Delete this Custom Embedding node?")){v(!0);try{let r=await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"});if(r.ok)return void s.push(`/dashboard/media-providers/${e}`);let a=await r.json().catch(()=>({}));alert(a.error||"Failed to delete custom embedding node")}catch{alert("Failed to delete custom embedding node")}v(!1)}};if((0,o.useEffect)(()=>{if(!u)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(p((s.nodes||[]).find(e=>e.id===t)||null),h(!1))}).catch(()=>{e||h(!1)}),()=>{e=!0}},[t,u]),!l)return(0,a.notFound)();let N=c.Q2[t],k=u?m?{id:t,name:m.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:N;if(!u&&!N||u&&!x&&!m)return(0,a.notFound)();if(u&&x)return(0,r.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let C=u?["embedding"]:k.serviceKinds??["llm"];return u||C.includes(e)?(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(n(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),l.label]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,r.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${k.color}15`},children:(0,r.jsx)(d.A,{src:`/providers/${k.id}.png`,alt:k.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:k.textIcon||k.id.slice(0,2).toUpperCase(),fallbackColor:k.color})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,r.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:k.name}),!u&&k.notice?.apiKeyUrl&&(0,r.jsxs)("a",{href:k.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[u&&(0,r.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",m?.prefix]}),C.map(t=>(0,r.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),u&&(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>f(!0),children:"Edit"}),(0,r.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:j,disabled:g,children:g?"Deleting...":"Delete"})]})]})]}),!u&&k.kindNotice?.[e]&&(0,r.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,r.jsx)("p",{className:"text-sm",children:k.kindNotice[e]})]}),!u&&k.notice?.text&&!k.deprecated&&(0,r.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,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,r.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:k.notice.text}),k.notice.apiKeyUrl&&(0,r.jsx)("a",{href:k.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 →"})]}),!u&&k.noAuth?(0,r.jsx)(i.gw,{providerId:t}):(0,r.jsx)(y,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,r.jsx)(w,{providerId:t,kindFilter:e,providerAliasOverride:u?m?.prefix:void 0}),!u&&(k.searchConfig||k.fetchConfig||k.ttsConfig||k.sttConfig||k.embeddingConfig||k.searchViaChat)&&(0,r.jsx)(i.Wx,{config:"webFetch"===e?k.fetchConfig:"tts"===e?k.ttsConfig:"stt"===e?k.sttConfig:"embedding"===e?k.embeddingConfig:k.searchConfig||{mode:"chat-completions",defaultModel:k.searchViaChat?.defaultModel,pricingUrl:k.searchViaChat?.pricingUrl,freeTier:k.searchViaChat?.freeTier},provider:k,title:`${l.label} Config`}),"embedding"===e&&(0,r.jsx)(A,{providerId:t,customAlias:m?.prefix}),"tts"===e&&(0,r.jsx)(P,{providerId:t}),"stt"===e&&!u&&(0,r.jsx)(L,{providerId:t}),!u&&O[e]&&(0,r.jsx)(I,{providerId:t,kind:e}),u&&(0,r.jsx)(i.x0,{isOpen:b,node:m,onClose:()=>f(!1),onSaved:e=>{p(e),f(!1)}})]}):(0,a.notFound)()}}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=54909)),_N_E=e.O()}]);
@@ -1,3 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{20412:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>L});var a=s(95155),i=s(12115),r=s(73321),l=s(98500),n=s.n(l),o=s(5772),d=s(35497),c=s(52679);let u=["kiro","codebuddy","codebuddy-cn","qoder","antigravity","cloudflare-ai","grok-cli"];function m(e){return u.includes(String(e||""))}function p(e){let t=String(e||"").trim();return t&&m(t)?`/dashboard/automation?provider=${encodeURIComponent(t)}`:"/dashboard/automation"}var x=s(28777),h=s(11059),f=s(73006);let g=new Map;async function b(e){if(!e?.url||!e?.type)return[];let t=g.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 g.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}var y=s(70217),v=s(51716),j=s(14051),k=s.n(j);function w({model:e,fullModel:t,alias:s,copied:i,onCopy:r,testStatus:l,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:u,onDisable:m,thinkingSuffix:p}){let x="ok"===l?"#22c55e":"error"===l?"#ef4444":void 0,h=p?`${t}(${p})`:t;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===l?"border-green-500/40":"error"===l?"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:x?{color:x}:void 0,children:"ok"===l?"check_circle":"error"===l?"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:h}),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:u,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${u?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:u?{animation:"spin 1s linear infinite"}:void 0,children:u?"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:u?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(h,`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"})}):m?(0,a.jsx)("button",{onClick:m,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 N({models:e,modelAliases:t,providerStorageAlias:s,providerDisplayAlias:a}){let i={...t||{}},r=new Set(Object.values(i)),l=[];for(let t of Array.isArray(e)?e:[]){let e=function(e){if(!e)return"";if("string"==typeof e)return e.trim();let t=e.id||e.name||e.model;return"string"==typeof t?t.trim():""}(t);if(!e)continue;let n=`${s}/${e}`;if(r.has(n))continue;let o=function(e,t,s){let a=e.split("/"),i=a[a.length-1];if(!i)return"";if(!t[i])return i;let r=`${s}-${i}`;if(!t[r])return r;let l=2;for(;t[`${r}-${l}`];)l+=1;return`${r}-${l}`}(e,i,a);o&&(l.push({alias:o,model:n,modelId:e}),i[o]=n,r.add(n))}return l}function C({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:r,onTest:l,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"})]}),l&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:l,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:r,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 S({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:r,onCopy:l,onSetAlias:n,onDeleteAlias:o,onAliasesChanged:c,connections:u,isAnthropic:m}){let[p,x]=(0,i.useState)(""),[h,f]=(0,i.useState)(!1),[g,b]=(0,i.useState)(!1),[y,v]=(0,i.useState)(null),[j,k]=(0,i.useState)({}),w=async t=>{if(y)return;let s=`${e}/${t}`;v(t);try{let e=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s})}),t=await e.json();k(e=>({...e,[s]:t.ok?"ok":"error"}))}catch{k(e=>({...e,[s]:"error"}))}finally{v(null)}},$=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),A=async()=>{if(!p.trim()||h)return;let a=p.trim(),[i]=N({models:[{id:a}],modelAliases:s,providerStorageAlias:e,providerDisplayAlias:t});if(!i)return void alert("This model already exists.");f(!0);try{await n(a,i.alias,e),x("")}catch(e){console.log("Error adding model:",e),alert(e?.message||`Failed to add model "${a}".`)}finally{f(!1)}},T=async()=>{if(g)return;let a=u.find(e=>!1!==e.isActive);if(a){b(!0);try{let i=await fetch(`/api/providers/${a.id}/models`),r=await i.json();if(!i.ok)return void alert(r.error||"Failed to import models");let l=r.models||[];if(0===l.length)return void alert("No models returned from /models.");let n=N({models:l,modelAliases:s,providerStorageAlias:e,providerDisplayAlias:t});if(0===n.length)return void alert("No new models were added.");let o=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({aliases:n.map(({alias:e,model:t})=>({alias:e,model:t}))})}),d=await o.json();if(!o.ok)throw Error(d.error||"Failed to save imported models.");await c(),alert(`Successfully added ${d.count||n.length} models.`)}catch(e){console.log("Error importing models:",e),alert(e?.message||"Failed to import models from /models.")}finally{b(!1)}}},E=u.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:p,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&A(),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:A,disabled:!p.trim()||h,children:h?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:T,disabled:!E||g,children:g?"Importing...":"Import from /models"})]}),!E&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),$.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:$.map(({modelId:s,fullModel:i,alias:n})=>(0,a.jsx)(C,{modelId:s,fullModel:`${t}/${s}`,copied:r,onCopy:l,onDeleteAlias:()=>o(n),onTest:u.length>0?()=>w(s):void 0,testStatus:j[`${e}/${s}`],isTesting:y===s},i))})]})}w.propTypes={model:k().shape({id:k().string.isRequired}).isRequired,fullModel:k().string.isRequired,alias:k().string,copied:k().string,onCopy:k().func.isRequired,testStatus:k().oneOf(["ok","error"]),isCustom:k().bool,isFree:k().bool,onDeleteAlias:k().func,onTest:k().func,isTesting:k().bool,onDisable:k().func,thinkingSuffix:k().string},k().string.isRequired,k().string.isRequired,k().string,k().func.isRequired,k().func.isRequired,k().func,k().oneOf(["ok","error"]),k().bool,k().string.isRequired,k().object.isRequired,k().string,k().func.isRequired,k().func.isRequired,k().func.isRequired,S.propTypes={providerStorageAlias:k().string.isRequired,providerDisplayAlias:k().string.isRequired,modelAliases:k().object.isRequired,copied:k().string,onCopy:k().func.isRequired,onSetAlias:k().func.isRequired,onDeleteAlias:k().func.isRequired,onAliasesChanged:k().func.isRequired,connections:k().arrayOf(k().shape({id:k().string,isActive:k().bool})).isRequired,isAnthropic:k().bool};var $=s(81277);function A({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime();if(!Number.isFinite(t))return void s("");let a=t-Date.now();if(a<=0)return void s("");let i=Math.floor(a/1e3);if(i<60)s(`${i}s`);else if(i<3600)s(`${Math.floor(i/60)}m ${i%60}s`);else{let e=Math.floor(i/3600),t=Math.floor(i%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:r,isLast:l,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:u,onEdit:m,onDelete:p,oneByOneStatus:x=null}){let[h,f]=(0,i.useState)(!1),[g,b]=(0,i.useState)(!1),v=(0,i.useRef)(null),j=(0,i.useMemo)(()=>new Map((t||[]).map(e=>[e.id,e])),[t]),k=(0,i.useMemo)(()=>t||[],[t]),w=e.providerSpecificData?.proxyPoolId||null,N=w?j.get(w):null,C=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,S=!!w||C,E=N?`Pool: ${N.name}`:w?`Pool: ${w} (inactive/missing)`:C?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",I="";if(N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);I=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{I=t}}let P=N?.noProxy||e.providerSpecificData?.connectionNoProxy||"",R="default";N?.isActive===!0?R="success":(w||C)&&(R="error"),(0,i.useEffect)(()=>{if(!h)return;let e=e=>{v.current&&!v.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);let _=async e=>{b(!0);try{await u("__none__"===e?null:e)}finally{b(!1),f(!1)}},O=e.authType||(s?"oauth":"apikey"),D="oauth"===O,q="cookie"===O,z=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),U=D?z(e.email)?e.email:z(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",M=(0,$.c)(e),L=null!==M,F="unavailable"!==e.testStatus||L?e.testStatus:"active",K=(0,y.d4)(e),J=!!e.quarantinedAt,B={policy_suspended:"Policy suspension",credential_rejected:"Credential rejected",reauth_required:"Sign-in required",authentication:"Repeated authentication failure"}[e.failureClass]||e.quarantineReason||"Account quarantined",H=Number.isFinite(Date.parse(e.quarantinedAt))?new Date(e.quarantinedAt).toLocaleString():e.quarantinedAt||null,G=e.modelLockReason?.resetsAt,W=Number.isFinite(Date.parse(G))?new Date(G).toLocaleString():G||null,Q=()=>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&&!J?"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: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_up"})}),(0,a.jsx)("button",{onClick:o,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_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:q?"cookie":D?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:U}),(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=(0,y.BU)(K);return"active"!==K.key?t:"active"===F||"success"===F?"success":"error"===F||"expired"===F||"unavailable"===F?"error":"default"})(),size:"sm",dot:!0,children:K.label||F||"unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:D?"OAuth":q?"Cookie":"API Key"}),J&&(0,a.jsx)(d.Ex,{variant:"error",size:"sm",children:"Quarantined"}),S&&(0,a.jsx)(d.Ex,{variant:R,size:"sm",children:"Proxy"}),e.autoDisabledAt&&!J&&(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()]}),J&&(0,a.jsxs)("span",{className:"max-w-full truncate text-xs text-red-600 dark:text-red-400 sm:max-w-[420px]",title:`${e.quarantineReason||B}${H?` - ${H}`:""}`,children:[B,H?` - ${H}`:""]}),L&&!1!==e.isActive&&(0,a.jsx)(A,{until:M}),L&&e.modelLockReason&&!1!==e.isActive&&(0,a.jsxs)("span",{className:"max-w-full truncate text-xs text-amber-600 dark:text-amber-400 sm:max-w-[360px]",title:`${e.modelLockReason.reason}${W?` — resets ${W}`:""}`,children:[e.modelLockReason.model,e.modelLockReason.providerErrorCode?` (${e.modelLockReason.providerErrorCode})`:"",W?` — resets ${W}`:""]}),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]}),Q()&&(0,a.jsx)(d.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:Q()})]}),S&&(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:E,children:E}),I&&(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:I}),P&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:P,children:["no_proxy: ",P]})]}),J&&!1===e.isActive&&(0,a.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Re-enable only permits router requests again; it does not change the account's upstream status."})]})]}),(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:[k.length>0&&(0,a.jsxs)("div",{className:"relative",ref:v,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 ${S?"text-primary":"text-text-muted hover:text-primary"}`,disabled:g,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:g?"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:()=>_("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),k.map(e=>(0,a.jsx)("button",{onClick:()=>_(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:m,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":J?"Re-enable routing only; upstream suspension or credential status is unchanged":"Enable connection"})]})]})}A.propTypes={until:k().string.isRequired},T.propTypes={connection:k().shape({id:k().string,name:k().string,email:k().string,displayName:k().string,modelLockUntil:k().string,testStatus:k().string,isActive:k().bool,lastError:k().string,failureClass:k().string,quarantinedAt:k().string,quarantineReason:k().string,priority:k().number,globalPriority:k().number}).isRequired,proxyPools:k().arrayOf(k().shape({id:k().string,name:k().string,proxyUrl:k().string,noProxy:k().string,isActive:k().bool})),isOAuth:k().bool.isRequired,isFirst:k().bool.isRequired,isLast:k().bool.isRequired,onMoveUp:k().func.isRequired,onMoveDown:k().func.isRequired,onToggleActive:k().func.isRequired,onUpdateProxy:k().func,onEdit:k().func.isRequired,onDelete:k().func.isRequired,oneByOneStatus:k().shape({state:k().string,error:k().string})};var E=s(28915);let I=`name1|sk-key1
2
- name2|sk-key2
3
- sk-key-only-auto-named`;function P({isOpen:e,provider:t,providerName:s,isCompatible:r,isAnthropic:l,authType:n,authHint:o,website:u,proxyPools:m,error:p,onSave:x,onBulkDone:h,onClose:f}){let g="__none__",b="ollama-local"===t,y="cookie"===n,v="xai"===t&&!y,j=y?"Cookie Value":"API Key",k=y?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",w="azure"===t,N="cloudflare-ai"===t,C=c.Q2?.[t]?.regions||null,S=c.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[$,A]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[T,R]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[_,O]=(0,i.useState)({accountId:""}),[D,q]=(0,i.useState)(S),[z,U]=(0,i.useState)(!1),[M,L]=(0,i.useState)(null),[F,K]=(0,i.useState)(!1),[J,B]=(0,i.useState)("single"),[H,G]=(0,i.useState)(""),[W,Q]=(0,i.useState)(null),V=(0,i.useRef)(!1);(0,i.useEffect)(()=>{e&&!V.current&&(A({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),R({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),O({accountId:""}),q(S),L(null),B("single"),G(""),Q(null)),V.current=e},[e]);let Z=()=>b&&$.ollamaHostUrl.trim()?{baseUrl:$.ollamaHostUrl.trim()}:w?{azureEndpoint:T.azureEndpoint,apiVersion:T.apiVersion,deployment:T.deployment,organization:T.organization}:N?{accountId:_.accountId}:C&&D?{region:D}:void 0,X=async()=>{U(!0);try{let e=await (0,E.x6)("/api/providers/validate",{method:"POST",body:{provider:t,apiKey:$.apiKey,providerSpecificData:Z()}});L(e.valid?"success":"failed")}catch{L("unknown")}finally{U(!1)}},Y=async()=>{if(t&&(b||$.apiKey)&&(b||$.name)&&(!r||$.defaultModel.trim())){K(!0);try{let e=!1;try{U(!0),L(null),e=!!(await (0,E.x6)("/api/providers/validate",{method:"POST",body:{provider:t,apiKey:$.apiKey,providerSpecificData:Z()}})).valid,L(e?"success":"failed")}catch{L("unknown")}finally{U(!1)}let s=Number.parseInt($.priority,10);await x({name:$.name||(b?"Ollama Local":""),apiKey:$.apiKey,defaultModel:r?$.defaultModel.trim():void 0,priority:Number.isFinite(s)?s:1,proxyPoolId:$.proxyPoolId===g?null:$.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:Z()})}finally{K(!1)}}},ee=async()=>{let e=H.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;K(!0),Q(null);let s=0,a=0,i=[],r=[];for(let l=0;l<e.length;l++){let n=e[l].split("|"),o=n.length>=2?n.slice(1).join("|").trim():n[0].trim(),d=n.length>=2?n[0].trim():"Key",c=`${d} ${l+1}`;try{await (0,E.x6)("/api/providers",{method:"POST",body:{provider:t,apiKey:o,name:c,priority:1,testStatus:"unknown"}}),s++}catch(t){a++,i.push({line:e[l],message:t?.message||"Request failed"}),r.push(e[l])}}K(!1),Q({success:s,failed:a,failedRows:i}),G(r.join("\n")),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"===J?"primary":"ghost",onClick:()=>{B("single"),Q(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===J?"primary":"ghost",onClick:()=>{B("bulk"),Q(null)},children:"Bulk Add"})]}),"bulk"===J&&(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:H,onChange:e=>G(e.target.value)}),W&&(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(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`:""]}),W.failedRows?.length>0&&(0,a.jsx)("ul",{className:"text-xs text-red-500 flex flex-col gap-0.5",children:W.failedRows.map((e,t)=>(0,a.jsxs)("li",{className:"break-words",children:[(0,a.jsx)("span",{className:"font-mono",children:e.line.length>40?`${e.line.slice(0,40)}…`:e.line}),` — ${e.message}`]},t))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:ee,fullWidth:!0,disabled:F||!H.trim(),children:F?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===J&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:$.name,onChange:e=>A({...$,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),b&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:$.ollamaHostUrl,onChange:e=>A({...$,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:X,disabled:z||F,variant:"secondary",children:z?"Checking...":"Check"})})]}),!b&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:j,type:y?"text":"password",value:$.apiKey,onChange:e=>A({...$,apiKey:e.target.value}),placeholder:k,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:X,disabled:!$.apiKey||z||F,variant:"secondary",children:z?"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,u&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",u.replace(/^https?:\/\//,"")]})]})]}),C&&(0,a.jsx)(d.l6,{label:"Region",value:D,onChange:e=>q(e.target.value),options:C.map(e=>({value:e.id,label:e.label}))}),r&&(0,a.jsx)(d.pd,{label:"Default Model",value:$.defaultModel,onChange:e=>A({...$,defaultModel:e.target.value}),placeholder:l?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),b&&(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"}),")."]}),M&&(0,a.jsx)(d.Ex,{variant:"success"===M?"success":"failed"===M?"error":"default",children:"success"===M?"Valid":"failed"===M?"Invalid":"Could not validate"}),p&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:p}),r&&(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."}),N&&(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:_.accountId,onChange: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"})]})]}),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:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:T.azureEndpoint,onChange:e=>R({...T,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:T.deployment,onChange:e=>R({...T,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:T.apiVersion,onChange:e=>R({...T,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:T.organization,onChange:e=>R({...T,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:$.priority,onChange:e=>A({...$,priority:e.target.value}),onBlur:e=>{let t=Number.parseInt(e.target.value,10);A(e=>({...e,priority:Number.isFinite(t)?t:1}))}}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:$.proxyPoolId,onChange:e=>A({...$,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(m||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(m||[]).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:Y,fullWidth:!0,disabled:F||!b&&(!$.name||!$.apiKey)||r&&!$.defaultModel.trim()||w&&(!T.azureEndpoint||!T.deployment||!T.organization)||N&&!_.accountId,children:F?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function R({isOpen:e,node:t,onSave:s,onClose:r,isAnthropic:l}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,u]=(0,i.useState)(!1),[m,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[b,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&(o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(l?"https://api.anthropic.com/v1":"https://api.openai.com/v1")}),p(""),h(""),y(null))},[t,l]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){u(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};l||(e.apiType=n.apiType),await s(e)}finally{u(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:l?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();y(t.valid?"success":"failed")}catch{y("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${l?"Anthropic":"OpenAI"} Compatible`,onClose:r,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:`${l?"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:l?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!l&&(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:l?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${l?"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:m,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:!m||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."}),b&&(0,a.jsx)(d.Ex,{variant:"success"===b?"success":"error",children:"success"===b?"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:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function _({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:r,onClose:l}){let[n,o]=(0,i.useState)(""),[c,u]=(0,i.useState)(null),[m,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),u(null),p(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(n.trim());if(e){u("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();u(a.ok?"ok":"error"),p(a.error||"")}catch(e){u("error"),p(e.message)}}},b=async()=>{let e=f(n.trim());if(e&&!x){h(!0);try{await r(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:l,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),u(null),p("")},onKeyDown:e=>{"Enter"===e.key&&g()},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:g,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:m||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:b,fullWidth:!0,size:"sm",disabled:!n.trim()||x,children:x?"Adding...":"Add Model"})]})]})})}P.propTypes={isOpen:k().bool.isRequired,provider:k().string,providerName:k().string,isCompatible:k().bool,isAnthropic:k().bool,authType:k().string,authHint:k().string,website:k().string,proxyPools:k().arrayOf(k().shape({id:k().string,name:k().string})),error:k().string,onSave:k().func.isRequired,onBulkDone:k().func,onClose:k().func.isRequired},R.propTypes={isOpen:k().bool.isRequired,node:k().shape({id:k().string,name:k().string,prefix:k().string,apiType:k().string,baseUrl:k().string}),onSave:k().func.isRequired,onClose:k().func.isRequired,isAnthropic:k().bool},_.propTypes={isOpen:k().bool.isRequired,providerAlias:k().string.isRequired,providerDisplayAlias:k().string.isRequired,onSave:k().func.isRequired,onClose:k().func.isRequired};let O="kiro-bulk-import-active-job",D="Bulk import progress expired or was cleared.";function q(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 M(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 L(){let e,t=(0,r.useParams)(),s=(0,r.useRouter)(),l=t.id,[u,g]=(0,i.useState)([]),[j,k]=(0,i.useState)(!0),[N,C]=(0,i.useState)(""),[$,A]=(0,i.useState)(null),[E,I]=(0,i.useState)([]),[L,F]=(0,i.useState)(!1),[K,J]=(0,i.useState)(!1),[B,H]=(0,i.useState)(!1),[G,W]=(0,i.useState)(!1),[Q,V]=(0,i.useState)(""),[Z,X]=(0,i.useState)(!1),[Y,ee]=(0,i.useState)(!1),[et,es]=(0,i.useState)(!1),[ea,ei]=(0,i.useState)(null),[er,el]=(0,i.useState)({}),[en,eo]=(0,i.useState)(!1),[ed,ec]=(0,i.useState)({}),[eu,em]=(0,i.useState)({}),[ep,ex]=(0,i.useState)(null),[eh,ef]=(0,i.useState)(!1),[eg,eb]=(0,i.useState)([]),[ey,ev]=(0,i.useState)("__none__"),[ej,ek]=(0,i.useState)(!1),[ew,eN]=(0,i.useState)(!1),[eC,eS]=(0,i.useState)(null),[e$,eA]=(0,i.useState)(""),[eT,eE]=(0,i.useState)("auto"),[eI,eP]=(0,i.useState)([]),[eR,e_]=(0,i.useState)([]),[eO,eD]=(0,i.useState)([]),[eq,ez]=(0,i.useState)(null),[eU,eM]=(0,i.useState)(!1),[eL,eF]=(0,i.useState)(!1),[eK,eJ]=(0,i.useState)(!1),[eB,eH]=(0,i.useState)(null),[eG,eW]=(0,i.useState)({}),[eQ,eV]=(0,i.useState)(null),eZ=(0,i.useRef)(!1),eX=(0,i.useRef)(null),eY=(0,i.useRef)("1"),[e0,e1]=(0,i.useState)(!1),[e2,e5]=(0,i.useState)(null),[e4,e3]=(0,i.useState)(""),[e6,e7]=(0,i.useState)(1),[e8,e9]=(0,i.useState)(20),[te,tt]=(0,i.useState)("all"),[ts,ta]=(0,i.useState)(""),[ti,tr]=(0,i.useState)(1),[tl,tn]=(0,i.useState)(20),{copied:to,copy:td}=(0,h.C)(),tc=(0,i.useRef)(0),tu=(0,i.useRef)([]),tm=(0,i.useRef)(!0),tp="ag_risk_confirmed",tx=(0,i.useCallback)(()=>{e5(null),e3(""),tc.current=0,window.localStorage.removeItem(O)},[]),th=()=>{F(!0)},tf=()=>{"kiro"===l&&e2?.jobId&&q(e2.status)&&tx(),s.push(p(l))},tg=()=>{V(""),W(!0)},tb=()=>{tj?(()=>{if(m(l))return"antigravity"===l&&"true"!==window.localStorage.getItem(tp)?eM(!0):tf();if("antigravity"===l&&"true"!==window.localStorage.getItem(tp))return eM(!0);tj?th():(V(""),W(!0))})():tg()},ty=$?{id:$.id,name:$.name||("anthropic-compatible"===$.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===$.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===$.type?"AC":"OC",apiType:$.apiType,baseUrl:$.baseUrl,type:$.type}:c.zN[l]||c.fg[l]||c.IS[l]||c.nJ[l]||c.br[l],tv=ty?.authModes||[],tj=!!c.zN[l]||!!c.IS[l]||tv.includes("oauth"),tk=!!c.fg[l]||tv.includes("apikey"),tw=!!c.IS[l]?.noAuth,tN=(0,x.KC)(l),tC=(0,c.wG)(l),tS=(0,c.mq)(l),t$=(0,c.gb)(l),tA=tS||t$,tT=!tA&&tj&&tk,tE=m(l),tI="xai"===l?"Grok Build OAuth":"OAuth",tP="xai"===l?"xAI API Key":"API Key",tR=c.Q2[l]?.thinkingConfig||c.s9.extended,t_=tA?l:tC,tO=tA?$?.prefix||l:tC,tD=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(t_)}`,{cache:"no-store"}),t=await e.json();e.ok&&eD(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[t_]),tq=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t_,ids:[e]})})).ok&&await tD()}catch(e){console.log("Error disabling model:",e)}},tz=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(t_)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tD()}catch(e){console.log("Error enabling model:",e)}},tU=async e=>{e.length&&ez({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{ez(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t_,ids:e})})).ok&&await tD()}catch(e){console.log("Error disabling all models:",e)}}})},tM=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(t_)}`,{method:"DELETE"})).ok&&await tD()}catch(e){console.log("Error enabling all models:",e)}},tL=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&el(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===l&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&e_(e.models)}).catch(()=>{})},[l]);let tF=(0,i.useCallback)(async()=>{try{C("");let[e,t,s,a]=await Promise.allSettled([M("/api/providers"),M("/api/provider-nodes"),M("/api/proxy-pools?isActive=true"),M("/api/settings")]),i="fulfilled"===e.status?e.value.response:null,r="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:{},u="fulfilled"===a.status?a.value.response:null,m=u?.ok&&a.value.data||{};if(i?.ok){let e=(r.connections||[]).filter(e=>e.provider===l);tu.current=e,g(e)}else C("Connections could not be loaded.");d?.ok&&I(c.proxyPools||[]);let p=(m.providerStrategies||{})[l]||{};eS(p.fallbackStrategy||null),eA(null!=p.stickyRoundRobinLimit?String(p.stickyRoundRobinLimit):"1"),eY.current=null!=p.stickyRoundRobinLimit?String(p.stickyRoundRobinLimit):"1";let x=(m.providerThinking||{})[l]||{};if(eE(x.mode||"auto"),n?.ok){let e=(o.nodes||[]).find(e=>e.id===l)||null;if(!e&&tA)for(let t=0;t<3;t+=1){if(await new Promise(e=>setTimeout(e,150)),!tm.current)return;let{response:t,data:s}=await M("/api/provider-nodes");if(!tm.current)return;if(t.ok&&(e=(s.nodes||[]).find(e=>e.id===l)||null))break}A(e)}}catch(e){console.log("Error fetching connections:",e),tm.current&&C("Connections could not be loaded.")}finally{tm.current&&k(!1)}},[l,tA]),tK=async e=>{try{let t=await fetch(`/api/provider-nodes/${l}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(A(s.node),await tF(),ee(!1))}catch(e){console.log("Error updating provider node:",e)}},tJ=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 r={...a};0===Object.keys(i).length?delete r[l]:r[l]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:r})})}catch(e){console.log("Error saving provider strategy:",e)}},tB=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[l]={mode:e}:delete s[l],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}};(0,i.useEffect)(()=>{tF(),tL(),tD()},[tF,tL,tD]),(0,i.useEffect)(()=>(tm.current=!0,()=>{tm.current=!1}),[]),(0,i.useEffect)(()=>{ez(null),ec({}),em({}),ex(null),eP([]),eW({}),eV(null),eH(null),eF(!1),eJ(!1),eZ.current=!0,e3("")},[l]),(0,i.useEffect)(()=>{e7(1),tr(1),tt("all"),ta("")},[l]),(0,i.useEffect)(()=>{e7(1)},[te,e8,ts]),(0,i.useEffect)(()=>{eo(!1)},[l]),(0,i.useEffect)(()=>{tr(1)},[tl,eO.length,tN.length,eR.length]),(0,i.useEffect)(()=>{if("kiro"!==l)return;let e=window.localStorage.getItem(O),t=!1;return(async()=>{try{if(e3(""),e2?.jobId)return;let a=await U();if(!t&&a.res.ok&&a.data?.job){e5(a.data.job),tc.current=a.data.job.summary?.success||0,window.localStorage.setItem(O,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))){e5(a.data.job),tc.current=a.data.job.summary?.success||0;return}tx(),e3(D)}}catch{t||e3(D)}})(),()=>{t=!0}},[tx,e2?.jobId,l]),(0,i.useEffect)(()=>{if(!("kiro"!==l||!e2?.jobId||q(e2.status)))return(0,v.M)(async e=>{let t=await z(e2.jobId);if(!e()){if(t?.res.ok&&t.data?.job){let s=t.data.job.summary?.success||0;if(s>tc.current&&(tc.current=s,await tF(),e()))return;e3(""),e5(t.data.job);return}if(t?.res.status===404){let t=await U();if(e())return;if(t.res.ok&&t.data?.job){let s=t.data.job.summary?.success||0;if(s>tc.current&&(tc.current=s,await tF(),e()))return;e3(""),e5(t.data.job),window.localStorage.setItem(O,t.data.job.jobId);return}tx(),e3(D)}}},2e3)},[tx,tF,e2?.jobId,e2?.status,l]),(0,i.useEffect)(()=>{let e=(c.zN[l]||c.fg[l]||c.IS[l]||c.nJ[l])?.modelsFetcher;e&&b(e).then(eP)},[l]);let tH=async(e,t,s=tC)=>{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 tL();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tG=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tL()}catch(e){console.log("Error deleting alias:",e)}},tW=async()=>{if(e0)return;let e=u.find(e=>!1!==e.isActive);if(!e)return void alert((0,f.Tl)("Please add an active Qoder connection first"));e1(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,f.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,f.Tl)("No models returned"));let i={...er},r=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,""),a=`${t_}/${s}`;!Object.values(i).includes(a)&&(i[s]||(await tH(s,s,t_),i[s]=a,r+=1))}0===r?alert((0,f.Tl)("All models already exist, no new models added")):alert((0,f.Tl)("Successfully added")+` ${r} `+(0,f.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,f.Tl)("Error fetching models")+": "+e.message)}finally{e1(!1)}},tQ=async()=>{let e=[...u];if(eL||0===e.length)return;let t=Object.fromEntries(e.map(e=>[e.id,{state:"queued",error:null}]));eZ.current=!1,eF(!0),eJ(!1),eH(null),eW(t),eV({total:e.length,completed:0,passed:0,failed:0,stopped:!1});let s=0,a=0;try{for(let t=0;t<e.length;t+=1){if(eZ.current){eV({total:e.length,completed:t,passed:s,failed:a,stopped:!0});break}let i=e[t];if(!tu.current.some(e=>e.id===i.id)){eW(e=>({...e,[i.id]:{state:"skipped",error:null}})),eV({total:e.length,completed:t+1,passed:s,failed:a,stopped:!1});continue}eH(i.id),eW(e=>({...e,[i.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${i.id}/test`,{method:"POST"}),t=await e.json(),r=!!t.valid;r?s+=1:a+=1,eW(e=>({...e,[i.id]:{state:r?"success":"failed",error:r?null:t.error||null}}))}catch(e){a+=1,eW(t=>({...t,[i.id]:{state:"failed",error:e.message||"Test failed"}}))}eV({total:e.length,completed:t+1,passed:s,failed:a,stopped:!1}),t<e.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eH(null),eF(!1),eJ(!1),eZ.current=!1}},tV=async e=>{ez({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{ez(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&g(u.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tZ=()=>{tF(),F(!1)},tX=(0,i.useCallback)(e=>{(e5(e),e3(""),e?.jobId)?(window.localStorage.setItem(O,e.jobId),tc.current=Math.max(tc.current,e.summary?.success||0)):tx()},[tx]),tY=async e=>{V("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:l,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tF(),W(!1);return}V(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),V("Failed to save connection")}},t0=async e=>{try{(await fetch(`/api/providers/${ea.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tF(),X(!1))}catch(e){console.log("Error updating connection:",e)}},t1=async(e,t)=>{try{let s=await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})});if(s.ok){let a=await s.json().catch(()=>null);g(s=>s.map(s=>s.id===e?{...s,isActive:t,...a?.connection||{}}:s))}}catch(e){console.log("Error updating connection status:",e)}},t2=async(e,t)=>{let s=[...u];[s[e],s[t]]=[s[t],s[e]],g(s);try{let[a,i]=await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e+1})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t+1})})]);a.ok&&i.ok||(console.log("Priority swap rejected:",a.status,i.status),await tF())}catch(e){console.log("Error swapping priority:",e),await tF()}},t5=(0,i.useMemo)(()=>{let e=ts.trim().toLowerCase();return u.filter(t=>!!(0,y.i2)(t,te)&&(!e||[t.name,t.email,t.id,t.account,t.username,t.label,t.authType,t.notes,t.proxyPoolId].filter(Boolean).join(" ").toLowerCase().includes(e)))},[u,te,ts]),t4=(0,i.useMemo)(()=>y.gJ.reduce((e,t)=>(e[t.id]="all"===t.id?u.length:u.filter(e=>(0,y.i2)(e,t.id)).length,e),{}),[u]),t3=eg.filter(e=>u.some(t=>t.id===e)),t6=u.filter(e=>t3.includes(e.id)),t7="codebuddy"===l?(t6.length>0?t6:u).map(e=>e.id):[],t8=t5.length>0&&t5.every(e=>t3.includes(e.id)),t9=(()=>{if(0===t6.length)return"";let e=new Set(t6.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let s=E.find(e=>e.id===t);return`All selected currently bound to ${s?.name||t}`}return"Selected connections have mixed proxy bindings"})(),se=()=>{ej||es(!1)},st=async e=>{ek(!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 tF(),es(!1)}finally{ek(!1)}},ss=e=>st(t6.map(t=>({connectionId:t.id,proxyPoolId:e}))),sa=e=>{let t="gsuite"===e?"GSuite (non-Gmail)":"Gmail (@gmail.com)";ez({title:`Delete ${t}`,message:`Delete ALL ${t} accounts for this provider? This cannot be undone.`,onConfirm:async()=>{ez(null);try{(await fetch("/api/providers/bulk-delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:ty?.id||l,emailFilter:e})})).ok&&(eb([]),await tF())}catch(e){console.error("bulk delete error:",e)}}})},si=Math.max(1,Math.ceil(t5.length/e8)),sr=Math.min(e6,si),sl=t5.slice((sr-1)*e8,sr*e8),sn=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:sl.map((e,t)=>{let s,i=u.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,t3.includes(s)),onChange:()=>{var t;return t=e.id,void eb(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:E,isOAuth:tj,isFirst:0===i,isLast:i===u.length-1,onMoveUp:()=>t2(i,i-1),onMoveDown:()=>t2(i,i+1),onToggleActive:t=>t1(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&&g(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:()=>{ei(e),X(!0)},onDelete:()=>tV(e.id),oneByOneStatus:eG[e.id]||null})})]},e.id)})}),so=E.filter(e=>!0===e.isActive),sd=(0,a.jsx)(d.aF,{isOpen:et,onClose:se,title:`Apply Proxy (${t6.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=E.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):st(t6.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:ej||0===so.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:()=>ss(null),disabled:ej,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)"})]}),E.map(e=>(0,a.jsxs)("button",{onClick:()=>ss(e.id),disabled:ej||!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))]}),ej&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:se,variant:"ghost",fullWidth:!0,disabled:ej,children:"Cancel"})]})}),sc=async e=>{if(!ep){ex(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t_}/${e}`})}),s=await t.json();ec(t=>({...t,[e]:s.ok?"ok":"error"})),em(t=>({...t,[e]:s.ok?"":s.error||"Model not reachable"}))}catch{ec(t=>({...t,[e]:"error"})),em(t=>({...t,[e]:"Network error"}))}finally{ex(null)}}};return j?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):ty?(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:`${ty.color}15`},children:en?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:ty.color},children:ty.textIcon||ty.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:tS&&ty.apiType?"responses"===ty.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":t$?"/providers/anthropic-m.png":`/providers/${ty.id}.png`,alt:ty.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>eo(!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:ty.name}),(ty.notice?.apiKeyUrl||ty.notice?.signupUrl||ty.website)&&(0,a.jsxs)("a",{href:ty.notice?.apiKeyUrl||ty.notice?.signupUrl||ty.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"}),ty.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[u.length," connection",1===u.length?"":"s"]})]})]})]}),ty.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:ty.deprecationNotice})]}),ty.notice?.text&&!ty.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:ty.notice.text}),ty.notice.apiKeyUrl&&(0,a.jsx)("a",{href:ty.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 →"})]}),tA&&$&&(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:t$?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[t$?"Messages API":"responses"===$.apiType?"Responses API":"Chat Completions"," \xb7 ",($.baseUrl||"").replace(/\/$/,""),"/",t$?"messages":"responses"===$.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:()=>{V(""),W(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ee(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{ez({title:"Delete Compatible Node",message:`Delete this ${t$?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{ez(null);try{(await fetch(`/api/provider-nodes/${l}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tw?(0,a.jsx)(d.gw,{providerId:l}):(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:[u.length>0&&E.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>{if(0===t6.length)return;let e=[...new Set(t6.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"))];ev(1===e.length?e[0]:"__none__"),es(!0)},disabled:0===t6.length,children:"Apply Proxy"}),u.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tQ,disabled:eL,children:eL?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eL&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eL&&(eZ.current=!0,eJ(!0))},disabled:eK,children:eK?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Thinking"}),(0,a.jsx)("select",{value:eT,onChange:e=>{var t;eE(t=e.target.value),tB(t)},className:"text-xs px-2 py-1 border border-border rounded-md bg-background focus:outline-none focus:border-primary",title:"Forces reasoning_effort on requests; model chips copy as alias/model(level)",children:(tR?.options||c.mt).map(e=>(0,a.jsx)("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(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"===eC,onChange:e=>{let t=e?"round-robin":null,s=e?e$||"1":e$;e&&!e$&&eA("1"),eY.current=s,eX.current&&(clearTimeout(eX.current),eX.current=null),eS(t),tJ(t,s)}}),"round-robin"===eC&&(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:e$,onChange:e=>{var t;eA(t=e.target.value),eY.current=t,eX.current&&clearTimeout(eX.current),eX.current=setTimeout(()=>{tJ("round-robin",eY.current)},500)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),u.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:t8,onChange:()=>{t8?eb(e=>e.filter(e=>!t5.some(t=>t.id===e))):eb(e=>Array.from(new Set([...e,...t5.map(e=>e.id)])))},className:"size-4 rounded border-black/20 dark:border-white/20"}),t8?"Unselect visible":"Select visible"]}),(0,a.jsxs)(d.Ex,{variant:"default",children:[t5.length," visible"]}),t6.length>0&&(0,a.jsxs)(d.Ex,{variant:"default",children:[t6.length," selected"]}),t9&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:t9}),t6.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:()=>{eb([]),ev("__none__")},children:"Clear"}),t6.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:()=>{0!==t6.length&&ez({title:"Delete Selected Connections",message:`Delete ${t6.length} selected connection(s)? This permanently removes the selected accounts.`,onConfirm:async()=>{ez(null);let e=[],t=0;for(let s of t6)try{(await fetch(`/api/providers/${s.id}`,{method:"DELETE"})).ok?e.push(s.id):t+=1}catch(e){console.log("Error deleting selected connection:",e),t+=1}eb(t=>t.filter(t=>!e.includes(t))),t>0&&alert(`Deleted ${e.length} connection(s); ${t} failed.`),await tF()}})},children:["Delete Selected (",t6.length,")"]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"domain",onClick:()=>sa("gsuite"),children:"Delete GSuite"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"mail",onClick:()=>sa("gmail"),children:"Delete Gmail"})]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:y.gJ.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>tt(e.id),className:`rounded-full border px-2.5 py-1 text-xs transition-colors ${te===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:t4[e.id]||0})]},e.id))}),u.length>=20&&(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-[16px] text-text-subtle",children:"search"}),(0,a.jsx)("input",{type:"search",value:ts,onChange:e=>ta(e.target.value),placeholder:`Search ${u.length} connections (email, name, id)…`,className:"w-full rounded-lg border border-border bg-background py-2 pl-8 pr-3 text-xs text-text-main outline-none placeholder:text-text-subtle focus:border-primary/40"})]})]}),N?(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:N})]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:()=>{k(!0),tF()},children:"Retry"})]}):0===u.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:tj?"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"}),tT&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tI," or ",tP,"."]})]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[tE&&(0,a.jsx)(d.$n,{size:"sm",icon:"automation",onClick:tf,children:"Open Automation"}),tT?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:th,children:tI}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tg,children:tP})]}):tE?null:(0,a.jsxs)(a.Fragment,{children:[!tA&&"iflow"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>J(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:tb,children:tA?"Add API Key":"iflow"===l?"OAuth":"Add Connection"})]})]})]}),"kiro"===l&&e2?.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: ",e2.status," | Success: ",e2.summary?.success||0," | Running: ",e2.summary?.running||0," | Queued: ",e2.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(p("kiro")),children:"Resume Bulk Progress"}),q(e2.status)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"close",onClick:tx,children:"Clear"})]})]}),"kiro"===l&&!e2?.jobId&&e4&&(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:e4})]}):(0,a.jsxs)(a.Fragment,{children:[eQ&&(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: ",eQ.total]}),(0,a.jsxs)("span",{children:["Completed: ",eQ.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eQ.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eQ.failed]}),eQ.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eL&&eB&&(0,a.jsxs)("span",{children:["Running: ",u.find(e=>e.id===eB)?.name||eB]})]})}),"kiro"===l&&e2?.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: ",e2.status," | Success: ",e2.summary?.success||0," | Running: ",e2.summary?.running||0," | Queued: ",e2.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(p("kiro")),children:"Resume Bulk Progress"}),q(e2.status)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"close",onClick:tx,children:"Clear"})]})]}),"kiro"===l&&!e2?.jobId&&e4&&(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:e4}),sn,"kiro"===l&&si>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 ",sr," of ",si," • Showing ",(sr-1)*e8+1,"-",Math.min(sr*e8,t5.length)," of ",t5.length," connections"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",disabled:sr<=1,onClick:()=>e7(e=>Math.max(1,e-1)),children:"Previous"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",disabled:sr>=si,onClick:()=>e7(e=>Math.min(si,e+1)),children:"Next"})]})]}),"kiro"!==l&&t5.length>0&&(0,a.jsx)(d.dK,{currentPage:sr,pageSize:e8,totalItems:t5.length,onPageChange:e7,onPageSizeChange:e=>{e9(e),e7(1)},className:"mt-2"}),u.length>0&&0===t5.length&&(0,a.jsx)("div",{className:"py-8 text-center text-sm text-text-muted",children:"No connections match this status filter."}),!tA&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>J(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codebuddy"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>{u.length>1&&0===t6.length?alert("Select the CodeBuddy connection(s) that should use this quota cookie first."):H(!0)},title:"Attach CodeBuddy web cookie for quota tracking",className:"w-full sm:w-auto",children:"Quota Cookie"}),tE&&(0,a.jsx)(d.$n,{size:"sm",icon:"automation",onClick:tf,className:"w-full sm:w-auto",children:"Open Automation"}),tT?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:th,className:"w-full sm:w-auto",children:tI}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tg,className:"w-full sm:w-auto",children:tP})]}):tE?null:(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:tb,className:"w-full sm:w-auto",children:"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"}),!tA&&(e=[...tN,...eR.filter(e=>!tN.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eO.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eO.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tM,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tU(e),children:"Disable All"})]}))]}),Object.values(eu).some(Boolean)&&(0,a.jsx)("div",{className:"mb-3 flex flex-col gap-1",children:Object.entries(eu).filter(([,e])=>!!e).map(([e,t])=>(0,a.jsxs)("p",{className:"text-xs text-red-500 break-words",children:[e,": ",t]},e))}),(()=>{let e,t,s;if(tA)return(0,a.jsx)(S,{providerStorageAlias:t_,providerDisplayAlias:tO,modelAliases:er,copied:to,onCopy:td,onSetAlias:tH,onDeleteAlias:tG,onAliasesChanged:tL,connections:u,isAnthropic:t$});let i=[...tN,...eR.filter(e=>!tN.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),r=new Set(eO),n=i.filter(e=>!r.has(e.id)),o=i.filter(e=>r.has(e.id)),c=Object.entries(er).filter(([e,t])=>{let s=`${t_}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return ty.passthroughModels?!tN.some(e=>e.id===a):!tN.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${t_}/`.length),alias:e,fullModel:t})),m=Math.min(ti,Math.max(1,Math.ceil(n.length/tl))),p=n.slice((m-1)*tl,m*tl);return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[c.map(e=>(0,a.jsx)(w,{model:{id:e.id},fullModel:`${tO}/${e.id}`,alias:e.alias,copied:to,onCopy:td,onSetAlias:()=>{},onDeleteAlias:()=>tG(e.alias),testStatus:ed[e.id],onTest:u.length>0||tw?()=>sc(e.id):void 0,isTesting:ep===e.id,isCustom:!0,isFree:!1,thinkingSuffix:eT&&"auto"!==eT&&"off"!==eT&&"none"!==eT?eT:null},e.id)),p.map(e=>{let t=`${t_}/${e.id}`,s=`${l}/${e.id}`,i=Object.entries(er).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(w,{model:e,fullModel:`${tO}/${e.id}`,alias:i,copied:to,onCopy:td,onSetAlias:t=>tH(e.id,t,t_),onDeleteAlias:()=>tG(i),testStatus:ed[e.id],onTest:u.length>0||tw?()=>sc(e.id):void 0,isTesting:ep===e.id,isFree:e.isFree,onDisable:()=>tq(e.id),thinkingSuffix:eT&&"auto"!==eT&&"off"!==eT&&"none"!==eT?eT:null},e.id)}),n.length>tl&&(0,a.jsx)("div",{className:"w-full",children:(0,a.jsx)(d.dK,{currentPage:m,pageSize:tl,totalItems:n.length,onPageChange:tr,onPageSizeChange:e=>{tn(e),tr(1)}})}),(0,a.jsxs)("button",{onClick:()=>ef(!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"===l&&u.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:tW,disabled:e0,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:e0?{animation:"spin 1s linear infinite"}:void 0,children:e0?"progress_activity":"download"}),e0?(0,f.Tl)("Fetching..."):(0,f.Tl)("Fetch Qoder Models")]}),eI.length>0&&(e=new Set(Object.values(er)),t=new Set(tN.map(e=>e.id)),0===(s=eI.filter(s=>!e.has(`${t_}/${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 tH(e.id,t,t_)},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:()=>tz(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))})]})]})})()]}),sd,"kiro"===l?(0,a.jsx)(d.Mh,{isOpen:L,providerInfo:ty,onSuccess:tZ,onRefresh:tF,initialBulkJobId:e2?.jobId||null,onBulkJobChange:tX,onClose:()=>F(!1)}):"cursor"===l?(0,a.jsx)(d.G9,{isOpen:L,onSuccess:tZ,onClose:()=>F(!1)}):"gitlab"===l?(0,a.jsx)(d.vj,{isOpen:L,providerInfo:ty,onSuccess:tZ,onClose:()=>F(!1)}):(0,a.jsx)(d.LF,{isOpen:L,provider:l,providerInfo:ty,onSuccess:tZ,onClose:()=>F(!1)}),"iflow"===l&&(0,a.jsx)(d.vE,{isOpen:K,onSuccess:()=>{tF(),J(!1)},onClose:()=>J(!1)}),"codebuddy"===l&&(0,a.jsx)(d.xl,{isOpen:B,connectionIds:t7,onSuccess:()=>{tF(),H(!1)},onClose:()=>H(!1)}),(0,a.jsx)(P,{isOpen:G,provider:l,providerName:ty.name,isCompatible:tA,isAnthropic:t$,authType:ty?.authType,authHint:ty?.authHint,website:ty?.website,proxyPools:E,error:Q,onSave:tY,onBulkDone:tF,onClose:()=>{V(""),W(!1)}}),(0,a.jsx)(d.wI,{isOpen:Z,connection:ea,proxyPools:E,onSave:t0,onClose:()=>X(!1)}),tA&&(0,a.jsx)(R,{isOpen:Y,node:$,onSave:tK,onClose:()=>ee(!1),isAnthropic:t$}),!tA&&(0,a.jsx)(_,{isOpen:eh,providerAlias:t_,providerDisplayAlias:tO,onSave:async e=>{let t=ty?.passthroughModels?e.split("/").pop():e;await tH(e,t,t_),ef(!1)},onClose:()=>ef(!1)}),(0,a.jsx)(d.uo,{isOpen:eU,onClose:()=>eM(!1),onConfirm:()=>{(window.localStorage.setItem(tp,"true"),eM(!1),m("antigravity"))?s.push(p("antigravity")):tj?th():tg()},title:"Risk Notice",message:ty?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!eq,onClose:()=>{ew||ez(null)},onConfirm:async()=>{if(ew)return;let e=eq?.onConfirm;if(e){eN(!0);try{await e()}finally{eN(!1)}}},title:eq?.title||"Confirm",message:eq?.message,variant:"danger",loading:ew})]}):(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"})]})}},28915:(e,t,s)=>{"use strict";s.d(t,{x6:()=>a.fetchJson,E2:()=>i,gs:()=>r});var a=s(68211);function i(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}function r(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);if(s<24)return`${s}h ago`;let a=Math.floor(s/24);return`${a}d ago`}},42911:(e,t,s)=>{Promise.resolve().then(s.bind(s,20412))},68211:(e,t,s)=>{"use strict";s.d(t,{fetchJson:()=>i});let a={"Content-Type":"application/json"};async function i(e,t={}){let{body:s,headers:r,...l}=t,n={...l,headers:{...a,...r}};void 0!==s&&"string"!=typeof s?n.body=JSON.stringify(s):void 0!==s&&(n.body=s);let o=await fetch(e,n),d=await o.text(),c=null;if(d)try{c=JSON.parse(d)}catch{let t=Error(`Non-JSON response from ${e} (HTTP ${o.status})`);throw t.status=o.status,t.rawBody=d.slice(0,300),t}if(!o.ok){let e=c&&(c.error?.message||c.error||c.message)||`Request failed (HTTP ${o.status})`,t=Error("string"==typeof e?e:`HTTP ${o.status}`);throw t.status=o.status,t.data=c,t}return c}i.get=(e,t)=>i(e,{...t,method:"GET"}),i.post=(e,t,s)=>i(e,{...s,method:"POST",body:t}),i.put=(e,t,s)=>i(e,{...s,method:"PUT",body:t}),i.patch=(e,t,s)=>i(e,{...s,method:"PATCH",body:t}),i.del=(e,t)=>i(e,{...t,method:"DELETE"})},70217:(e,t,s)=>{"use strict";s.d(t,{BU:()=>u,G9:()=>n,d4:()=>d,gJ:()=>a,i2:()=>c});let a=[{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"]}],i={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}},r={policy_suspended:"banned",credential_rejected:"auth_error",reauth_required:"auth_error",authentication:"auth_error",entitlement_or_quota:"quota_exhausted",rate_limited:"rate_limited",permission_denied:"auth_error",upstream_transient:"connection_error"};function l(e){if(!e)return"";if("string"==typeof e)return e.toLowerCase();try{return JSON.stringify(e).toLowerCase()}catch{return String(e).toLowerCase()}}function n(e={},t=Date.now()){let s=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>new Date(e).getTime()).filter(e=>Number.isFinite(e)&&e>t);return s.length>0?new Date(Math.min(...s)).toISOString():null}function o(e,t=""){let s=i[e]||i.unknown;return{key:e,...s,reason:t}}function d(e={}){var t;let s=(t=e).quarantinedAt?o(r[l(t.failureClass)]||"unknown",t.quarantineReason||t.lastError||"Connection is quarantined"):null;if(s)return s;if(!1===e.isActive)return o("disabled","Connection is disabled");if(function(e={}){return null!==n(e)}(e))return o("cooldown","Model cooldown is active");if(function(e){if(!e)return!1;let t=new Date(e).getTime();return Number.isFinite(t)&&t>Date.now()}(e.rateLimitedUntil))return o("rate_limited","Rate limit cooldown is active");let a=l(e.testStatus||e.status),i=l(e.lastErrorType||e.errorType),c=l(e.errorCode||e.statusCode),u=l(e.lastError||e.error),m=`${a} ${i} ${c} ${u}`.trim();return!m||["active","success","ok"].includes(a)?o("active",""):m.includes("ban")||m.includes("suspend")||m.includes("restricted")?o("banned",e.lastError||"Account appears restricted"):m.includes("exhaust")||m.includes("quota exceeded")||m.includes("insufficient_quota")||m.includes("payment required")||"402"===c?o("quota_exhausted",e.lastError||"Quota exhausted"):i.includes("rate_limited")||m.includes("rate limit")||m.includes("too many requests")||"429"===c?o("rate_limited",e.lastError||"Rate limited"):i.includes("auth")||i.includes("token")||m.includes("unauthorized")||m.includes("invalid api key")||m.includes("token invalid")||m.includes("token expired")||m.includes("revoked")||"401"===c||"403"===c?o("auth_error",e.lastError||"Authentication failed"):i.includes("network")||m.includes("network")||m.includes("timeout")||m.includes("fetch failed")||m.includes("econn")||m.includes("dns")||m.includes("proxy")?o("connection_error",e.lastError||"Connection failed"):["error","expired","unavailable","failed"].includes(a)?o("connection_error",e.lastError||e.testStatus||"Connection failed"):o("unknown",e.lastError||e.testStatus||"")}function c(e,t){if(!t||"all"===t)return!0;let s=a.find(e=>e.id===t);return!s||s.keys.includes(d(e).key)}function u(e){return e?.severity==="success"?"success":e?.severity==="error"?"error":"default"}},81277:(e,t,s)=>{"use strict";s.d(t,{c:()=>r});var a=s(12115),i=s(70217);function r(e={}){let[t,s]=(0,a.useState)(null),l=JSON.stringify(Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).sort(([e],[t])=>e.localeCompare(t)));return(0,a.useEffect)(()=>(function(e,t,s={}){let a=s.now||Date.now,r=s.setTimer||globalThis.setTimeout,l=s.clearTimer||globalThis.clearTimeout,n=!1,o=null,d=()=>{if(o=null,n)return;let s=a(),l=(0,i.G9)(e,s);t(l),l&&(o=r(d,Math.min(Math.max(1,new Date(l).getTime()-s+1),0x7fffffff)))};return o=r(d,0),()=>{n=!0,null!==o&&l(o),o=null}})(Object.fromEntries(JSON.parse(l)),s),[l]),t}}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=42911)),_N_E=e.O()}]);