switchboard-router 0.5.21 → 0.6.1

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 (1238) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +17 -7
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +3 -435
  5. package/app/.next-cli-build/required-server-files.json +9 -2
  6. package/app/.next-cli-build/routes-manifest.json +92 -13
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js +2 -2
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +11 -24
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js +2 -2
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +3 -3
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +16 -16
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +4 -4
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -2
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js +2 -2
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  83. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  94. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  97. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  98. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  99. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  101. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  104. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/agent-library/export/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/agent-library/export/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/agent-library/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/agent-library/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/agent-library/updates/route.js +1 -0
  119. package/app/.next-cli-build/server/app/api/agent-library/updates/route.js.nft.json +1 -0
  120. package/app/.next-cli-build/server/app/api/agent-library/updates/route_client-reference-manifest.js +1 -0
  121. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js +5 -11
  124. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +13 -38
  126. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  132. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +5 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +2 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +5 -9
  144. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +5 -2
  146. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js +9 -10
  148. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js +9 -6
  150. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +8 -10
  152. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +6 -2
  154. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +5 -2
  156. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  160. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +5 -2
  162. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  184. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +5 -5
  186. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js +1 -0
  198. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js.nft.json +1 -0
  199. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route_client-reference-manifest.js +1 -0
  200. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js +1 -0
  201. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js.nft.json +1 -0
  202. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route_client-reference-manifest.js +1 -0
  203. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js +1 -0
  204. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js.nft.json +1 -0
  205. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route_client-reference-manifest.js +1 -0
  206. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js +1 -0
  207. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js.nft.json +1 -0
  208. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route_client-reference-manifest.js +1 -0
  209. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js +1 -0
  210. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js.nft.json +1 -0
  211. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route_client-reference-manifest.js +1 -0
  212. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js +1 -0
  213. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js.nft.json +1 -0
  214. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route_client-reference-manifest.js +1 -0
  215. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js +1 -0
  216. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js.nft.json +1 -0
  217. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route_client-reference-manifest.js +1 -0
  218. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js +1 -0
  219. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js.nft.json +1 -0
  220. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route_client-reference-manifest.js +1 -0
  221. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  240. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/routing/feedback/route.js +1 -0
  296. package/app/.next-cli-build/server/app/api/routing/feedback/route.js.nft.json +1 -0
  297. package/app/.next-cli-build/server/app/api/routing/feedback/route_client-reference-manifest.js +1 -0
  298. package/app/.next-cli-build/server/app/api/routing/insights/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/routing/insights/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/routing/learn/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/routing/learn/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/routing/stats/route.js +1 -0
  303. package/app/.next-cli-build/server/app/api/routing/stats/route.js.nft.json +1 -0
  304. package/app/.next-cli-build/server/app/api/routing/stats/route_client-reference-manifest.js +1 -0
  305. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/skills/[id]/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/skills/[id]/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js +1 -0
  322. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js.nft.json +1 -0
  323. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route_client-reference-manifest.js +1 -0
  324. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  327. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  355. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  369. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  401. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  403. package/app/.next-cli-build/server/app/callback.html +1 -1
  404. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  405. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  406. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  408. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  409. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  410. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  412. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  415. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  416. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  417. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  419. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  420. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  421. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  422. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  425. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/index.html +1 -1
  427. package/app/.next-cli-build/server/app/index.rsc +4 -4
  428. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  429. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  430. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  431. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  432. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  433. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  434. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  436. package/app/.next-cli-build/server/app/landing.html +1 -1
  437. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  438. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  439. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  440. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  441. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  442. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  443. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/login/page.js +2 -2
  445. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  447. package/app/.next-cli-build/server/app/login.html +1 -1
  448. package/app/.next-cli-build/server/app/login.rsc +4 -4
  449. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  450. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  451. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  452. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  456. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/page.js +2 -2
  458. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  460. package/app/.next-cli-build/server/app-paths-manifest.json +17 -7
  461. package/app/.next-cli-build/server/chunks/1062.js +64 -0
  462. package/app/.next-cli-build/server/chunks/1064.js +104 -0
  463. package/app/.next-cli-build/server/chunks/1294.js +49 -0
  464. package/app/.next-cli-build/server/chunks/159.js +1 -0
  465. package/app/.next-cli-build/server/chunks/1808.js +1 -0
  466. package/app/.next-cli-build/server/chunks/194.js +1 -0
  467. package/app/.next-cli-build/server/chunks/1998.js +1 -1
  468. package/app/.next-cli-build/server/chunks/241.js +1 -1
  469. package/app/.next-cli-build/server/chunks/2712.js +3 -0
  470. package/app/.next-cli-build/server/chunks/{9528.js → 2750.js} +2 -3
  471. package/app/.next-cli-build/server/chunks/2925.js +1 -0
  472. package/app/.next-cli-build/server/chunks/3072.js +2 -0
  473. package/app/.next-cli-build/server/chunks/3075.js +1 -0
  474. package/app/.next-cli-build/server/chunks/319.js +3 -3
  475. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  476. package/app/.next-cli-build/server/chunks/3546.js +1 -1
  477. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  478. package/app/.next-cli-build/server/chunks/3675.js +1 -0
  479. package/app/.next-cli-build/server/chunks/369.js +70 -0
  480. package/app/.next-cli-build/server/chunks/3904.js +1 -0
  481. package/app/.next-cli-build/server/chunks/3986.js +49 -14
  482. package/app/.next-cli-build/server/chunks/4126.js +5 -0
  483. package/app/.next-cli-build/server/chunks/{2422.js → 4176.js} +1 -1
  484. package/app/.next-cli-build/server/chunks/4192.js +1 -0
  485. package/app/.next-cli-build/server/chunks/4194.js +1 -1
  486. package/app/.next-cli-build/server/chunks/440.js +26 -0
  487. package/app/.next-cli-build/server/chunks/4646.js +1 -0
  488. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  489. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  490. package/app/.next-cli-build/server/chunks/4776.js +33 -0
  491. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  492. package/app/.next-cli-build/server/chunks/4803.js +9 -0
  493. package/app/.next-cli-build/server/chunks/4904.js +10 -0
  494. package/app/.next-cli-build/server/chunks/507.js +1 -1
  495. package/app/.next-cli-build/server/chunks/5115.js +67 -0
  496. package/app/.next-cli-build/server/chunks/5139.js +1 -0
  497. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  498. package/app/.next-cli-build/server/chunks/5350.js +1 -0
  499. package/app/.next-cli-build/server/chunks/5615.js +3 -3
  500. package/app/.next-cli-build/server/chunks/5821.js +1 -0
  501. package/app/.next-cli-build/server/chunks/5920.js +17 -0
  502. package/app/.next-cli-build/server/chunks/6103.js +1 -0
  503. package/app/.next-cli-build/server/chunks/615.js +1 -1
  504. package/app/.next-cli-build/server/chunks/6182.js +3 -3
  505. package/app/.next-cli-build/server/chunks/6252.js +9 -0
  506. package/app/.next-cli-build/server/chunks/6448.js +109 -0
  507. package/app/.next-cli-build/server/chunks/{4206.js → 6470.js} +1 -1
  508. package/app/.next-cli-build/server/chunks/6492.js +1 -0
  509. package/app/.next-cli-build/server/chunks/6844.js +1 -1
  510. package/app/.next-cli-build/server/chunks/698.js +1 -1
  511. package/app/.next-cli-build/server/chunks/7141.js +1 -0
  512. package/app/.next-cli-build/server/chunks/7155.js +1 -0
  513. package/app/.next-cli-build/server/chunks/7250.js +1 -0
  514. package/app/.next-cli-build/server/chunks/7335.js +1 -0
  515. package/app/.next-cli-build/server/chunks/7662.js +1 -0
  516. package/app/.next-cli-build/server/chunks/7753.js +1 -0
  517. package/app/.next-cli-build/server/chunks/7828.js +1 -0
  518. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  519. package/app/.next-cli-build/server/chunks/8062.js +9 -0
  520. package/app/.next-cli-build/server/chunks/8117.js +1 -0
  521. package/app/.next-cli-build/server/chunks/8129.js +1 -0
  522. package/app/.next-cli-build/server/chunks/8400.js +153 -0
  523. package/app/.next-cli-build/server/chunks/8469.js +9 -0
  524. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  525. package/app/.next-cli-build/server/chunks/869.js +1 -0
  526. package/app/.next-cli-build/server/chunks/8775.js +1 -1
  527. package/app/.next-cli-build/server/chunks/8998.js +486 -0
  528. package/app/.next-cli-build/server/chunks/9046.js +1 -0
  529. package/app/.next-cli-build/server/chunks/9062.js +104 -0
  530. package/app/.next-cli-build/server/chunks/9261.js +88 -0
  531. package/app/.next-cli-build/server/chunks/9291.js +1 -0
  532. package/app/.next-cli-build/server/chunks/9397.js +1 -0
  533. package/app/.next-cli-build/server/chunks/9489.js +8 -0
  534. package/app/.next-cli-build/server/chunks/9508.js +45 -0
  535. package/app/.next-cli-build/server/chunks/9696.js +3 -3
  536. package/app/.next-cli-build/server/chunks/995.js +1 -0
  537. package/app/.next-cli-build/server/chunks/static/media/catalog.e7ada387.json +1710 -0
  538. package/app/.next-cli-build/server/instrumentation.js +1 -0
  539. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  540. package/app/.next-cli-build/server/middleware.js +11 -11
  541. package/app/.next-cli-build/server/pages/404.html +1 -1
  542. package/app/.next-cli-build/server/pages/500.html +1 -1
  543. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  544. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  545. package/app/.next-cli-build/server/webpack-runtime.js +1 -1
  546. package/app/.next-cli-build/static/TXnbOJZ6FVNX0p7oT_f3I/_buildManifest.js +1 -0
  547. package/app/.next-cli-build/static/chunks/1321-e3e6d10c0bafafeb.js +1 -0
  548. package/app/.next-cli-build/static/chunks/136-b76ff55769d5ecb1.js +1 -0
  549. package/app/.next-cli-build/static/chunks/2280-61262f8359f37a85.js +64 -0
  550. package/app/.next-cli-build/static/chunks/2493-6241eb181f2ecb6e.js +67 -0
  551. package/app/.next-cli-build/static/chunks/5497-aa5f62602eba33e9.js +7 -0
  552. package/app/.next-cli-build/static/chunks/7592-bbf465c7acd2478e.js +1 -0
  553. package/app/.next-cli-build/static/chunks/782-3676be0287313117.js +3 -0
  554. package/app/.next-cli-build/static/chunks/8500-287dd3e5d372ba6f.js +1 -0
  555. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-d720efb4c9d427e6.js +1 -0
  556. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-04509a38b9fd3dcf.js +1 -0
  557. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-fa35870caaeabe20.js +1 -0
  558. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-88244cb193592f8f.js → page-aa9c65a5e73a3f5d.js} +1 -1
  559. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a8d77d24b4c71915.js +1 -0
  560. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/page-95f09ae849f539d6.js +1 -0
  561. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-6678759c536b4008.js +1 -0
  562. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-59e92d48daea1aed.js +3 -0
  563. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-183cf5498e6d3e42.js +59 -0
  564. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-b67e7e3b9acaf1cc.js +1 -0
  565. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-a4bad553cba810e7.js +4 -0
  566. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/{page-36448aa4e37c7802.js → page-0568602ac2385103.js} +1 -1
  567. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-f6e3507247a819e5.js +1 -0
  568. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-755ed32651028f99.js → page-08fe6612a31239da.js} +1 -1
  569. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-27ae229b00137a0b.js +1 -0
  570. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-a1ab95a02951c91d.js +1 -0
  571. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-0d7fcdbff356b2ab.js +10 -0
  572. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-608cdc11e7047159.js +1 -0
  573. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-ad84a479883e6cc3.js +1 -0
  574. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f312c1076859630e.js +1 -0
  575. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-90277b8688f387c1.js +1 -0
  576. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-77bb7400c2be9752.js → page-33e127c15efc66a5.js} +1 -1
  577. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-0f74a450b98fa125.js +1 -0
  578. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-ad2eda4b48c9319b.js +1 -0
  579. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-025d20cc7b091120.js +1 -0
  580. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-b06b9aec5dcdf486.js +1 -0
  581. package/app/.next-cli-build/static/chunks/app/_global-error/page-554d472d679429b3.js +1 -0
  582. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-554d472d679429b3.js +1 -0
  583. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-554d472d679429b3.js +1 -0
  584. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-554d472d679429b3.js +1 -0
  585. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-554d472d679429b3.js +1 -0
  586. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-554d472d679429b3.js +1 -0
  587. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-554d472d679429b3.js +1 -0
  588. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-554d472d679429b3.js +1 -0
  589. package/app/.next-cli-build/static/chunks/app/api/agent-library/updates/route-554d472d679429b3.js +1 -0
  590. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-554d472d679429b3.js +1 -0
  591. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-554d472d679429b3.js +1 -0
  592. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-554d472d679429b3.js +1 -0
  593. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-554d472d679429b3.js +1 -0
  594. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-554d472d679429b3.js +1 -0
  595. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-554d472d679429b3.js +1 -0
  596. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-554d472d679429b3.js +1 -0
  597. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-554d472d679429b3.js +1 -0
  598. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-554d472d679429b3.js +1 -0
  599. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-554d472d679429b3.js +1 -0
  600. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-554d472d679429b3.js +1 -0
  601. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-554d472d679429b3.js +1 -0
  602. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-554d472d679429b3.js +1 -0
  603. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-554d472d679429b3.js +1 -0
  604. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-554d472d679429b3.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-554d472d679429b3.js +1 -0
  606. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-554d472d679429b3.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-554d472d679429b3.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-554d472d679429b3.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-554d472d679429b3.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-554d472d679429b3.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-554d472d679429b3.js +1 -0
  612. package/app/.next-cli-build/static/chunks/app/api/combos/route-554d472d679429b3.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-554d472d679429b3.js +1 -0
  614. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-554d472d679429b3.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-554d472d679429b3.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-554d472d679429b3.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/health/route-554d472d679429b3.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-554d472d679429b3.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/keys/route-554d472d679429b3.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/locale/route-554d472d679429b3.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-554d472d679429b3.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-554d472d679429b3.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-554d472d679429b3.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-554d472d679429b3.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-554d472d679429b3.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-554d472d679429b3.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-554d472d679429b3.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/route-554d472d679429b3.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-554d472d679429b3.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/route-554d472d679429b3.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/health/route-554d472d679429b3.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/providers/route-554d472d679429b3.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/routing/route-554d472d679429b3.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/usage/route-554d472d679429b3.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/version/route-554d472d679429b3.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-554d472d679429b3.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-554d472d679429b3.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-554d472d679429b3.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-554d472d679429b3.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/models/route-554d472d679429b3.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/models/test/route-554d472d679429b3.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-554d472d679429b3.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-554d472d679429b3.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-554d472d679429b3.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-554d472d679429b3.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-554d472d679429b3.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-554d472d679429b3.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-554d472d679429b3.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-554d472d679429b3.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-554d472d679429b3.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-554d472d679429b3.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-554d472d679429b3.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-554d472d679429b3.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-554d472d679429b3.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/pricing/route-554d472d679429b3.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-554d472d679429b3.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-554d472d679429b3.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-554d472d679429b3.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-554d472d679429b3.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-554d472d679429b3.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-554d472d679429b3.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-554d472d679429b3.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-554d472d679429b3.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-554d472d679429b3.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-554d472d679429b3.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-554d472d679429b3.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-554d472d679429b3.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-554d472d679429b3.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/providers/route-554d472d679429b3.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-554d472d679429b3.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-554d472d679429b3.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-554d472d679429b3.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/routing/feedback/route-554d472d679429b3.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-554d472d679429b3.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-554d472d679429b3.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/routing/stats/route-554d472d679429b3.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-554d472d679429b3.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-554d472d679429b3.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-554d472d679429b3.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-554d472d679429b3.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/settings/route-554d472d679429b3.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-554d472d679429b3.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-554d472d679429b3.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/tags/route-554d472d679429b3.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/token-saver/vault-stats/route-554d472d679429b3.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-554d472d679429b3.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-554d472d679429b3.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-554d472d679429b3.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-554d472d679429b3.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-554d472d679429b3.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-554d472d679429b3.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-554d472d679429b3.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-554d472d679429b3.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-554d472d679429b3.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-554d472d679429b3.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-554d472d679429b3.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-554d472d679429b3.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-554d472d679429b3.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-554d472d679429b3.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-554d472d679429b3.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-554d472d679429b3.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-554d472d679429b3.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-554d472d679429b3.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-554d472d679429b3.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-554d472d679429b3.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-554d472d679429b3.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-554d472d679429b3.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-554d472d679429b3.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-554d472d679429b3.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-554d472d679429b3.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-554d472d679429b3.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-554d472d679429b3.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-554d472d679429b3.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-554d472d679429b3.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-554d472d679429b3.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/v1/route-554d472d679429b3.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-554d472d679429b3.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-554d472d679429b3.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-554d472d679429b3.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-554d472d679429b3.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/version/route-554d472d679429b3.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-554d472d679429b3.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/version/update/route-554d472d679429b3.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/callback/page-5c1d863ff86ddc6e.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-4cfc7195d2a8bf0e.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/landing/page-9e06d57d9b215fd7.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/login/page-554d472d679429b3.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-554d472d679429b3.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/page-554d472d679429b3.js +1 -0
  730. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-554d472d679429b3.js +1 -0
  731. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-554d472d679429b3.js +1 -0
  732. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-554d472d679429b3.js +1 -0
  733. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-554d472d679429b3.js +1 -0
  734. package/app/.next-cli-build/static/chunks/webpack-57b54315eb9fa808.js +1 -0
  735. package/app/.next-cli-build/static/css/92a5708a6b29ef8c.css +1 -0
  736. package/app/.next-cli-build/static/media/catalog.e7ada387.json +1710 -0
  737. package/app/custom-server.js +5 -5
  738. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/container.js +26 -18
  739. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/css-syntax-error.js +47 -14
  740. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/fromJSON.js +23 -9
  741. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/input.js +61 -33
  742. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/lazy-result.js +50 -37
  743. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/map-generator.js +26 -9
  744. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/no-work-result.js +57 -55
  745. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/node.js +110 -35
  746. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/parser.js +46 -38
  747. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/previous-map.js +30 -11
  748. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/processor.js +7 -7
  749. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/result.js +5 -5
  750. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/stringifier.js +41 -20
  751. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/tokenize.js +6 -2
  752. package/app/node_modules/{next/node_modules/postcss → postcss}/package.json +48 -48
  753. package/app/open-sse/package.json +4 -0
  754. package/app/open-sse/providers/generated/catalog.json +1710 -0
  755. package/app/package.json +22 -10
  756. package/app/public/i18n/literals/zh-CN.json +8 -0
  757. package/app/server.js +1 -1
  758. package/app/src/lib/db/adapters/betterSqliteAdapter.js +2 -3
  759. package/app/src/lib/db/adapters/bunSqliteAdapter.js +0 -2
  760. package/app/src/lib/db/adapters/nodeSqliteAdapter.js +0 -2
  761. package/app/src/lib/db/adapters/sqljsAdapter.js +23 -4
  762. package/app/src/lib/db/migrate.js +15 -4
  763. package/app/src/lib/updater/updater.js +67 -9
  764. package/app/src/shared/utils/apiKey.js +3 -7
  765. package/cli.js +205 -180
  766. package/hooks/sqliteRuntime.js +1 -7
  767. package/package.json +2 -2
  768. package/src/cli/api/client.js +3 -20
  769. package/src/cli/menus/settings.js +3 -62
  770. package/src/cli/tray/tray.js +18 -26
  771. package/src/shared/dataDir.js +61 -0
  772. package/src/shared/disableMitm.js +102 -0
  773. package/src/shared/openBrowser.js +43 -0
  774. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +0 -2
  775. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +0 -1
  776. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +0 -1
  777. package/app/.next-cli-build/server/app/api/init/route.js +0 -1
  778. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +0 -1
  779. package/app/.next-cli-build/server/app/api/init/route_client-reference-manifest.js +0 -1
  780. package/app/.next-cli-build/server/app/dashboard/agent-library.html +0 -1
  781. package/app/.next-cli-build/server/app/dashboard/agent-library.meta +0 -17
  782. package/app/.next-cli-build/server/app/dashboard/agent-library.rsc +0 -30
  783. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard/agent-library/__PAGE__.segment.rsc +0 -9
  784. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard/agent-library.segment.rsc +0 -5
  785. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  786. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  787. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_full.segment.rsc +0 -30
  788. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_head.segment.rsc +0 -6
  789. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_index.segment.rsc +0 -8
  790. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_tree.segment.rsc +0 -8
  791. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +0 -1
  792. package/app/.next-cli-build/server/app/dashboard/basic-chat.meta +0 -17
  793. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +0 -27
  794. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +0 -6
  795. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +0 -5
  796. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  797. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  798. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +0 -27
  799. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +0 -6
  800. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +0 -8
  801. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +0 -8
  802. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +0 -1
  803. package/app/.next-cli-build/server/app/dashboard/cli-tools.meta +0 -17
  804. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +0 -28
  805. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +0 -6
  806. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +0 -5
  807. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  808. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  809. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +0 -28
  810. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +0 -6
  811. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +0 -8
  812. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +0 -8
  813. package/app/.next-cli-build/server/app/dashboard/combos/routing.html +0 -1
  814. package/app/.next-cli-build/server/app/dashboard/combos/routing.meta +0 -18
  815. package/app/.next-cli-build/server/app/dashboard/combos/routing.rsc +0 -30
  816. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos/routing/__PAGE__.segment.rsc +0 -9
  817. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos/routing.segment.rsc +0 -5
  818. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +0 -5
  819. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  820. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  821. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_full.segment.rsc +0 -30
  822. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_head.segment.rsc +0 -6
  823. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_index.segment.rsc +0 -8
  824. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_tree.segment.rsc +0 -8
  825. package/app/.next-cli-build/server/app/dashboard/combos.html +0 -1
  826. package/app/.next-cli-build/server/app/dashboard/combos.meta +0 -17
  827. package/app/.next-cli-build/server/app/dashboard/combos.rsc +0 -28
  828. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +0 -6
  829. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +0 -5
  830. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  831. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  832. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +0 -28
  833. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +0 -6
  834. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +0 -8
  835. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +0 -8
  836. package/app/.next-cli-build/server/app/dashboard/endpoint.html +0 -1
  837. package/app/.next-cli-build/server/app/dashboard/endpoint.meta +0 -17
  838. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +0 -28
  839. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +0 -6
  840. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +0 -5
  841. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  842. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  843. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +0 -28
  844. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +0 -6
  845. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +0 -8
  846. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +0 -8
  847. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +0 -1
  848. package/app/.next-cli-build/server/app/dashboard/media-providers/web.meta +0 -18
  849. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +0 -30
  850. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +0 -9
  851. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +0 -5
  852. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +0 -5
  853. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  854. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  855. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +0 -30
  856. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +0 -6
  857. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +0 -8
  858. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +0 -8
  859. package/app/.next-cli-build/server/app/dashboard/media-providers.html +0 -1
  860. package/app/.next-cli-build/server/app/dashboard/media-providers.meta +0 -17
  861. package/app/.next-cli-build/server/app/dashboard/media-providers.rsc +0 -30
  862. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/__PAGE__.segment.rsc +0 -9
  863. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +0 -5
  864. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  865. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  866. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_full.segment.rsc +0 -30
  867. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_head.segment.rsc +0 -6
  868. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_index.segment.rsc +0 -8
  869. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_tree.segment.rsc +0 -8
  870. package/app/.next-cli-build/server/app/dashboard/mitm.html +0 -1
  871. package/app/.next-cli-build/server/app/dashboard/mitm.meta +0 -17
  872. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +0 -27
  873. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +0 -6
  874. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +0 -5
  875. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  876. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  877. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +0 -27
  878. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +0 -6
  879. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +0 -8
  880. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +0 -8
  881. package/app/.next-cli-build/server/app/dashboard/profile.html +0 -1
  882. package/app/.next-cli-build/server/app/dashboard/profile.meta +0 -17
  883. package/app/.next-cli-build/server/app/dashboard/profile.rsc +0 -28
  884. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +0 -6
  885. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +0 -5
  886. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  887. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  888. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +0 -28
  889. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +0 -6
  890. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +0 -8
  891. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +0 -8
  892. package/app/.next-cli-build/server/app/dashboard/providers/new.html +0 -1
  893. package/app/.next-cli-build/server/app/dashboard/providers/new.meta +0 -18
  894. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +0 -30
  895. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +0 -9
  896. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +0 -5
  897. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +0 -5
  898. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  899. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  900. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +0 -30
  901. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +0 -6
  902. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +0 -8
  903. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +0 -8
  904. package/app/.next-cli-build/server/app/dashboard/providers.html +0 -1
  905. package/app/.next-cli-build/server/app/dashboard/providers.meta +0 -17
  906. package/app/.next-cli-build/server/app/dashboard/providers.rsc +0 -28
  907. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +0 -6
  908. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +0 -5
  909. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  910. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  911. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +0 -28
  912. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +0 -6
  913. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +0 -8
  914. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +0 -8
  915. package/app/.next-cli-build/server/app/dashboard/quota.html +0 -2
  916. package/app/.next-cli-build/server/app/dashboard/quota.meta +0 -17
  917. package/app/.next-cli-build/server/app/dashboard/quota.rsc +0 -28
  918. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +0 -7
  919. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +0 -5
  920. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  921. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  922. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +0 -28
  923. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +0 -6
  924. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +0 -8
  925. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +0 -8
  926. package/app/.next-cli-build/server/app/dashboard/skills.html +0 -1
  927. package/app/.next-cli-build/server/app/dashboard/skills.meta +0 -17
  928. package/app/.next-cli-build/server/app/dashboard/skills.rsc +0 -30
  929. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +0 -9
  930. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +0 -5
  931. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  932. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  933. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +0 -30
  934. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +0 -6
  935. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +0 -8
  936. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +0 -8
  937. package/app/.next-cli-build/server/app/dashboard/token-saver.html +0 -1
  938. package/app/.next-cli-build/server/app/dashboard/token-saver.meta +0 -17
  939. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +0 -27
  940. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +0 -6
  941. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +0 -5
  942. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  943. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  944. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +0 -27
  945. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +0 -6
  946. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +0 -8
  947. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +0 -8
  948. package/app/.next-cli-build/server/app/dashboard/translator.html +0 -1
  949. package/app/.next-cli-build/server/app/dashboard/translator.meta +0 -17
  950. package/app/.next-cli-build/server/app/dashboard/translator.rsc +0 -30
  951. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +0 -9
  952. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +0 -5
  953. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  954. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  955. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +0 -30
  956. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +0 -6
  957. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +0 -8
  958. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +0 -8
  959. package/app/.next-cli-build/server/app/dashboard/usage.html +0 -1
  960. package/app/.next-cli-build/server/app/dashboard/usage.meta +0 -17
  961. package/app/.next-cli-build/server/app/dashboard/usage.rsc +0 -30
  962. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +0 -9
  963. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +0 -5
  964. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  965. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  966. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +0 -30
  967. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +0 -6
  968. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +0 -8
  969. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +0 -8
  970. package/app/.next-cli-build/server/app/dashboard.html +0 -1
  971. package/app/.next-cli-build/server/app/dashboard.meta +0 -16
  972. package/app/.next-cli-build/server/app/dashboard.rsc +0 -28
  973. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +0 -6
  974. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  975. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  976. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +0 -28
  977. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +0 -6
  978. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +0 -8
  979. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +0 -8
  980. package/app/.next-cli-build/server/chunks/1051.js +0 -1
  981. package/app/.next-cli-build/server/chunks/1220.js +0 -3
  982. package/app/.next-cli-build/server/chunks/1241.js +0 -1
  983. package/app/.next-cli-build/server/chunks/1814.js +0 -17
  984. package/app/.next-cli-build/server/chunks/2117.js +0 -1
  985. package/app/.next-cli-build/server/chunks/2280.js +0 -1
  986. package/app/.next-cli-build/server/chunks/2548.js +0 -67
  987. package/app/.next-cli-build/server/chunks/2701.js +0 -10
  988. package/app/.next-cli-build/server/chunks/2768.js +0 -79
  989. package/app/.next-cli-build/server/chunks/3943.js +0 -1
  990. package/app/.next-cli-build/server/chunks/4632.js +0 -1
  991. package/app/.next-cli-build/server/chunks/4827.js +0 -1
  992. package/app/.next-cli-build/server/chunks/5330.js +0 -161
  993. package/app/.next-cli-build/server/chunks/5612.js +0 -1
  994. package/app/.next-cli-build/server/chunks/5655.js +0 -1
  995. package/app/.next-cli-build/server/chunks/5699.js +0 -1
  996. package/app/.next-cli-build/server/chunks/5961.js +0 -28
  997. package/app/.next-cli-build/server/chunks/6040.js +0 -1
  998. package/app/.next-cli-build/server/chunks/6059.js +0 -1
  999. package/app/.next-cli-build/server/chunks/6070.js +0 -1
  1000. package/app/.next-cli-build/server/chunks/6150.js +0 -64
  1001. package/app/.next-cli-build/server/chunks/6306.js +0 -1
  1002. package/app/.next-cli-build/server/chunks/6763.js +0 -1
  1003. package/app/.next-cli-build/server/chunks/6777.js +0 -1
  1004. package/app/.next-cli-build/server/chunks/6922.js +0 -1
  1005. package/app/.next-cli-build/server/chunks/7651.js +0 -1
  1006. package/app/.next-cli-build/server/chunks/8164.js +0 -67
  1007. package/app/.next-cli-build/server/chunks/8238.js +0 -1
  1008. package/app/.next-cli-build/server/chunks/8860.js +0 -32
  1009. package/app/.next-cli-build/server/chunks/8895.js +0 -67
  1010. package/app/.next-cli-build/server/chunks/8910.js +0 -8
  1011. package/app/.next-cli-build/server/chunks/8920.js +0 -1
  1012. package/app/.next-cli-build/server/chunks/9830.js +0 -73
  1013. package/app/.next-cli-build/static/HFerqnfiKkxdqoMVxOfPW/_buildManifest.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/1321-39ad919b1616c75c.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/1610-cd46c6c47a9aa99a.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/1655-0df56bb46fc3a442.js +0 -73
  1017. package/app/.next-cli-build/static/chunks/2562-ceb69ca00b47af6e.js +0 -64
  1018. package/app/.next-cli-build/static/chunks/5242-bb1a1a7ec3bfb62f.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/5497-1ebc533b1f404c9f.js +0 -7
  1020. package/app/.next-cli-build/static/chunks/5772-901f1092d831ec37.js +0 -3
  1021. package/app/.next-cli-build/static/chunks/705-012db20bb6a5da8b.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-b6f9c90a614bfb03.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-af2d913820faedae.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-a777baf9c2aa43b4.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-3f5fa0d8e152056f.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/page-ff92eef8e57d1447.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-73628e93426ae624.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-a8d8d0f4bfbcfbae.js +0 -3
  1029. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-a915efd975f6af81.js +0 -59
  1030. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-9cad271042843781.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-8bff15a89ffc3746.js +0 -4
  1032. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-4d2b06f4c8d1b384.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-afeae41f2e9445ec.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-ff7973275ee57a96.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-5e44267c26a7e42d.js +0 -10
  1036. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-3afd6ee04180298c.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-4957f02eb9879798.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-14da9269a25bd090.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-95e55b6593bcf3f7.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-54d1bd253432bc6f.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-ef0b203963c2c25e.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-59db0b586ad5ab45.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-58013e7e99d17d70.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/_global-error/page-4ff27935cdf818b5.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-4ff27935cdf818b5.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-4ff27935cdf818b5.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-4ff27935cdf818b5.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-4ff27935cdf818b5.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-4ff27935cdf818b5.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-4ff27935cdf818b5.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-4ff27935cdf818b5.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-4ff27935cdf818b5.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-4ff27935cdf818b5.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-4ff27935cdf818b5.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4ff27935cdf818b5.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-4ff27935cdf818b5.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-4ff27935cdf818b5.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-4ff27935cdf818b5.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-4ff27935cdf818b5.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-4ff27935cdf818b5.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-4ff27935cdf818b5.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-4ff27935cdf818b5.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-4ff27935cdf818b5.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-4ff27935cdf818b5.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-4ff27935cdf818b5.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-4ff27935cdf818b5.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-4ff27935cdf818b5.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-4ff27935cdf818b5.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-4ff27935cdf818b5.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-4ff27935cdf818b5.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-4ff27935cdf818b5.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-4ff27935cdf818b5.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-4ff27935cdf818b5.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-4ff27935cdf818b5.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/combos/route-4ff27935cdf818b5.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-4ff27935cdf818b5.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-4ff27935cdf818b5.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-4ff27935cdf818b5.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-4ff27935cdf818b5.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/health/route-4ff27935cdf818b5.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/init/route-4ff27935cdf818b5.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-4ff27935cdf818b5.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/keys/route-4ff27935cdf818b5.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/locale/route-4ff27935cdf818b5.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-4ff27935cdf818b5.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-4ff27935cdf818b5.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-4ff27935cdf818b5.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4ff27935cdf818b5.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-4ff27935cdf818b5.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-4ff27935cdf818b5.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-4ff27935cdf818b5.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-4ff27935cdf818b5.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-4ff27935cdf818b5.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-4ff27935cdf818b5.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-4ff27935cdf818b5.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/models/route-4ff27935cdf818b5.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/models/test/route-4ff27935cdf818b5.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-4ff27935cdf818b5.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-4ff27935cdf818b5.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-4ff27935cdf818b5.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-4ff27935cdf818b5.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-4ff27935cdf818b5.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-4ff27935cdf818b5.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-4ff27935cdf818b5.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-4ff27935cdf818b5.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-4ff27935cdf818b5.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-4ff27935cdf818b5.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-4ff27935cdf818b5.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-4ff27935cdf818b5.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-4ff27935cdf818b5.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/pricing/route-4ff27935cdf818b5.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-4ff27935cdf818b5.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-4ff27935cdf818b5.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-4ff27935cdf818b5.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-4ff27935cdf818b5.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-4ff27935cdf818b5.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-4ff27935cdf818b5.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-4ff27935cdf818b5.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-4ff27935cdf818b5.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-4ff27935cdf818b5.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-4ff27935cdf818b5.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-4ff27935cdf818b5.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-4ff27935cdf818b5.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-4ff27935cdf818b5.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/providers/route-4ff27935cdf818b5.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-4ff27935cdf818b5.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-4ff27935cdf818b5.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-4ff27935cdf818b5.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-4ff27935cdf818b5.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-4ff27935cdf818b5.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-4ff27935cdf818b5.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-4ff27935cdf818b5.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-4ff27935cdf818b5.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-4ff27935cdf818b5.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/settings/route-4ff27935cdf818b5.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-4ff27935cdf818b5.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-4ff27935cdf818b5.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/tags/route-4ff27935cdf818b5.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-4ff27935cdf818b5.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-4ff27935cdf818b5.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-4ff27935cdf818b5.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-4ff27935cdf818b5.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-4ff27935cdf818b5.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-4ff27935cdf818b5.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-4ff27935cdf818b5.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-4ff27935cdf818b5.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-4ff27935cdf818b5.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-4ff27935cdf818b5.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-4ff27935cdf818b5.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-4ff27935cdf818b5.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-4ff27935cdf818b5.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-4ff27935cdf818b5.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-4ff27935cdf818b5.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-4ff27935cdf818b5.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-4ff27935cdf818b5.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-4ff27935cdf818b5.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-4ff27935cdf818b5.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-4ff27935cdf818b5.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-4ff27935cdf818b5.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-4ff27935cdf818b5.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-4ff27935cdf818b5.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-4ff27935cdf818b5.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-4ff27935cdf818b5.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-4ff27935cdf818b5.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-4ff27935cdf818b5.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-4ff27935cdf818b5.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-4ff27935cdf818b5.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-4ff27935cdf818b5.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/v1/route-4ff27935cdf818b5.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-4ff27935cdf818b5.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-4ff27935cdf818b5.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-4ff27935cdf818b5.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-4ff27935cdf818b5.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/version/route-4ff27935cdf818b5.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-4ff27935cdf818b5.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/version/update/route-4ff27935cdf818b5.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/callback/page-64f2a90493720740.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-2c2051aa3be879d6.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/landing/page-8c76c0ea58e06a53.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/login/page-4ff27935cdf818b5.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-4ff27935cdf818b5.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/page-4ff27935cdf818b5.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-4ff27935cdf818b5.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-4ff27935cdf818b5.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-4ff27935cdf818b5.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-4ff27935cdf818b5.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/webpack-868e94e9a2c8d9a9.js +0 -1
  1188. package/app/.next-cli-build/static/css/20c5585d3269ee43.css +0 -1
  1189. package/app/cli/.build-home/.switchboard/auth/machine-id-salt +0 -1
  1190. package/app/cli/.build-home/.switchboard/db/data.sqlite +0 -0
  1191. package/app/cli/.build-home/.switchboard/machine-id +0 -1
  1192. package/app/public/i18n/literals/ar.json +0 -195
  1193. package/app/public/i18n/literals/bn.json +0 -195
  1194. package/app/public/i18n/literals/cs.json +0 -195
  1195. package/app/public/i18n/literals/da.json +0 -195
  1196. package/app/public/i18n/literals/de.json +0 -195
  1197. package/app/public/i18n/literals/el.json +0 -195
  1198. package/app/public/i18n/literals/es.json +0 -195
  1199. package/app/public/i18n/literals/fa.json +0 -195
  1200. package/app/public/i18n/literals/fi.json +0 -195
  1201. package/app/public/i18n/literals/fr.json +0 -195
  1202. package/app/public/i18n/literals/he.json +0 -195
  1203. package/app/public/i18n/literals/hi.json +0 -195
  1204. package/app/public/i18n/literals/hu.json +0 -195
  1205. package/app/public/i18n/literals/id.json +0 -195
  1206. package/app/public/i18n/literals/it.json +0 -195
  1207. package/app/public/i18n/literals/ja.json +0 -195
  1208. package/app/public/i18n/literals/ko.json +0 -195
  1209. package/app/public/i18n/literals/nl.json +0 -195
  1210. package/app/public/i18n/literals/no.json +0 -195
  1211. package/app/public/i18n/literals/pl.json +0 -195
  1212. package/app/public/i18n/literals/pt-BR.json +0 -195
  1213. package/app/public/i18n/literals/pt-PT.json +0 -195
  1214. package/app/public/i18n/literals/ro.json +0 -195
  1215. package/app/public/i18n/literals/ru.json +0 -195
  1216. package/app/public/i18n/literals/sv.json +0 -195
  1217. package/app/public/i18n/literals/th.json +0 -195
  1218. package/app/public/i18n/literals/tl.json +0 -195
  1219. package/app/public/i18n/literals/tr.json +0 -195
  1220. package/app/public/i18n/literals/uk.json +0 -195
  1221. package/app/public/i18n/literals/ur.json +0 -195
  1222. package/app/public/i18n/literals/vi.json +0 -195
  1223. package/app/public/i18n/literals/zh-TW.json +0 -195
  1224. package/app/.next-cli-build/static/{HFerqnfiKkxdqoMVxOfPW → TXnbOJZ6FVNX0p7oT_f3I}/_ssgManifest.js +0 -0
  1225. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/at-rule.js +0 -0
  1226. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/comment.js +0 -0
  1227. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/declaration.js +4 -4
  1228. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/document.js +0 -0
  1229. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/list.js +0 -0
  1230. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/parse.js +1 -1
  1231. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/postcss.js +12 -12
  1232. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/root.js +0 -0
  1233. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/rule.js +6 -6
  1234. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/stringify.js +0 -0
  1235. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/symbols.js +0 -0
  1236. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/terminal-highlight.js +0 -0
  1237. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/warn-once.js +0 -0
  1238. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/warning.js +0 -0
@@ -0,0 +1,59 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{17845:(e,t,s)=>{Promise.resolve().then(s.bind(s,41095))},41095:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>B});var a=s(95155),r=s(73321),o=s(98500),l=s.n(o),n=s(12115),i=s(35497),d=s(57250),c=s(88105),m=s(70217),u=s(14051),p=s.n(u),x=s(65921);function h({until:e}){let[t,s]=(0,n.useState)("");return((0,n.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);a<60?s(`${a}s`):a<3600?s(`${Math.floor(a/60)}m ${a%60}s`):s(`${Math.floor(a/3600)}h ${Math.floor(a%3600/60)}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 b({connection:e,isOAuth:t,isFirst:s,isLast:r,onMoveUp:o,onMoveDown:l,onToggleActive:d,onEdit:c,onDelete:u}){let[p,x]=(0,n.useState)(!1),f=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,g=f?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",y="",v=e.providerSpecificData?.connectionProxyUrl;if(v)try{let e=new URL(v);y=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{y=v}let j=e.providerSpecificData?.connectionNoProxy||"",w=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(Boolean).sort()[0]||null;(0,n.useEffect)(()=>{let t=()=>{x(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=w?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[e,w]);let N="unavailable"!==e.testStatus||p?e.testStatus:"active",k=t?e.name||e.email||e.displayName||"OAuth Account":e.name;return(0,a.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,a.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:o,disabled:s,className:`p-0.5 rounded ${s?"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:l,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:t?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:k}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:(0,m.g)(e.isActive,N),size:"sm",dot:!0,children:!1===e.isActive?"disabled":N||"Unknown"}),f&&(0,a.jsx)(i.Ex,{variant:"success",size:"sm",children:"Proxy"}),p&&!1!==e.isActive&&(0,a.jsx)(h,{until:w}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),f&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:g,children:g}),y&&(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:y}),j&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:j,children:["no_proxy: ",j]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,a.jsxs)("button",{onClick:c,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,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:u,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",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)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable":"Enable"})]})]})}function f({isOpen:e,provider:t,providerName:s,onSave:r,onClose:o}){let[l,d]=(0,n.useState)({name:"",apiKey:"",priority:1}),[c,m]=(0,n.useState)(!1),[u,p]=(0,n.useState)(null),[x,h]=(0,n.useState)(!1),b=l.name.trim().length>0,g=l.apiKey.trim().length>0,y=async()=>{let e=l.apiKey.trim();if(e){m(!0);try{let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e})}),a=await s.json();p(a.valid?"success":"failed")}catch{p("failed")}finally{m(!1)}}},v=async()=>{let e=l.name.trim(),s=l.apiKey.trim();if(t&&e&&s){h(!0);try{let a=!1;try{m(!0),p(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:s})});a=!!(await e.json()).valid,p(a?"success":"failed")}catch{p("failed")}finally{m(!1)}await r({name:e,apiKey:s,priority:l.priority,testStatus:a?"active":"unknown"})}finally{h(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:o,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,a.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:l.name,onChange:e=>d({...l,name:e.target.value}),placeholder:"Production Key"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,a.jsx)("input",{type:"password",autoComplete:"off",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:l.apiKey,onChange:e=>d({...l,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!g||c||x,variant:"secondary",children:c?"Checking...":"Check"})})]}),u&&(0,a.jsx)(i.Ex,{variant:"success"===u?"success":"error",children:"success"===u?"Valid":"Invalid"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,a.jsx)("input",{type:"number",min:1,className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:l.priority,onChange:e=>d({...l,priority:Number.parseInt(e.target.value)||1})})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!b||!g||x,children:x?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:o,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function g({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[o,l]=(0,n.useState)(!0),[d,c]=(0,n.useState)(!1),[m,u]=(0,n.useState)(!1),[p,h]=(0,n.useState)(null),[y,v]=(0,n.useState)(null),[j,w]=(0,n.useState)("1"),[N,k]=(0,n.useState)(null),C=(0,x.i)(e=>e.error),S=(0,n.useCallback)(async()=>{try{let[t,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]);if(!t.ok||!s.ok)throw Error("Failed to load connections");let a=await t.json(),o=await s.json();r((a.connections||[]).filter(t=>t.provider===e));let l=(o.providerStrategies||{})[e]||{};v(l.fallbackStrategy||null),w(null!=l.stickyRoundRobinLimit?String(l.stickyRoundRobinLimit):"1")}catch(e){C(e?.message||"Failed to load connections")}finally{l(!1)}},[C,e]);(0,n.useEffect)(()=>{S()},[S]);let $=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"});if(!a.ok)throw Error(`Failed to load settings (${a.status})`);let r=(await a.json()).providerStrategies||{},o={};t&&(o.fallbackStrategy=t),"round-robin"===t&&""!==s&&(o.stickyRoundRobinLimit=Number(s)||3);let l={...r};0===Object.keys(o).length?delete l[e]:l[e]=o;let n=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})});if(!n.ok)throw Error(`Failed to save strategy (${n.status})`)}catch(e){C(e?.message||"Failed to save provider strategy")}},E=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{if((await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])).some(e=>!e.ok))throw Error("Failed to reorder connections")}catch(e){C(e?.message||"Failed to reorder connections"),await S()}},A=async e=>{let t=s.find(t=>t.id===e),a=t?.name?.trim()||t?.email?.trim()||e;k({title:"Delete Connection",message:`Delete connection “${a}”?`,onConfirm:async()=>{k(null);try{let t=await fetch(`/api/providers/${e}`,{method:"DELETE"});if(!t.ok)throw Error(`Failed to delete connection (${t.status})`);r(t=>t.filter(t=>t.id!==e))}catch(e){C("Failed to delete connection")}}})},T=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)throw Error(`Failed to toggle connection (${s.status})`);r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){C("Failed to toggle connection")}},P=async t=>{try{let s=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})});if(!s.ok)throw Error(`Failed to save API key (${s.status})`);await S(),c(!1)}catch(e){C("Failed to save API key")}},R=async e=>{try{let t=await fetch(`/api/providers/${p.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error(`Failed to update connection (${t.status})`);await S(),u(!1)}catch(e){C("Failed to update connection")}};return o?(0,a.jsx)(i.Zp,{children:(0,a.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(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)(i.lM,{checked:"round-robin"===y,onChange:e=>{let t=e?"round-robin":null;v(t),e&&!j&&w("1"),$(t,e?j||"1":j)}}),"round-robin"===y&&(0,a.jsxs)("div",{className:"flex flex-wrap 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:j,onChange:e=>{w(e.target.value),$("round-robin",e.target.value)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===s.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>c(!0),children:"Add Connection"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:s.map((e,r)=>(0,a.jsx)(b,{connection:e,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>E(r,r-1),onMoveDown:()=>E(r,r+1),onToggleActive:t=>T(e.id,t),onEdit:()=>{h(e),u(!0)},onDelete:()=>A(e.id)},e.id))}),(0,a.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>c(!0),children:"Add"})})]})]}),(0,a.jsx)(f,{isOpen:d,provider:e,onSave:P,onClose:()=>c(!1)}),(0,a.jsx)(i.wI,{isOpen:m,connection:p,onSave:R,onClose:()=>u(!1)}),(0,a.jsx)(i.uo,{isOpen:!!N,onClose:()=>k(null),onConfirm:N?.onConfirm,title:N?.title||"Confirm",message:N?.message,variant:"danger"})]})}h.propTypes={until:p().string.isRequired},b.propTypes={connection:p().shape({id:p().string,name:p().string,email:p().string,displayName:p().string,testStatus:p().string,isActive:p().bool,lastError:p().string,priority:p().number}).isRequired,isOAuth:p().bool.isRequired,isFirst:p().bool.isRequired,isLast:p().bool.isRequired,onMoveUp:p().func.isRequired,onMoveDown:p().func.isRequired,onToggleActive:p().func.isRequired,onEdit:p().func.isRequired,onDelete:p().func.isRequired},f.propTypes={isOpen:p().bool.isRequired,provider:p().string,providerName:p().string,onSave:p().func.isRequired,onClose:p().func.isRequired},g.propTypes={providerId:p().string.isRequired,isOAuth:p().bool};var y=s(28777),v=s(11059),j=s(78559);function w({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:l,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let m="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:m?{color:m}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-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}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"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:c?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),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.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:s===`model-${e.id}`?"Copied!":"Copy"})]}),n&&(0,a.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),l&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function N({isOpen:e,onSave:t,onClose:s}){let[r,o]=(0,n.useState)(""),l=()=>{r.trim()&&(t(r.trim()),o(""))};return(0,a.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.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:r,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&l(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:l,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function k({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,v.C)(),[l,d]=(0,n.useState)({}),[m,u]=(0,n.useState)([]),[p,x]=(0,n.useState)({}),[h,b]=(0,n.useState)(null),[f,g]=(0,n.useState)(""),[C,S]=(0,n.useState)(!1),[$,E]=(0,n.useState)([]),A=s||(0,c.wG)(e),T=t||"llm",P=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/models/alias"),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/custom",{cache:"no-store"})]),r=await t.json(),o=await s.json(),l=await a.json();t.ok&&d(r.aliases||{}),s.ok&&E((o.connections||[]).filter(t=>t.provider===e)),a.ok&&u(l.models||[])}catch(e){(0,j.s)("ModelsCard fetch error:",e)}},[e]);(0,n.useEffect)(()=>{P()},[P]);let R=async(e,t)=>{let s=`${A}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await P()}catch(e){(0,j.s)("set alias error:",e)}},I=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await P()}catch(e){(0,j.s)("delete alias error:",e)}},_=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:A,id:e,type:T})})).ok&&(await P(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){(0,j.s)("add custom model error:",e)}},O=async e=>{try{let t=new URLSearchParams({providerAlias:A,id:e,type:T});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await P(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){(0,j.s)("delete custom model error:",e)}},M=async e=>{if(!h){b(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${A}/${e}`,kind:t})}),a=await s.json();x(t=>({...t,[e]:a.ok?"ok":"error"})),g(a.ok?"":a.error||"Model not reachable")}catch{x(t=>({...t,[e]:"error"})),g("Network error")}finally{b(null)}}},F=(0,y.KC)(e),K=t?F.filter(e=>e.kinds?e.kinds.includes(t):(0,y.CP)(e,"llm")===t):F,L=m.filter(e=>e.providerAlias===A&&(0,y.CP)(e,"llm")===T&&!K.some(t=>t.id===e.id));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),f&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:f}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[K.map(e=>{let t=`${A}/${e.id}`,s=Object.entries(l).find(([,e])=>e===t)?.[0];return(0,a.jsx)(w,{model:e,fullModel:`${A}/${e.id}`,alias:s,copied:r,onCopy:o,onSetAlias:t=>R(e.id,t),onDeleteAlias:()=>I(s),testStatus:p[e.id],onTest:$.length>0?()=>M(e.id):void 0,isTesting:h===e.id,isFree:e.isFree},e.id)}),L.map(e=>(0,a.jsx)(w,{model:{id:e.id,name:e.name},fullModel:`${A}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>O(e.id),testStatus:p[e.id],onTest:$.length>0?()=>M(e.id):void 0,isTesting:h===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>S(!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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(N,{isOpen:C,onSave:async e=>{await _(e),S(!1)},onClose:()=>S(!1)})]})}function C({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,a.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}w.propTypes={model:p().shape({id:p().string.isRequired}).isRequired,fullModel:p().string.isRequired,copied:p().string,onCopy:p().func.isRequired,testStatus:p().oneOf(["ok","error"]),isCustom:p().bool,isFree:p().bool,onDeleteAlias:p().func,onTest:p().func,isTesting:p().bool},N.propTypes={isOpen:p().bool.isRequired,onSave:p().func.isRequired,onClose:p().func.isRequired},k.propTypes={providerId:p().string.isRequired,kindFilter:p().string,providerAliasOverride:p().string};let S={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
2
+ "results": [
3
+ { "title": "...", "url": "...", "snippet": "..." }
4
+ ]
5
+ }`,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:`{
6
+ "content": "...",
7
+ "title": "...",
8
+ "url": "..."
9
+ }`,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:`{
10
+ "data": [
11
+ { "url": "...", "b64_json": "..." }
12
+ ]
13
+ }`,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:`{
14
+ "text": "A cat sitting on a windowsill...",
15
+ "model": "..."
16
+ }`},video:{inputLabel:"Prompt",inputPlaceholder:"A serene lake at sunset",defaultInput:"A serene lake at sunset",bodyKey:"prompt",defaultResponse:`{
17
+ "data": [
18
+ { "url": "..." }
19
+ ]
20
+ }`},music:{inputLabel:"Prompt",inputPlaceholder:"A calm piano melody",defaultInput:"A calm piano melody",bodyKey:"prompt",defaultResponse:`{
21
+ "data": [
22
+ { "url": "...", "format": "mp3" }
23
+ ]
24
+ }`}},$=`{
25
+ "object": "list",
26
+ "data": [{
27
+ "object": "embedding",
28
+ "index": 0,
29
+ "embedding": [0.002301, -0.019212, 0.004815, -0.031249, ...]
30
+ }],
31
+ "model": "...",
32
+ "usage": { "prompt_tokens": 9, "total_tokens": 9 }
33
+ }`;function E({providerId:e,customAlias:t}){let s=(0,c.gC)(e),r=s?t||e:(0,c.wG)(e),o=s?[]:(0,y.KC)(e).filter(e=>"embedding"===(0,y.CP)(e)),[l,d]=(0,n.useState)(o[0]?.id??""),[m,u]=(0,n.useState)("The quick brown fox jumps over the lazy dog"),[p,x]=(0,n.useState)(""),[h,b]=(0,n.useState)(""),[f,g]=(0,n.useState)(""),[j,w]=(0,n.useState)(null),[N,k]=(0,n.useState)(!1),[S,A]=(0,n.useState)(""),{copied:T,copy:P}=(0,v.C)(),{copied:R,copy:I}=(0,v.C)();(0,n.useEffect)(()=>{g(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{b((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{})},[]);let _=l?`${r}/${l}`:"",O=()=>{let e={model:_,input:m.trim()},t=Number(p);return p&&Number.isFinite(t)&&t>0&&(e.dimensions=t),e},M=`curl -X POST ${f}/v1/embeddings \\
34
+ -H "Content-Type: application/json" \\
35
+ -H "Authorization: Bearer ${h||"YOUR_KEY"}" \\
36
+ -d '${JSON.stringify(O())}'`,F=async()=>{if(!m.trim()||!_)return;k(!0),A(""),w(null);let e=Date.now();try{let t={"Content-Type":"application/json"};h&&(t.Authorization=`Bearer ${h}`);let s=await fetch("/api/v1/embeddings",{method:"POST",headers:t,body:JSON.stringify(O())}),a=Date.now()-e,r=await s.json();if(!s.ok)return void A(r?.error?.message||r?.error||`HTTP ${s.status}`);w({data:r,latencyMs:a})}catch(e){A(e.message||"Network error")}finally{k(!1)}},K=j?JSON.stringify(j.data,null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(C,{label:"Model",children:s?(0,a.jsx)("input",{value:l,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,a.jsx)("select",{value:l,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:o.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(C,{label:"Endpoint",children:(0,a.jsx)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:(0,a.jsx)("input",{value:f,onChange:e=>g(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"})})}),(0,a.jsx)(C,{label:"API Key",children:(0,a.jsx)("input",{type:"password",value:h,onChange:e=>b(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,a.jsx)(C,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:m,onChange:e=>u(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"}),m&&(0,a.jsx)("button",{type:"button",onClick:()=>u(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(C,{label:"Dimensions",children:(0,a.jsx)("input",{type:"number",min:"1",value:p,onChange:e=>x(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,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>P(M),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:T?"check":"content_copy"}),T?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:F,disabled:N||!m.trim()||!_,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-on-primary text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:N?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),N?"Running...":"Run"]})]})]}),(0,a.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:M})]}),S&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:S}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",j&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",j.latencyMs,"ms"]})]}),j&&(0,a.jsxs)("button",{onClick:()=>I(K),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:R?"check":"content_copy"}),R?"Copied":"Copy"]})]}),(0,a.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 $;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)})(j?.data)})]})]})]})}let A={"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 T=s(63935),P=s(14683);let R=`// Audio will appear here after running.
37
+ // Example JSON response (response_format=json):
38
+ {
39
+ "format": "mp3",
40
+ "audio": "//NExAANaAIIAUAAANNNNNNNN..." // base64 encoded MP3
41
+ }`;function I({providerId:e}){let t,s,r=(0,c.wG)(e),o=A[e]||A["edge-tts"],[l,d]=(0,n.useState)(o.defaultVoiceId||""),[m,u]=(0,n.useState)(""),[p,x]=(0,n.useState)(o.defaultVoiceId||""),[h,b]=(0,n.useState)([]),[f,g]=(0,n.useState)(""),[j,w]=(0,n.useState)(()=>{let t=c.Q2[e]?.ttsConfig?.models;if(t?.length)return t[0].id;if(o.hasModelSelector&&o.modelKey){let e=(0,y.KC)(o.modelKey);return e?.[0]?.id||""}return""}),[N,k]=(0,n.useState)("Hello, this is a text to speech test."),[S,$]=(0,n.useState)(""),[E,_]=(0,n.useState)(""),[O,M]=(0,n.useState)("mp3"),[F,K]=(0,n.useState)(""),[L,B]=(0,n.useState)(null),[D,U]=(0,n.useState)(!1),[q,z]=(0,n.useState)(""),[J,V]=(0,n.useState)(null),{copied:H,copy:W}=(0,v.C)(),[G,Y]=(0,n.useState)(!1),[Z,Q]=(0,n.useState)([]),[X,ee]=(0,n.useState)(!1),[et,es]=(0,n.useState)(""),[ea,er]=(0,n.useState)(""),[eo,el]=(0,n.useState)({}),[en,ei]=(0,n.useState)("");(0,n.useEffect)(()=>{if(_(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{$((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),"hardcoded"===o.voiceSource){let t=o.hasModelSelector&&o.modelKey&&(0,y.KC)(o.modelKey)?.[0]?.id||"",s=o.voicesPerModel&&t?(0,T.jY)(e,t)||[]:(0,y.KC)(o.voiceKey||e).filter(e=>"tts"===(0,y.CP)(e));if(s.length)if(o.hasBrowseButton){let e=s.find(e=>"en"===e.id)||s[0];g(e.id),d(e.id),u(e.name),b([{id:e.id,name:e.name}])}else b(s),d(s[0].id),u(s[0].name||s[0].id)}},[o.hasBrowseButton,o.hasModelSelector,o.modelKey,o.voiceKey,o.voiceSource,o.voicesPerModel,e]),(0,n.useEffect)(()=>{if(!o.voicesPerModel||!j)return;let t=(0,T.jY)(e,j)||[];b(t),t.length&&(d(t[0].id),u(t[0].name||t[0].id))},[o.voicesPerModel,e,j]);let ed=async()=>{if(Y(!0),es(""),er(""),!Z.length){ee(!0);try{if("hardcoded"===o.voiceSource){let t=o.voiceKey||e,s=(0,y.KC)(t).filter(e=>"tts"===(0,y.CP)(e)),a={};for(let e of s)a[e.id]||(a[e.id]={code:e.id,name:e.name,voices:[{id:e.id,name:e.name}]});el(a),Q(Object.values(a).sort((e,t)=>e.name.localeCompare(t.name)))}else{let t=o.apiEndpoint?o.apiEndpoint:`/api/media-providers/tts/voices?provider=${"local-device"===e?"local-device":"edge-tts"}`,s=await fetch(t),a=await s.json();if(a.error)return void er(a.error);Q(a.languages||[]),el(a.byLang||{})}}catch(e){er(e.message)}finally{ee(!1)}}},ec=et?Z.filter(e=>e.name.toLowerCase().includes(et.toLowerCase())||e.code.toLowerCase().includes(et.toLowerCase())):Z,em=o.hasVoiceIdInput&&p||l,eu=o.hasModelSelector&&j&&em?`${r}/${j}/${em}`:o.hasModelSelector&&j?`${r}/${j}`:em?`${r}/${em}`:"",ep=(t={model:eu,input:N},o.hasLanguageHint&&en&&(t.language=en),t),ex=`curl -X POST ${E}/v1/audio/speech${"json"===O?"?response_format=json":""} \\
42
+ -H "Content-Type: application/json" \\
43
+ -H "Authorization: Bearer ${S||"YOUR_KEY"}" \\
44
+ -d '${JSON.stringify(ep)}' \\
45
+ ${"json"===O?"":"--output speech.mp3"}`,eh=async()=>{if(!N.trim()||!eu)return;U(!0),z(""),K(""),B(null);let e=Date.now();try{let t={"Content-Type":"application/json"};S&&(t.Authorization=`Bearer ${S}`);let s=`/api/v1/audio/speech${"json"===O?"?response_format=json":""}`,a=await fetch(s,{method:"POST",headers:t,body:JSON.stringify({...ep,input:N.trim()})});if(V(Date.now()-e),!a.ok){let e=await a.json().catch(()=>({}));z(e?.error?.message||e?.error||`HTTP ${a.status}`);return}if("json"===O){let e=await a.json();B(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob());K(URL.createObjectURL(t))}else{let e=await a.blob();K(URL.createObjectURL(e))}}catch(e){z(e.message||"Network error")}finally{U(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(C,{label:"Endpoint",children:(0,a.jsx)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:(0,a.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:[E,"/v1/audio/speech"]})})}),(0,a.jsx)(C,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:S?`${S.slice(0,8)}${"•".repeat(Math.min(20,S.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),o.hasModelSelector&&(o.modelKey||(0,y.KC)(e).some(e=>"tts"===(0,y.CP)(e)))&&(0,a.jsx)(C,{label:"Model",children:(0,a.jsx)("select",{value:j,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:((s=(0,y.KC)(e).filter(e=>"tts"===(0,y.CP)(e))).length?s:(0,y.KC)(o.modelKey)||[]).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),o.hasLanguageHint&&(0,a.jsx)(C,{label:"Language",children:(0,a.jsxs)("select",{value:en,onChange:e=>ei(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,a.jsx)("option",{value:"",children:"Auto-detect"}),P.I.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.id))]})}),o.hasBrowseButton&&(0,a.jsx)(C,{label:"Language",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("button",{onClick:ed,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:f?(0,a.jsx)("span",{className:"text-text-main",children:Z.find(e=>e.code===f)?.name||f}):(0,a.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,a.jsxs)("button",{onClick:ed,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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),h.length>0&&(0,a.jsx)(C,{label:"Voice",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:h.map(e=>(0,a.jsxs)("button",{onClick:()=>{d(e.id),u(e.name),o.hasVoiceIdInput&&x(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,a.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,a.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))})}),o.hasVoiceIdInput&&(0,a.jsx)(C,{label:"Voice ID",children:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:p,onChange:e=>{x(e.target.value),d(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"}),p&&(0,a.jsx)("button",{type:"button",onClick:()=>{x(""),d("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),o.hasLanguageDropdown&&(0,a.jsx)(C,{label:"Language",children:(0,a.jsx)("select",{value:l,onChange:t=>{let s=(0,y.KC)(e).filter(e=>"tts"===(0,y.CP)(e)).find(e=>e.id===t.target.value);d(t.target.value),u(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,y.KC)(e).filter(e=>"tts"===(0,y.CP)(e)).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(C,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:N,onChange:e=>k(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"}),N&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(C,{label:"Output Format",children:(0,a.jsxs)("select",{value:O,onChange:e=>M(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,a.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>W(ex),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:H?"check":"content_copy"}),H?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eh,disabled:D||!N.trim()||!eu,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-on-primary text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:D?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),D?"Generating...":"Run"]})]})]}),(0,a.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:ex})]}),q&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:q}),F?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",J&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",J,"ms"]})]}),(0,a.jsxs)("a",{href:F,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,a.jsx)("audio",{controls:!0,src:F,className:"w-full"}),L&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,a.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:L.format,audio:L.audio?`${L.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,a.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:R})]})]})]}),G&&(0,a.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:()=>Y(!1),children:(0,a.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,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold","data-i18n":"Select Language",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>Y(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,a.jsx)("input",{autoFocus:!0,value:et,onChange:e=>es(e.target.value),placeholder:"Search language...","data-i18n-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,a.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[ea&&(0,a.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:ea}),X?(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[ec.map(e=>(0,a.jsxs)("button",{onClick:()=>{let t;return Y(!1),g(e.code),void(b(t=eo[e.code]?.voices||[]),t.length&&(d(t[0].id),u(t[0].name),o.hasVoiceIdInput&&x(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${f===e.code?"bg-primary/10 text-primary":""}`,children:[(0,a.jsx)("span",{className:"text-sm",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.voices.length," voices"]}),f===e.code&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===ec.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}var _=s(5772);let O="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png";function M(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}function F({providerId:e,kind:t}){let s=(0,c.wG)(e),r=(0,c.rs)(s)===e?s:e,o=c.rj.find(e=>e.id===t),l=S[t],d=l||{},m=(0,y.KC)(e).filter(e=>(0,y.CP)(e)===t),u=new Set(["image","video","music","imageToText"]).has(t),p=u&&0===m.length,[x,h]=(0,n.useState)(m[0]?.id??""),b=m.find(e=>e.id===x),f=!!b?.capabilities?.includes("edit"),g=!!b?.capabilities?.includes("mask"),[j,w]=(0,n.useState)(d.defaultInput||""),[N,k]=(0,n.useState)(""),[$,E]=(0,n.useState)(""),[A,T]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[P,R]=(0,n.useState)(""),[I,K]=(0,n.useState)(""),[L,B]=(0,n.useState)(null),[D,U]=(0,n.useState)(null),[q,z]=(0,n.useState)(null),[J,V]=(0,n.useState)("json"),[H,W]=(0,n.useState)(""),[G,Y]=(0,n.useState)(!1),[Z,Q]=(0,n.useState)(""),[X,ee]=(0,n.useState)([]),[et,es]=(0,n.useState)(""),{copied:ea,copy:er}=(0,v.C)(),{copied:eo,copy:el}=(0,v.C)();if((0,n.useEffect)(()=>{K(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{R((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{ee((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!o||!l)return null;let en=o.endpoint.path,ei=u?x?`${r}/${x}`:p?"":r:r,ed="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===x?{image:O}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===x?{image:O,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},ec=N.trim()||ed.image||"",em=$.trim()||ed.mask_image||"",eu=M(ec),ep=M(em),ex=Object.entries(A).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),eh={model:ei,[l.bodyKey]:j,...l.extraBody,...ex,...f&&ec?{image:ec}:{},...g&&em?{mask_image:em}:{}},eb="image"===t&&"binary"===J,ef="image"===t&&"codex"===e&&!eb,eg=`${en}${eb?"?response_format=binary":""}`,ey=`-H "Content-Type: application/json" \\
46
+ -H "Authorization: Bearer ${P||"YOUR_KEY"}"${et?` \\
47
+ -H "x-connection-id: ${et}"`:""}${ef?` \\
48
+ -H "Accept: text/event-stream"`:""}`,ev=`curl -X ${o.endpoint.method} ${I}${eg} \\
49
+ ${ey.replace(/\\\n /g,"\\\n ")} \\
50
+ -d '${JSON.stringify(eh)}'${eb?" \\\n --output image.png":""}`,ej=async()=>{if(!j.trim()||!ei)return;if(Y(!0),Q(""),B(null),U(null),z(null),H){try{URL.revokeObjectURL(H)}catch{}W("")}let e=Date.now();try{let t={"Content-Type":"application/json"};P&&(t.Authorization=`Bearer ${P}`),et&&(t["x-connection-id"]=et),ef&&(t.Accept="text/event-stream");let s={...eh,model:ei},a=await fetch(`/api${eg}`,{method:o.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));Q(e?.error?.message||e?.error||`HTTP ${a.status}`);return}let r=a.headers.get("content-type")||"";if(r.startsWith("image/")){let t=await a.blob(),s=URL.createObjectURL(t);W(s),B({data:{binary:!0,mime:r,size:t.size},latencyMs:Date.now()-e});return}if(r.includes("text/event-stream")&&a.body){let t=a.body.getReader(),s=new TextDecoder,r="",o=null,l=null;for(;;){let e,{done:a,value:n}=await t.read();if(a)break;for(r+=s.decode(n,{stream:!0});-1!==(e=r.indexOf("\n\n"));){let t=r.slice(0,e);r=r.slice(e+2);let s=null,a="";for(let e of t.split("\n"))e.startsWith("event:")?s=e.slice(6).trim():e.startsWith("data:")&&(a+=e.slice(5).trim());if(s)try{let e=a?JSON.parse(a):{};"progress"===s?U(e):"partial_image"===s?z(e):"done"===s?o=e:"error"===s&&(l=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(l)return void Q(l);o&&B({data:o,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;B({data:t,latencyMs:s})}}catch(e){Q(e.message||"Network error")}finally{Y(!1)}},ew=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(ew);let t={};for(let[s,a]of Object.entries(e))t[s]="b64_json"===s&&"string"==typeof a&&a.length>100?`<${a.length} chars base64>`:ew(a);return t},eN=L?JSON.stringify(ew(L.data),null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[m.length>0?(0,a.jsx)(C,{label:"Model",children:(0,a.jsx)("select",{value:x,onChange:e=>h(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:m.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):p?(0,a.jsx)(C,{label:"Model",children:(0,a.jsx)("input",{value:x,onChange:e=>h(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,a.jsx)(C,{label:"Endpoint",children:(0,a.jsx)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:(0,a.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:[I,en]})})}),(0,a.jsx)(C,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:P?`${P.slice(0,8)}${"•".repeat(Math.min(20,P.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),X.length>0&&(0,a.jsx)(C,{label:"Connection",children:(0,a.jsxs)("select",{value:et,onChange:e=>es(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,a.jsx)("option",{value:"",children:"Auto (by priority)"}),X.map(e=>{let t=e.providerSpecificData?.chatgptPlanType,s=e.email||e.name||e.id.slice(0,8);return(0,a.jsxs)("option",{value:e.id,children:[s,t?` [${t}]`:""]},e.id)})]})}),(0,a.jsx)(C,{label:l.inputLabel,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:l.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,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),f&&(0,a.jsx)(C,{label:"Ref Image (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:ed.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,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eu&&(0,a.jsx)(_.default,{src:eu,alt:"Reference",width:640,height:320,unoptimized:!0,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"}})]})}),g&&(0,a.jsx)(C,{label:"Mask (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:$,onChange:e=>E(e.target.value),placeholder:ed.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"}),$&&(0,a.jsx)("button",{type:"button",onClick:()=>E(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),ep&&(0,a.jsx)(_.default,{src:ep,alt:"Mask",width:640,height:320,unoptimized:!0,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"}})]})}),(l.extraFields||[]).filter(e=>0===m.length||Array.isArray(b?.params)&&b.params.includes(e.key)).map(e=>(0,a.jsx)(C,{label:e.label,children:"select"===e.type?(0,a.jsx)("select",{value:A[e.key]??"",onChange:t=>T(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,a.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,a.jsx)("input",{type:"text",value:A[e.key]??"",placeholder:e.placeholder,onChange:t=>T(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,a.jsx)("input",{type:"number",value:A[e.key]??"",min:e.min,max:e.max,onChange:t=>T(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,a.jsx)(C,{label:"Output Format",children:(0,a.jsxs)("select",{value:J,onChange:e=>V(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,a.jsx)("option",{value:"json",children:"JSON (Base64)"}),(0,a.jsx)("option",{value:"binary",children:"Binary File"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>er(ev),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ea?"check":"content_copy"}),ea?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:ej,disabled:G||!j.trim()||!ei,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-on-primary text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:G?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),G?"Running...":"Run"]})]})]}),(0,a.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:ev})]}),(G||D)&&ef&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:G?{animation:"spin 1s linear infinite"}:void 0,children:G?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[D?.stage||"starting",!G&&D?.bytesReceived?` \xb7 ${(D.bytesReceived/1024).toFixed(1)} KB`:""]})]}),q?.b64_json&&!L&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,a.jsx)(_.default,{src:`data:image/png;base64,${q.b64_json}`,alt:"Partial",width:1024,height:1024,unoptimized:!0,className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),Z&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:Z}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L.latencyMs,"ms"]})]}),L&&(0,a.jsxs)("button",{onClick:()=>el(eN),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eo?"check":"content_copy"}),eo?"Copied":"Copy"]})]}),(0,a.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:L?eN:l.defaultResponse}),"image"===t&&(H||L?.data?.data?.[0])&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:H||(L?.data?.data?.[0]?.b64_json?`data:image/png;base64,${L.data.data[0].b64_json}`:L?.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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)(_.default,{src:H||(L?.data?.data?.[0]?.b64_json?`data:image/png;base64,${L.data.data[0].b64_json}`:L?.data?.data?.[0]?.url),alt:"Generated",width:1024,height:1024,unoptimized:!0,className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function K({providerId:e}){let t=(0,c.wG)(e),s=(0,y.KC)(e).filter(e=>"stt"===(0,y.CP)(e)),[r,o]=(0,n.useState)([]),l=[...s,...r],[d,m]=(0,n.useState)(s[0]?.id??""),u=l.find(e=>e.id===d),p=Array.isArray(u?.params)?u.params:[],[x,h]=(0,n.useState)(null),[b,f]=(0,n.useState)(""),[g,j]=(0,n.useState)(""),[w,N]=(0,n.useState)("json"),[k,S]=(0,n.useState)(""),[$,E]=(0,n.useState)(""),[A,T]=(0,n.useState)(""),[P,R]=(0,n.useState)(null),[I,_]=(0,n.useState)(null),[O,M]=(0,n.useState)(!1),[F,L]=(0,n.useState)(""),{copied:B,copy:D}=(0,v.C)(),{copied:U,copy:q}=(0,v.C)();(0,n.useEffect)(()=>{T(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{E((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{o((e.models||[]).filter(e=>"stt"===(0,y.CP)(e)&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let z=d?`${t}/${d}`:"",J=`curl -X POST ${A}/v1/audio/transcriptions \\
51
+ -H "Authorization: Bearer ${$||"YOUR_KEY"}" \\
52
+ -F "file=@${x?.name||"audio.mp3"}" \\
53
+ -F "model=${z}"${p.includes("language")&&b?` \\
54
+ -F "language=${b}"`:""}${p.includes("response_format")?` \\
55
+ -F "response_format=${w}"`:""}${p.includes("temperature")&&k?` \\
56
+ -F "temperature=${k}"`:""}${p.includes("prompt")&&g?` \\
57
+ -F "prompt=${g}"`:""}`,V=async()=>{if(!x||!z)return;M(!0),L(""),R(null);let e=Date.now();try{let t=new FormData;t.append("file",x),t.append("model",z),p.includes("language")&&b&&t.append("language",b),p.includes("response_format")&&t.append("response_format",w),p.includes("temperature")&&k&&t.append("temperature",k),p.includes("prompt")&&g&&t.append("prompt",g);let s={};$&&(s.Authorization=`Bearer ${$}`);let a=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:s,body:t});_(Date.now()-e);let r=(a.headers.get("content-type")||"").includes("application/json")?await a.json():await a.text();if(!a.ok)return void L(r?.error?.message||r?.error||r||`HTTP ${a.status}`);R(r)}catch(e){L(e.message||"Network error")}finally{M(!1)}},H="string"==typeof P?P:P?JSON.stringify(P,null,2):`{
58
+ "text": "Hello world..."
59
+ }`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,a.jsx)(C,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>m(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,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(C,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>m(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,a.jsx)(C,{label:"Endpoint",children:(0,a.jsx)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:(0,a.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:[A,"/v1/audio/transcriptions"]})})}),(0,a.jsx)(C,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,$.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(C,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(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"}),x&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[x.name," \xb7 ",(x.size/1024).toFixed(1)," KB"]})]})}),p.includes("language")&&(0,a.jsx)(C,{label:"Language",children:(0,a.jsx)("input",{value:b,onChange:e=>f(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"})}),p.includes("prompt")&&(0,a.jsx)(C,{label:"Prompt",children:(0,a.jsx)("input",{value:g,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"})}),p.includes("temperature")&&(0,a.jsx)(C,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:k,onChange:e=>S(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"})}),p.includes("response_format")&&(0,a.jsx)(C,{label:"Response Format",children:(0,a.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,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>D(J),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:B?"check":"content_copy"}),B?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:V,disabled:O||!x||!z,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-on-primary text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:O?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),O?"Transcribing...":"Run"]})]})]}),(0,a.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:J})]}),F&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",P&&I&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",I,"ms"]})]}),P&&(0,a.jsxs)("button",{onClick:()=>q(H),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:U?"check":"content_copy"}),U?"Copied":"Copy"]})]}),(0,a.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:H})]})]})]})}var L=s(77251);function B(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,u=async()=>{if(await (0,L.l)({message:"Delete this Custom Embedding node?",confirmText:"Continue"}))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){(0,j.s)("Error deleting custom embedding node:",e)}},[p,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(m),[f,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!m)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),b(!1))}).catch(()=>{e||b(!1)}),()=>{e=!0}},[t,m]),!o)return(0,r.notFound)();let v=c.Q2[t],w=m?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!h&&!p)return(0,r.notFound)();if(m&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=m?["embedding"]:w.serviceKinds??["llm"];return m||N.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(l(),{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,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${w.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${w.id}.png`,alt:w.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:w.textIcon||w.id.slice(0,2).toUpperCase(),fallbackColor:w.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:w.name}),!m&&w.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:w.notice.apiKeyUrl,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"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),N.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:u,children:"Delete"})]})]})]}),!m&&w.kindNotice?.[e]&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:w.kindNotice[e]})]}),!m&&w.notice?.text&&!w.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:w.notice.text}),w.notice.apiKeyUrl&&(0,a.jsx)("a",{href:w.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 →"})]}),!m&&w.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(g,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(k,{providerId:t,kindFilter:e,providerAliasOverride:m?p?.prefix:void 0}),!m&&(w.searchConfig||w.fetchConfig||w.ttsConfig||w.sttConfig||w.embeddingConfig||w.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?w.fetchConfig:"tts"===e?w.ttsConfig:"stt"===e?w.sttConfig:"embedding"===e?w.embeddingConfig:w.searchConfig||{mode:"chat-completions",defaultModel:w.searchViaChat?.defaultModel,pricingUrl:w.searchViaChat?.pricingUrl,freeTier:w.searchViaChat?.freeTier},provider:w,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(E,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(I,{providerId:t}),"stt"===e&&!m&&(0,a.jsx)(K,{providerId:t}),!m&&S[e]&&(0,a.jsx)(F,{providerId:t,kind:e}),m&&(0,a.jsx)(i.x0,{isOpen:f,node:p,onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})}},e=>{e.O(0,[2574,3862,782,8500,2280,1321,7592,5497,8441,3794,7358],()=>e(e.s=17845)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>g});var r=t(95155),a=t(73321),i=t(98500),n=t.n(i),d=t(12115),o=t(35497),l=t(57250),c=t(88105),m=t(54026),x=t(78559);let h=new Set([]),p={image:"image-combo",tts:"tts-combo"};function b(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function u({provider:e,kind:s,connections:t,isCustom:a,onToggle:i}){let d=c.Q2[e.id],m=!!d?.noAuth,x=t.filter(s=>s.provider===e.id),h=x.filter(e=>{let s=b(e);return"active"===s||"success"===s}).length,p=x.filter(e=>{let s=b(e);return"error"===s||"expired"===s||"unavailable"===s}).length,f=x.length,g=f>0&&x.every(e=>!1===e.isActive);return(0,r.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(o.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${g?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(l.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[a&&(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"Custom"}),m?(0,r.jsx)(o.Ex,{variant:"success",size:"sm",children:"Ready"}):g?(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===f?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(o.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(o.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(o.Ex,{variant:"default",size:"sm",children:[f," Added"]})]})]})]})]}),f>0&&(0,r.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),i&&i(e.id,g)},children:(0,r.jsx)(o.lM,{size:"sm",checked:!g,onChange:()=>{},title:g?"Enable provider":"Disable provider"})})]})})})}function f({combos:e}){return 0===e.length?null:(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(o.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=c.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(l.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function g(){let{kind:e}=(0,a.useParams)(),s=(0,a.useRouter)(),[t,i]=(0,d.useState)([]),[n,l]=(0,d.useState)([]),[b,g]=(0,d.useState)([]),[v,j]=(0,d.useState)(!1);(0,d.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&s.replace("/dashboard/media-providers/web")},[e,s]);let N=c.rj.find(s=>s.id===e),y="embedding"===e,k=h.has(e);if((0,d.useEffect)(()=>{N&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>i(e.connections||[])).catch(()=>{}),y&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>l((e.nodes||[]).filter(e=>"custom-embedding"===e.type))).catch(()=>{}),k&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>g(e.combos||[])).catch(()=>{}))},[y,k,N]),!N)return(0,a.notFound)();let w=(0,c.o5)(e),C=b.filter(s=>s.kind===e),$=n.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),E=[...w,...$],S=async(e,s)=>{let r=t.filter(s=>s.provider===e);i(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),await Promise.allSettled(r.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},z=async()=>{let t=p[e]||`${e}-combo`,r=t,a=1,i=new Set(b.map(e=>e.name));for(;i.has(r);)r=`${t}-${a++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:e})});if(n.ok){let e=await n.json();s.push(`/dashboard/media-providers/combo/${e.id}`)}else{let e=await n.json();(0,x.s)(e.error||"Failed to create combo")}};return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:N.label}),(0,r.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"Media providers \xb7 not agent Skills"})]}),(0,r.jsx)(m.A,{activeKind:e}),(y||k)&&(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[k&&(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:z,children:"Create Combo"}),y&&(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>j(!0),children:"Add Custom Embedding"})]}),k&&C.length>0&&(0,r.jsx)(f,{combos:C}),0===E.length?(0,r.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,r.jsx)("strong",{children:N.label})," yet."]}):(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[w.map(s=>(0,r.jsx)(u,{provider:s,kind:e,connections:t,onToggle:S},s.id)),$.map(s=>(0,r.jsx)(u,{provider:s,kind:e,connections:t,isCustom:!0,onToggle:S},s.id))]}),y&&(0,r.jsx)(o.x0,{isOpen:v,onClose:()=>j(!1),onCreated:e=>{l(s=>[...s,e]),j(!1)}})]})}},54026:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});var r=t(95155),a=t(98500),i=t.n(a),n=t(73321),d=t(31474);let o=[{id:"image",label:"Image",href:"/dashboard/media-providers/image"},{id:"tts",label:"TTS",href:"/dashboard/media-providers/tts"},{id:"stt",label:"STT",href:"/dashboard/media-providers/stt"},{id:"embedding",label:"Embedding",href:"/dashboard/media-providers/embedding"},{id:"web",label:"Web",href:"/dashboard/media-providers/web"}];function l({activeKind:e}){let s=(0,n.usePathname)(),t=e||o.find(e=>s===e.href||s.startsWith(`${e.href}/`))?.id||"";return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mb-5",children:[(0,r.jsx)(i(),{href:"/dashboard/media-providers",className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors","/dashboard/media-providers"===s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:"All"}),o.map(e=>{let s=t===e.id;return(0,r.jsx)(i(),{href:e.href,className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors",s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:e.label},e.id)})]})}},61493:(e,s,t)=>{Promise.resolve().then(t.bind(t,16144))}},e=>{e.O(0,[2574,3862,782,8500,2280,1321,7592,5497,8441,3794,7358],()=>e(e.s=61493)),_N_E=e.O()}]);
@@ -0,0 +1,4 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),d=s(57250),c=s(88105),m=s(78559),x=s(77251),h=s(5772);let u=/^[a-zA-Z0-9_.\-]+$/,p={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},b={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},f={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function j(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function g(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[g,w]=(0,r.useState)(!0),[y,v]=(0,r.useState)(""),[N,k]=(0,r.useState)(""),[S,U]=(0,r.useState)([]),[$,C]=(0,r.useState)(!1),[O,_]=(0,r.useState)(!1),[T,R]=(0,r.useState)([]),[A,L]=(0,r.useState)(!1),[P,z]=(0,r.useState)(null),[E,D]=(0,r.useState)(""),[F,M]=(0,r.useState)(""),[I,J]=(0,r.useState)([]),[W,H]=(0,r.useState)({}),Z=async()=>{try{let[t,s,a,l,r,n]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&H((await n.json()).aliases||{}),l.ok){let e=await l.json();M((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&J((await r.json()).connections||[]),!t.ok){i(null),w(!1);return}let o=await t.json();i(o),v(o.name),U(o.models||[]);let d=s.ok?await s.json():{};C(d.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let c=a.ok?await a.json():[];R(c.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}w(!1)};(0,r.useEffect)(()=>{Z()},[e]);let q=e=>e.trim()?u.test(e)?(k(""),!0):(k("Only letters, numbers, -, _ and ."),!1):(k("Name is required"),!1),B=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok){let e=await s.json();return(0,m.s)(e.error||"Failed to save"),!1}return!0},Y=async()=>{!q(y)||y===s.name||await B({name:y})&&await Z()},G=async e=>{let t=e?.value||e;if(!t||S.includes(t))return;let s=[...S,t];U(s),await B({models:s})},K=async e=>{let t=e?.value||e;if(!t||!S.includes(t))return;let s=S.filter(e=>e!==t);U(s),await B({models:s})},Q=async e=>{let t=S.filter((t,s)=>s!==e);U(t),await B({models:t})},V=async(e,t)=>{let s=[...S],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],U(s),await B({models:s}))},X=async e=>{C(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},ee=async()=>{!await (0,x.l)({message:`Delete combo "${s.name?.trim()||e}"?`,confirmText:"Continue"})||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(j(s.kind))},et=async()=>{if(L(!0),z(null),D(""),P?.audioUrl)try{URL.revokeObjectURL(P.audioUrl)}catch{}if(P?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(P.imageUrl)}catch{}let e=Date.now();try{let t=b[s.kind],a=f[s.kind](s.name),l={"Content-Type":"application/json"};F&&(l.Authorization=`Bearer ${F}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));D(e?.error?.message||e?.error||`HTTP ${r.status}`),z({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();z({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();z({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),d=o?.data?.[0],c=d?.b64_json?`data:image/png;base64,${d.b64_json}`:d?.url||"";z({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:c,latencyMs:i})}catch(e){D(e.message||"Network error")}L(!1)};if(g)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let es=p[s.kind]||c.rj.find(e=>e.id===s.kind)?.label||"Combo",ea=b[s.kind],el=s.kind&&f[s.kind]?f[s.kind](s.name):null,er=ea?`curl -X POST http://localhost:20128${ea} \\
2
+ -H "Content-Type: application/json" \\
3
+ -H "Authorization: Bearer ${F||"YOUR_KEY"}" \\
4
+ -d '${JSON.stringify(el)}'`:"",ei=j(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ei,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[es," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:ee,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:y,onChange:e=>{v(e.target.value),q(e.target.value)},onBlur:Y,error:N}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:$,onChange:X})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>_(!0),children:"Add Provider"})]}),0===S.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:S.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=c.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(d.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>V(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>V(t,1),disabled:t===S.length-1,className:`p-1 rounded ${t===S.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Q(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ea&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:et,disabled:A||0===S.length,children:A?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:er}),E&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:E}),P&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=P.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",P.latencyMs,"ms"]}),P.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:P.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)(h.default,{src:P.imageUrl,alt:"Generated",width:1024,height:1024,unoptimized:!0,className:"max-w-full rounded-lg border border-border"})]}),P.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:P.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:P.audioUrl,className:"w-full"})]}),P.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:P.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===T.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:T.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:O,onClose:()=>_(!1),onSelect:G,onDeselect:K,activeProviders:I,modelAliases:W,title:`Add ${es} Model`,kindFilter:s.kind,addedModelValues:S,closeOnSelect:!1})]})}},69701:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[2574,3862,782,8500,2280,1321,7592,5497,8441,3794,7358],()=>e(e.s=69701)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9749],{57767:(e,s,i)=>{"use strict";i.r(s),i.d(s,{default:()=>c});var r=i(95155),t=i(98500),l=i.n(t),a=i(35497),d=i(88105);let n=[{id:"image",label:"Text to Image",icon:"brush",blurb:"Image generation providers"},{id:"tts",label:"Text to Speech",icon:"record_voice_over",blurb:"Speech synthesis providers"},{id:"stt",label:"Speech to Text",icon:"mic",blurb:"Transcription providers"},{id:"embedding",label:"Embedding",icon:"data_array",blurb:"Vector embedding providers"},{id:"web",label:"Web Fetch & Search",icon:"travel_explore",blurb:"Search + page fetch providers"}];function c(){return(0,r.jsxs)("div",{className:"flex flex-col gap-5 max-w-3xl",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Media"}),(0,r.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"image \xb7 TTS \xb7 STT \xb7 embeddings \xb7 web — separate from agent Skills"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:n.map(e=>{let s=d.rj.find(s=>s.id===e.id);return(0,r.jsx)(l(),{href:`/dashboard/media-providers/${e.id}`,className:"group",children:(0,r.jsx)(a.Zp,{padding:"sm",className:"h-full transition-colors group-hover:border-brand-500/40",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("div",{className:"size-9 rounded-lg bg-brand-500/10 text-primary flex items-center justify-center shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] leading-none",children:e.icon||s?.icon||"perm_media"})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:e.label||s?.label||e.id}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-subtle text-[16px] group-hover:text-primary transition-colors",children:"chevron_right"})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.blurb})]})]})})},e.id)})})]})}},96434:(e,s,i)=>{Promise.resolve().then(i.bind(i,57767))}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=96434)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9749],{57767:(e,s,i)=>{"use strict";i.r(s),i.d(s,{default:()=>c});var r=i(95155),t=i(98500),l=i.n(t),a=i(35497),d=i(88105);let n=[{id:"image",label:"Text to Image",icon:"brush",blurb:"Image generation providers"},{id:"tts",label:"Text to Speech",icon:"record_voice_over",blurb:"Speech synthesis providers"},{id:"stt",label:"Speech to Text",icon:"mic",blurb:"Transcription providers"},{id:"embedding",label:"Embedding",icon:"data_array",blurb:"Vector embedding providers"},{id:"web",label:"Web Fetch & Search",icon:"travel_explore",blurb:"Search + page fetch providers"}];function c(){return(0,r.jsxs)("div",{className:"flex flex-col gap-5 max-w-3xl",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Media"}),(0,r.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"image \xb7 TTS \xb7 STT \xb7 embeddings \xb7 web — separate from agent Skills"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:n.map(e=>{let s=d.rj.find(s=>s.id===e.id);return(0,r.jsx)(l(),{href:`/dashboard/media-providers/${e.id}`,className:"group",children:(0,r.jsx)(a.Zp,{padding:"sm",className:"h-full transition-colors group-hover:border-brand-500/40",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("div",{className:"size-9 rounded-lg bg-brand-500/10 text-primary flex items-center justify-center shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] leading-none",children:e.icon||s?.icon||"perm_media"})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:e.label||s?.label||e.id}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-subtle text-[16px] group-hover:text-primary transition-colors",children:"chevron_right"})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.blurb})]})]})})},e.id)})})]})}},96434:(e,s,i)=>{Promise.resolve().then(i.bind(i,57767))}},e=>{e.O(0,[2574,3862,782,8500,2280,1321,7592,5497,8441,3794,7358],()=>e(e.s=96434)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{22637:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},54026:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});var r=t(95155),a=t(98500),i=t.n(a),o=t(73321),d=t(31474);let l=[{id:"image",label:"Image",href:"/dashboard/media-providers/image"},{id:"tts",label:"TTS",href:"/dashboard/media-providers/tts"},{id:"stt",label:"STT",href:"/dashboard/media-providers/stt"},{id:"embedding",label:"Embedding",href:"/dashboard/media-providers/embedding"},{id:"web",label:"Web",href:"/dashboard/media-providers/web"}];function n({activeKind:e}){let s=(0,o.usePathname)(),t=e||l.find(e=>s===e.href||s.startsWith(`${e.href}/`))?.id||"";return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mb-5",children:[(0,r.jsx)(i(),{href:"/dashboard/media-providers",className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors","/dashboard/media-providers"===s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:"All"}),l.map(e=>{let s=t===e.id;return(0,r.jsx)(i(),{href:e.href,className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors",s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:e.label},e.id)})]})}},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>u});var r=t(95155),a=t(98500),i=t.n(a),o=t(12115),d=t(73321),l=t(35497),n=t(57250),c=t(88105),m=t(54026),x=t(78559);function h(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function b({provider:e,kind:s,connections:t}){let a=c.Q2[e.id],o=!!a?.noAuth,d=t.filter(s=>s.provider===e.id),m=d.filter(e=>{let s=h(e);return"active"===s||"success"===s}).length,x=d.filter(e=>{let s=h(e);return"error"===s||"expired"===s||"unavailable"===s}).length,p=d.length,f=p>0&&d.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${f?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:o?(0,r.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):f?(0,r.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===p?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[m>0&&(0,r.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[m," Connected"]}),x>0&&(0,r.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[x," Error"]}),0===m&&0===x&&(0,r.jsxs)(l.Ex,{variant:"default",size:"sm",children:[p," Added"]})]})})]})]})})})}function p({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=c.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function f({title:e,icon:s,kind:t,providers:a,connections:i,combos:o,onCreateCombo:d}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",o.length," combos)"]})]}),(0,r.jsx)(l.$n,{size:"sm",icon:"add",onClick:d,children:"Create Combo"})]}),o.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(p,{combos:o})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(b,{provider:e,kind:t,connections:i},e.id))})]})}function u(){let e=(0,d.useRouter)(),[s,t]=(0,o.useState)([]),[a,i]=(0,o.useState)([]),l=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,o.useEffect)(()=>{l()},[]);let n=(0,c.o5)("webSearch"),h=(0,c.o5)("webFetch"),b=a.filter(e=>"webSearch"===e.kind),p=a.filter(e=>"webFetch"===e.kind),u=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,o=new Set(a.map(e=>e.name));for(;o.has(r);)r=`${t}-${i++}`;let d=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(d.ok){let s=await d.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else{let e=await d.json();(0,x.s)(e.error||"Failed to create combo")}};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Web Fetch & Search"}),(0,r.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"Media providers \xb7 not agent Skills"})]}),(0,r.jsx)(m.A,{activeKind:"web"}),(0,r.jsx)(f,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:b,onCreateCombo:()=>u("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(f,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:h,connections:s,combos:p,onCreateCombo:()=>u("webFetch")})]})}}},e=>{e.O(0,[2574,3862,782,8500,2280,1321,7592,5497,8441,3794,7358],()=>e(e.s=22637)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),i=t(12115),n=t(3534),l=t(28777),o=t(88105),r=t(37700);function d(){let[e,s]=(0,i.useState)([]),[t,d]=(0,i.useState)([]),[c,u]=(0,i.useState)({}),[h,p]=(0,i.useState)(!1),[w,f]=(0,i.useState)(null),[y,x]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{g(),v(),m(),S()},[]);let g=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},S=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();p(s.cloudEnabled||!1)}}catch{}},b=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-start 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:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(r.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:x}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,s])=>(0,a.jsx)(r.kn,{tool:s,isExpanded:w===e,onToggle:()=>f(w===e?null:e),serverRunning:y.running,dnsActive:y.dnsStatus?.[e]||!1,hasCachedPassword:y.hasCachedPassword||!1,needsSudoPassword:!1!==y.needsSudoPassword,isWin:!0===y.isWin,apiKeys:t,activeProviders:b(),hasActiveProviders:b().some(e=>(0,l.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:c,cloudEnabled:h,onDnsChange:e=>x(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},82831:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[2574,3862,1610,2562,5772,1321,705,5497,1655,8441,3794,7358],()=>e(e.s=82831)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),i=t(12115),n=t(3534),l=t(28777),o=t(88105),r=t(21402);function d(){let[e,s]=(0,i.useState)([]),[t,d]=(0,i.useState)([]),[c,u]=(0,i.useState)({}),[h,p]=(0,i.useState)(!1),[w,f]=(0,i.useState)(null),[y,x]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{g(),v(),m(),S()},[]);let g=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},S=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();p(s.cloudEnabled||!1)}}catch{}},b=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-start 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:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(r.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:x}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,s])=>(0,a.jsx)(r.kn,{tool:s,isExpanded:w===e,onToggle:()=>f(w===e?null:e),serverRunning:y.running,dnsActive:y.dnsStatus?.[e]||!1,hasCachedPassword:y.hasCachedPassword||!1,needsSudoPassword:!1!==y.needsSudoPassword,isWin:!0===y.isWin,apiKeys:t,activeProviders:b(),hasActiveProviders:b().some(e=>(0,l.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:c,cloudEnabled:h,onDnsChange:e=>x(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},82831:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[2574,3862,782,8500,2280,1321,7592,5497,2493,8441,3794,7358],()=>e(e.s=82831)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{14051:(e,o,n)=>{e.exports=n(34701)()},21172:(e,o,n)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"useMergedRef",{enumerable:!0,get:function(){return r}});let t=n(12115);function r(e,o){let n=(0,t.useRef)(null),r=(0,t.useRef)(null);return(0,t.useCallback)(t=>{if(null===t){let e=n.current;e&&(n.current=null,e());let o=r.current;o&&(r.current=null,o())}else e&&(n.current=s(e,t)),o&&(r.current=s(o,t))},[e,o])}function s(e,o){if("function"!=typeof e)return e.current=o,()=>{e.current=null};{let n=e(o);return"function"==typeof n?n:()=>e(null)}}("function"==typeof o.default||"object"==typeof o.default&&null!==o.default)&&void 0===o.default.__esModule&&(Object.defineProperty(o.default,"__esModule",{value:!0}),Object.assign(o.default,o),e.exports=o.default)},34701:(e,o,n)=>{"use strict";var t=n(82114);function r(){}function s(){}s.resetWarningCache=r,e.exports=function(){function e(e,o,n,r,s,l){if(l!==t){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:o,element:e,elementType:e,instanceOf:o,node:e,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:s,resetWarningCache:r};return n.PropTypes=n,n}},48420:(e,o,n)=>{Promise.resolve().then(n.bind(n,55084))},55084:(e,o,n)=>{"use strict";n.d(o,{default:()=>c});var t=n(95155),r=n(12115),s=n(98500),l=n.n(s),a=n(14051),i=n.n(a);let d={fallback:"fallback","round-robin":"round-robin",fusion:"fusion",auto:"auto"};function c({initialData:e}){let[o,n]=(0,r.useState)("127.0.0.1:20128"),[s,a]=(0,r.useState)(null),i=e?.providerCount??0,p=(e?.readyProviderCount??0)>0,f=e?.keyCount??0,m=e?.comboCount??0,x=e?.defaultCombo||null,g=e?.learningSummary||null,h=e?.quotas||[],b=!!x?.isAuto,y=x?.strategy||"fallback";(0,r.useEffect)(()=>{n(window.location.host||"127.0.0.1:20128")},[]),(0,r.useEffect)(()=>{let e=!1;return fetch("/api/usage/stats?period=24h").then(e=>e.json()).then(o=>{e||a(o)}).catch(()=>{}),()=>{e=!0}},[]);let v=`http://${o}/v1`,j=(0,r.useMemo)(()=>{let e=s?.totalRequests??s?.requests??0,o=s?.totalPromptTokens??0,n=s?.totalCompletionTokens??0,t=s?.totalCost??0;return[{label:"Requests \xb7 24h",value:u(e)},{label:"Tokens in",value:u(o)},{label:"Tokens out",value:u(n)},{label:"Est. cost",value:t?`$${Number(t).toFixed(2)}`:"$0.00"}]},[s]),E=(0,r.useMemo)(()=>x?b?[["Router",x.routerModel||"not configured"],["Worker pool",`${x.workerCount||0} workers`],["Objective",x.objective||"balanced"],["Exploration",x.exploration||"5%"]]:"fusion"===y?[["Panel",`${x.workerCount||0} models`],["Judge",x.judgeModel||"first model"],["Calls / request","N+1 (panel + judge)"],["Capacity switch",x.capacityAutoSwitch?"on":"off"]]:"round-robin"===y?[["Pool",`${x.workerCount||0} models`],["Rotation","spread load across models"],["Capacity switch",x.capacityAutoSwitch?"on":"off"],["On failure","try next in rotation"]]:[["Pool",`${x.workerCount||0} models`],["Order","try in listed order"],["Capacity switch",!1!==x.capacityAutoSwitch?"on":"off"],["On failure","next model"]]:[["Combos","none configured"],["Strategy","—"],["Models","—"],["Tip","Create a combo to group models"]],[x,b,y]);return(0,t.jsxs)("div",{className:"flex flex-col w-full",style:{gap:16,maxWidth:1120},children:[(0,t.jsxs)("div",{className:"flex flex-col",style:{gap:4},children:[(0,t.jsx)("span",{style:{fontSize:17,fontWeight:600,color:"#ECE4D2"},children:"Overview"}),(0,t.jsx)("span",{style:{fontSize:12,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:"everything routing through your endpoint, at a glance"})]}),0===i&&(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #E5B454",borderRadius:12,padding:18},children:[(0,t.jsx)("div",{style:{fontSize:14,fontWeight:600,color:"#E5B454",marginBottom:8},children:"Connect your first provider to get started"}),(0,t.jsx)("div",{style:{fontSize:12,color:"#8A7F66",marginBottom:12},children:"Add an API key for any provider to start routing requests through Switchboard."}),(0,t.jsx)(l(),{href:"/dashboard/providers",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",borderRadius:8,background:"#E5B454",color:"#1E1A13",fontSize:12,fontWeight:600,textDecoration:"none"},children:"Connect Provider"})]}),(0,t.jsxs)("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2",children:[(0,t.jsxs)("div",{className:"flex flex-col justify-between",style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:12},children:[(0,t.jsx)("span",{style:{fontSize:10.5,letterSpacing:"1.2px",color:"#8A7F66",textTransform:"uppercase",fontWeight:600},children:"Endpoint"}),(0,t.jsxs)("span",{className:"flex items-center gap-[7px]",style:{fontSize:11.5,color:p?"#74C08A":"#8A7F66",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[(0,t.jsx)("span",{className:"console-online-dot",style:p?void 0:{background:"#6F6653",boxShadow:"none"}}),p?"online":i>0?"providers unavailable":"no providers"]})]}),(0,t.jsx)("div",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:16,color:"#E5B454",marginBottom:4,wordBreak:"break-all"},children:v})]}),(0,t.jsxs)("div",{style:{fontSize:11.5,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",marginTop:14},children:[f," API key",1===f?"":"s"," \xb7 ",i," provider",1===i?"":"s"," connected"]})]}),(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:12},children:[(0,t.jsx)("span",{style:{fontSize:10.5,letterSpacing:"1.2px",color:"#8A7F66",textTransform:"uppercase",fontWeight:600},children:b?"Learning":"Combos"}),(0,t.jsx)("span",{style:{fontSize:10,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",padding:"2px 8px",borderRadius:999,textTransform:"uppercase",letterSpacing:"0.5px",background:"rgba(229,180,84,.15)",color:"#E5B454",border:"1px solid rgba(229,180,84,.4)"},children:b?g?.freezeLearning?"frozen":g?.version?`v${g.version}`:"no version yet":m?`${m} configured`:"none"})]}),(0,t.jsxs)("div",{className:"flex items-end gap-2.5",style:{marginBottom:3},children:[(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:32,fontWeight:600,lineHeight:1,color:"#ECE4D2"},children:b?g?.evalScore!=null?Number(g.evalScore).toFixed(0):"—":String(m)}),(0,t.jsx)("span",{style:{fontSize:11,color:b?"#74C08A":"#A99E86",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",paddingBottom:3},children:b?"eval score":"combos"})]}),(0,t.jsx)("div",{style:{fontSize:11,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",marginBottom:14},children:b?"Auto strategy \xb7 relearn from Combos → Insights":"Group models \xb7 fallback / round-robin / fusion / auto"}),(0,t.jsxs)("div",{className:"flex gap-2 items-center flex-wrap",children:[(0,t.jsx)(l(),{href:"/dashboard/combos",style:{display:"inline-flex",alignItems:"center",gap:7,background:"rgba(229,180,84,.15)",border:"1px solid rgba(229,180,84,.4)",borderRadius:7,padding:"7px 12px",fontSize:12,color:"#E5B454",fontFamily:"inherit"},children:m?"Manage combos":"Create combo"}),b&&x?.name&&(0,t.jsx)(l(),{href:`/dashboard/combos/routing?combo=${encodeURIComponent(x.name)}`,style:{display:"inline-flex",alignItems:"center",gap:7,background:"transparent",border:"1px solid #3A3221",borderRadius:7,padding:"7px 10px",fontSize:12,color:"#A99E86"},children:"Routing insights"})]})]})]}),(0,t.jsx)("div",{className:"grid gap-3 grid-cols-2 lg:grid-cols-4",children:j.map(e=>(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:11,padding:15},children:[(0,t.jsx)("div",{style:{fontSize:10,letterSpacing:"0.6px",color:"#6F6653",textTransform:"uppercase",marginBottom:8},children:e.label}),(0,t.jsx)("div",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:21,fontWeight:600,color:"#ECE4D2"},children:e.value})]},e.label))}),(0,t.jsxs)("div",{className:"grid gap-4 items-start grid-cols-1 md:grid-cols-2",children:[(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:14},children:[(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"#ECE4D2"},children:"Active routing"}),(0,t.jsx)(l(),{href:b&&x?.name?`/dashboard/combos/routing?combo=${encodeURIComponent(x.name)}`:"/dashboard/combos",style:{padding:"6px 12px",borderRadius:7,fontSize:11.5,border:"1px solid #3A3221",background:"transparent",color:"#A99E86"},children:b?"View insights":"Open combos"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2.5",style:{marginBottom:14},children:[(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:14,fontWeight:600,color:"#ECE4D2"},children:x?.name||"—"}),(0,t.jsx)("span",{style:{fontSize:10,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",padding:"2px 8px",borderRadius:999,textTransform:"uppercase",letterSpacing:"0.5px",background:"rgba(229,180,84,.15)",color:"#E5B454",border:"1px solid rgba(229,180,84,.4)"},children:d[y]||y||"fallback"})]}),(0,t.jsx)("div",{className:"flex flex-col",children:E.map(([e,o],n,r)=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",style:{padding:"9px 0",borderBottom:n<r.length-1?"1px solid #241F16":"none"},children:[(0,t.jsx)("span",{style:{fontSize:12,color:"#8A7F66"},children:e}),(0,t.jsx)("span",{className:"truncate text-right",style:{fontSize:12,color:"#A99E86",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",maxWidth:"60%"},title:String(o),children:o})]},e))})]}),(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:16},children:[(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"#ECE4D2"},children:"Quota"}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[h.length||i," accounts"]})]}),(0,t.jsx)("div",{className:"flex flex-col",style:{gap:13},children:(h.length?h:[{account:"No quota data yet",pct:0}]).slice(0,6).map(e=>{let o=Math.max(0,Math.min(100,Number(e.pct)||0)),n=o>=90?"#E07070":o>=70?"#E5B454":"#74C08A";return(0,t.jsxs)("div",{className:"flex flex-col",style:{gap:5},children:[(0,t.jsxs)("div",{className:"flex justify-between items-baseline gap-2",children:[(0,t.jsx)("span",{style:{fontSize:12,color:"#ECE4D2"},children:e.account}),(0,t.jsxs)("span",{style:{fontSize:11,color:n,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[o,"%"]})]}),(0,t.jsx)("div",{style:{height:5,borderRadius:3,background:"#241F16",overflow:"hidden"},children:(0,t.jsx)("div",{style:{height:"100%",width:`${o}%`,borderRadius:3,background:n}})})]},e.account)})}),(0,t.jsx)(l(),{href:"/dashboard/quota",className:"inline-block mt-4",style:{fontSize:11.5,color:"#A99E86"},children:"Open quota tracker →"})]})]})]})}function u(e){let o=Number(e)||0;return o>=1e6?`${(o/1e6).toFixed(1)}M`:o>=1e3?`${(o/1e3).toFixed(1)}k`:String(Math.round(o))}c.propTypes={initialData:i().object}},82114:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=48420)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{12151:(e,t,s)=>{"use strict";s.d(t,{default:()=>b});var a=s(95155),r=s(12115),o=s(35497),i=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202),u=s(65921);function b({initialData:e}){let{theme:t,setTheme:s,isDark:p}=(0,n.D)(),h=(0,u.i)(e=>e.error),[y,g]=(0,r.useState)("en"),[f,j]=(0,r.useState)(!1),[N,w]=(0,r.useState)(!1),[v,k]=(0,r.useState)(!1),[C,S]=(0,r.useState)(e?.settings||{fallbackStrategy:"fill-first"}),[P,T]=(0,r.useState)(!e?.settings),[R,O]=(0,r.useState)(!1),[E,L]=(0,r.useState)({type:"",message:""}),$=(0,r.useRef)(null),[U,A]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[F,H]=(0,r.useState)({type:"",message:""}),[J,_]=(0,r.useState)(!1),[D,M]=(0,r.useState)(!1);(0,r.useEffect)(()=>{g(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[f]),(0,r.useEffect)(()=>{let t=e?.settings||C;A({outboundProxyEnabled:t?.outboundProxyEnabled===!0,outboundProxyUrl:t?.outboundProxyUrl||"",outboundNoProxy:t?.outboundNoProxy||""}),T(!1)},[e]);let I=async e=>{if(e.preventDefault(),!0===C.outboundProxyEnabled){_(!0),H({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:U.outboundProxyUrl,outboundNoProxy:U.outboundNoProxy})}),t=await e.json();e.ok?(S(e=>({...e,...t})),H({type:"success",message:"Proxy settings applied"})):H({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{_(!1)}}},Z=async()=>{if(!0!==C.outboundProxyEnabled)return;let e=(U.outboundProxyUrl||"").trim();if(!e)return void H({type:"error",message:"Please enter a Proxy URL to test"});M(!0),H({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?H({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):H({type:"error",message:s?.error||"Proxy test failed"})}catch(e){H({type:"error",message:"An error occurred"})}finally{M(!1)}},q=async e=>{_(!0),H({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(S(e=>({...e,...s})),A(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),H({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):H({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{_(!1)}},z=async e=>{try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})});if(t.ok)S(t=>({...t,fallbackStrategy:e}));else throw Error(`HTTP ${t.status}`)}catch(e){h("Failed to update settings")}},B=async e=>{try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})});if(t.ok)S(t=>({...t,comboStrategy:e}));else throw Error(`HTTP ${t.status}`)}catch(e){h("Failed to update combo strategy")}},Q=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})});if(e.ok)S(e=>({...e,stickyRoundRobinLimit:t}));else throw Error(`HTTP ${e.status}`)}catch(e){h("Failed to update sticky limit")}},W=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})});if(e.ok)S(e=>({...e,comboStickyRoundRobinLimit:t}));else throw Error(`HTTP ${e.status}`)}catch(e){h("Failed to update combo sticky limit")}},K=async e=>{try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})});if(t.ok)S(t=>({...t,enableObservability:e}));else throw Error(`HTTP ${t.status}`)}catch(e){h("Failed to update observability setting")}},G=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();S(t)}catch(e){h("Failed to reload settings")}},V=async()=>{O(!0),L({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t,null,2),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),o=document.createElement("a"),i=new Date().toISOString().replace(/[.:]/g,"-");o.href=r,o.download=`switchboard-backup-${i}.json`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r),L({type:"success",message:"Database backup downloaded"})}catch(e){L({type:"error",message:e.message||"Failed to export database"})}finally{O(!1)}},X=async e=>{let t=e.target.files?.[0];if($.current&&($.current.value=""),t){O(!0),L({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await G(),L({type:"success",message:"Database imported successfully"})}catch(e){L({type:"error",message:e.message||"Invalid backup file"})}finally{O(!1)}}},Y=!0===C.enableObservability,ee=async()=>{k(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}k(!1),w(!1)};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.switchboard/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:()=>V(),loading:R,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>$.current?.click(),disabled:R,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:$,type:"file",accept:"application/json,.json",className:"hidden",onChange:X})]}),E.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===E.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:E.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>j(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[y]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===C.fallbackStrategy,onChange:()=>z("round-robin"===C.fallbackStrategy?"fill-first":"round-robin"),disabled:P})]}),"round-robin"===C.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:C.stickyRoundRobinLimit||3,onChange:e=>Q(e.target.value),disabled:P,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===C.comboStrategy,onChange:()=>B("round-robin"===C.comboStrategy?"fallback":"round-robin"),disabled:P})]}),"round-robin"===C.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:C.comboStickyRoundRobinLimit||1,onChange:e=>W(e.target.value),disabled:P,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===C.fallbackStrategy?`Currently distributing requests across all available accounts with ${C.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===C.comboStrategy?` Combos rotate after ${C.comboStickyRoundRobinLimit||1} call${1===(C.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===C.outboundProxyEnabled,onChange:()=>q(!0!==C.outboundProxyEnabled),disabled:P||J})]}),!0===C.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:I,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:U.outboundProxyUrl,onChange:e=>A(t=>({...t,outboundProxyUrl:e.target.value})),disabled:P||J}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:U.outboundNoProxy,onChange:e=>A(t=>({...t,outboundNoProxy:e.target.value})),disabled:P||J}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:D,disabled:P||J,onClick:Z,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:J,className:"w-full sm:w-auto",children:"Apply"})]})]}),F.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===F.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:F.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:Y,onChange:K,disabled:P})]})]}),(0,a.jsx)("div",{className:"flex flex-col sm:flex-row gap-2",children:(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>w(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"})}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:f,onClose:e=>{j(!1),g(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:N,onClose:()=>w(!1),onConfirm:ee,title:"Shutdown",message:"Are you sure you want to close the proxy server?",confirmText:"Shutdown",cancelText:"Cancel",variant:"danger",loading:v})]})}},34743:(e,t,s)=>{Promise.resolve().then(s.bind(s,12151))}},e=>{e.O(0,[2574,3862,782,8500,2280,1321,7592,5497,8441,3794,7358],()=>e(e.s=34743)),_N_E=e.O()}]);