zevairouter 1.0.177 → 1.0.178

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 (1045) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +11 -11
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +1 -1
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  64. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  65. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  66. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  67. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  68. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  69. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  70. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  71. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
  72. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  73. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  74. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +1 -1
  75. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  76. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  77. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  78. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  79. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  80. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  81. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  82. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  83. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  84. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  85. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  86. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  87. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  88. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  89. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  90. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  91. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  92. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  93. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  94. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  95. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  96. package/cli/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  97. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  98. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  99. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  100. package/cli/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  101. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  102. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  103. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  104. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  105. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  106. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  107. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -11
  116. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  127. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -10
  131. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  135. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  319. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  336. package/cli/app/.next-cli-build/server/app/callback/page.js +1 -1
  337. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  339. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  340. package/cli/app/.next-cli-build/server/app/callback.rsc +4 -4
  341. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  342. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  343. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  344. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  345. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  346. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  347. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  348. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +6 -6
  349. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  350. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  351. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  352. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  353. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +6 -6
  354. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  355. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +4 -4
  356. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +2 -2
  357. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  358. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  359. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  360. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  361. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  362. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  363. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  364. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  365. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  366. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  367. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  368. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  369. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  370. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  371. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  372. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  373. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  374. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  375. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  376. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  377. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  378. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  379. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  380. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  381. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  382. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  383. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  384. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  385. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  386. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  387. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  388. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +6 -6
  389. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  390. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  391. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  392. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  393. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +6 -6
  394. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  395. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +4 -4
  396. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +2 -2
  397. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  398. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  399. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  400. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  401. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  402. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  403. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  404. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  405. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  406. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  407. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  408. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  409. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  410. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  411. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  412. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  413. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  414. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  415. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  416. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  417. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  418. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  419. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  420. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  421. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  422. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  423. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  424. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  425. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  426. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  427. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  428. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  429. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +6 -6
  430. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  431. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
  432. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  433. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  434. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +6 -6
  435. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
  436. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +4 -4
  437. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +2 -2
  438. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  439. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  440. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  441. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  442. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  443. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  444. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  445. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  446. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  447. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  448. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  449. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  450. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  451. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  452. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  453. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  454. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  455. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  456. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  457. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  458. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  459. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  460. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  461. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  462. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  463. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  464. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  465. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  466. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  467. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  468. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  469. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  470. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  471. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  472. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  473. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  474. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  475. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  476. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  477. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  478. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  479. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  480. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  481. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  482. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  483. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  484. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  485. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  486. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  487. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  488. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  489. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  490. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  491. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  492. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  493. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  494. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  495. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  496. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  497. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  498. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  499. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  500. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  501. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  502. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
  503. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
  504. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  505. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  506. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  507. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  508. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  509. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  510. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  511. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  512. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  513. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  514. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  515. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  516. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  517. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  518. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  519. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  520. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  521. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  522. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  523. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  524. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  525. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  526. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  527. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  528. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  529. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  530. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  531. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  532. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  533. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  534. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  535. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  536. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  537. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  538. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  539. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  540. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  541. package/cli/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  542. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  543. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  544. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  545. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  546. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  547. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  548. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  549. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  550. package/cli/app/.next-cli-build/server/app/index.rsc +4 -4
  551. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  552. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  553. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  554. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  555. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  556. package/cli/app/.next-cli-build/server/app/landing/page.js +1 -1
  557. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  558. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  559. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  560. package/cli/app/.next-cli-build/server/app/landing.rsc +5 -5
  561. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  562. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  563. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  564. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  565. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  566. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  567. package/cli/app/.next-cli-build/server/app/login/page.js +1 -1
  568. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  569. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  570. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  571. package/cli/app/.next-cli-build/server/app/login.rsc +5 -5
  572. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  573. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  574. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  575. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  576. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  577. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  578. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  579. package/cli/app/.next-cli-build/server/app/page.js +1 -1
  580. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  581. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  582. package/cli/app/.next-cli-build/server/app-paths-manifest.json +11 -11
  583. package/cli/app/.next-cli-build/server/chunks/{4746.js → 1350.js} +2 -2
  584. package/cli/app/.next-cli-build/server/chunks/2607.js +56 -0
  585. package/cli/app/.next-cli-build/server/chunks/3155.js +1 -1
  586. package/cli/app/.next-cli-build/server/chunks/3294.js +25 -0
  587. package/cli/app/.next-cli-build/server/chunks/3949.js +5 -0
  588. package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
  589. package/cli/app/.next-cli-build/server/chunks/{5189.js → 492.js} +1 -1
  590. package/cli/app/.next-cli-build/server/chunks/5307.js +1 -1
  591. package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
  592. package/cli/app/.next-cli-build/server/chunks/9621.js +1 -1
  593. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  594. package/cli/app/.next-cli-build/server/middleware.js +4 -4
  595. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  596. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  597. package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  598. package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  599. package/cli/app/.next-cli-build/static/chunks/{9802-1969f16a588b05f6.js → 3339-821ef5f316467690.js} +21 -21
  600. package/cli/app/.next-cli-build/static/chunks/5497-a4f1f8e10718edc0.js +7 -0
  601. package/cli/app/.next-cli-build/static/chunks/{620-0b307b5a8eac2280.js → 620-aa5d878e9ca8eac1.js} +1 -1
  602. package/cli/app/.next-cli-build/static/chunks/6617-a18c27f06c68d9a4.js +56 -0
  603. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/automation/{page-2e93efdb14b0bc90.js → page-687df9da3374a978.js} +1 -1
  604. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-a2405202cf216637.js +1 -0
  605. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-da4bf4d40037f090.js → page-4e5ba3d1c19bf9d9.js} +1 -1
  606. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-19f56d717383fbf9.js → page-b67882cc21d5ac2e.js} +1 -1
  607. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-92aed83e0b2aba47.js → page-a24beb4d9b7bc1c2.js} +1 -1
  608. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-eb2a18df1f1f3808.js → page-4e586182021f2566.js} +1 -1
  609. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/context/{page-86fa4f45899539b7.js → page-416b37a764e54fe8.js} +1 -1
  610. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-d75cb5bca0d5adb6.js +1 -0
  611. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-d325f6821731336b.js → page-1ae6ca8eae912178.js} +9 -9
  612. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-5317928a78e74942.js → page-03b4d5addd474977.js} +1 -1
  613. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-4c46f9cac4765fc5.js → page-05d62a2714eab250.js} +2 -2
  614. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-72eb287b8ed78360.js → page-6a6d9f0fc6c0587d.js} +1 -1
  615. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-57c4b3a5e8b61f18.js → page-9216318a6a117917.js} +1 -1
  616. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-8be50eac3f33330e.js +1 -0
  617. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-adb7ff1c01c21dad.js +1 -0
  618. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-bdcc38dc8f8c5619.js → page-5da1ec372fe1cf6c.js} +1 -1
  619. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-5d5fa8b4319dc8cf.js +3 -0
  620. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-8692640e1920d5fd.js → page-84e5b58e1bc94fc3.js} +1 -1
  621. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-9d2250c9ecfdeb7a.js +1 -0
  622. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-16d3736170202fcd.js → page-d47ca6b0d90712af.js} +1 -1
  623. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-95719c850f15a0cd.js → page-cff6dfde522f1ce8.js} +1 -1
  624. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-3e2009fdd918191b.js → page-d60217faba1a8018.js} +1 -1
  625. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-8b89eccb0440a492.js → page-a38a472b80ea1338.js} +1 -1
  626. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-7027d915ac07c723.js → page-8689382f5a603a06.js} +1 -1
  627. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-6062386d726c38dd.js → page-46ad1923add78d75.js} +1 -1
  628. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-802447f7285fcf58.js → layout-a330cd3699af7d70.js} +1 -1
  629. package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-90952dd5eac36b17.js +1 -0
  630. package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-90952dd5eac36b17.js +1 -0
  631. package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-90952dd5eac36b17.js +1 -0
  632. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-90952dd5eac36b17.js +1 -0
  633. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-90952dd5eac36b17.js +1 -0
  634. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-90952dd5eac36b17.js +1 -0
  635. package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-90952dd5eac36b17.js +1 -0
  636. package/cli/app/.next-cli-build/static/chunks/app/api/cache/stats/route-90952dd5eac36b17.js +1 -0
  637. package/cli/app/.next-cli-build/static/chunks/app/api/changelog/route-90952dd5eac36b17.js +1 -0
  638. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-90952dd5eac36b17.js +1 -0
  639. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-90952dd5eac36b17.js +1 -0
  640. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-90952dd5eac36b17.js +1 -0
  641. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-90952dd5eac36b17.js +1 -0
  642. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-90952dd5eac36b17.js +1 -0
  643. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-90952dd5eac36b17.js +1 -0
  644. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-90952dd5eac36b17.js +1 -0
  645. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-90952dd5eac36b17.js +1 -0
  646. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-90952dd5eac36b17.js +1 -0
  647. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-90952dd5eac36b17.js +1 -0
  648. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-90952dd5eac36b17.js +1 -0
  649. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-90952dd5eac36b17.js +1 -0
  650. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-90952dd5eac36b17.js +1 -0
  651. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-90952dd5eac36b17.js +1 -0
  652. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-90952dd5eac36b17.js +1 -0
  653. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-90952dd5eac36b17.js +1 -0
  654. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-90952dd5eac36b17.js +1 -0
  655. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-90952dd5eac36b17.js +1 -0
  656. package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-90952dd5eac36b17.js +1 -0
  657. package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-90952dd5eac36b17.js +1 -0
  658. package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-90952dd5eac36b17.js +1 -0
  659. package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-90952dd5eac36b17.js +1 -0
  660. package/cli/app/.next-cli-build/static/chunks/app/api/context/route-90952dd5eac36b17.js +1 -0
  661. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/chat/completions/route-90952dd5eac36b17.js +1 -0
  662. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/cli-tools/keys/route-90952dd5eac36b17.js +1 -0
  663. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/media/[operation]/route-90952dd5eac36b17.js +1 -0
  664. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-90952dd5eac36b17.js +1 -0
  665. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-90952dd5eac36b17.js +1 -0
  666. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-90952dd5eac36b17.js +1 -0
  667. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/start/route-90952dd5eac36b17.js +1 -0
  668. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/status/route-90952dd5eac36b17.js +1 -0
  669. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-90952dd5eac36b17.js +1 -0
  670. package/cli/app/.next-cli-build/static/chunks/app/api/health/ready/route-90952dd5eac36b17.js +1 -0
  671. package/cli/app/.next-cli-build/static/chunks/app/api/health/route-90952dd5eac36b17.js +1 -0
  672. package/cli/app/.next-cli-build/static/chunks/app/api/init/route-90952dd5eac36b17.js +1 -0
  673. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-90952dd5eac36b17.js +1 -0
  674. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-90952dd5eac36b17.js +1 -0
  675. package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-90952dd5eac36b17.js +1 -0
  676. package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-90952dd5eac36b17.js +1 -0
  677. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-90952dd5eac36b17.js +1 -0
  678. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-90952dd5eac36b17.js +1 -0
  679. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-90952dd5eac36b17.js +1 -0
  680. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-90952dd5eac36b17.js +1 -0
  681. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-90952dd5eac36b17.js +1 -0
  682. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-90952dd5eac36b17.js +1 -0
  683. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-90952dd5eac36b17.js +1 -0
  684. package/cli/app/.next-cli-build/static/chunks/app/api/metrics/route-90952dd5eac36b17.js +1 -0
  685. package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-90952dd5eac36b17.js +1 -0
  686. package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-90952dd5eac36b17.js +1 -0
  687. package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-90952dd5eac36b17.js +1 -0
  688. package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-90952dd5eac36b17.js +1 -0
  689. package/cli/app/.next-cli-build/static/chunks/app/api/models/route-90952dd5eac36b17.js +1 -0
  690. package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-90952dd5eac36b17.js +1 -0
  691. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-90952dd5eac36b17.js +1 -0
  692. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-90952dd5eac36b17.js +1 -0
  693. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-90952dd5eac36b17.js +1 -0
  694. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-90952dd5eac36b17.js +1 -0
  695. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-90952dd5eac36b17.js +1 -0
  696. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-90952dd5eac36b17.js +1 -0
  697. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route-90952dd5eac36b17.js +1 -0
  698. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route-90952dd5eac36b17.js +1 -0
  699. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route-90952dd5eac36b17.js +1 -0
  700. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/latest/route-90952dd5eac36b17.js +1 -0
  701. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/route-90952dd5eac36b17.js +1 -0
  702. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-90952dd5eac36b17.js +1 -0
  703. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-90952dd5eac36b17.js +1 -0
  704. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-90952dd5eac36b17.js +1 -0
  705. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-90952dd5eac36b17.js +1 -0
  706. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-90952dd5eac36b17.js +1 -0
  707. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-90952dd5eac36b17.js +1 -0
  708. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-90952dd5eac36b17.js +1 -0
  709. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route-90952dd5eac36b17.js +1 -0
  710. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route-90952dd5eac36b17.js +1 -0
  711. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route-90952dd5eac36b17.js +1 -0
  712. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/latest/route-90952dd5eac36b17.js +1 -0
  713. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-90952dd5eac36b17.js +1 -0
  714. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-token/route-90952dd5eac36b17.js +1 -0
  715. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/quota-cookie/route-90952dd5eac36b17.js +1 -0
  716. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-90952dd5eac36b17.js +1 -0
  717. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-90952dd5eac36b17.js +1 -0
  718. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-90952dd5eac36b17.js +1 -0
  719. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-90952dd5eac36b17.js +1 -0
  720. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-90952dd5eac36b17.js +1 -0
  721. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-90952dd5eac36b17.js +1 -0
  722. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-90952dd5eac36b17.js +1 -0
  723. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-90952dd5eac36b17.js +1 -0
  724. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-90952dd5eac36b17.js +1 -0
  725. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-90952dd5eac36b17.js +1 -0
  726. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-90952dd5eac36b17.js +1 -0
  727. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-90952dd5eac36b17.js +1 -0
  728. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-90952dd5eac36b17.js +1 -0
  729. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-90952dd5eac36b17.js +1 -0
  730. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-90952dd5eac36b17.js +1 -0
  731. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-90952dd5eac36b17.js +1 -0
  732. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-90952dd5eac36b17.js +1 -0
  733. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-90952dd5eac36b17.js +1 -0
  734. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-90952dd5eac36b17.js +1 -0
  735. package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-90952dd5eac36b17.js +1 -0
  736. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-90952dd5eac36b17.js +1 -0
  737. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-847859b983aaa314.js +1 -0
  738. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-90952dd5eac36b17.js +1 -0
  739. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-90952dd5eac36b17.js +1 -0
  740. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-90952dd5eac36b17.js +1 -0
  741. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-90952dd5eac36b17.js +1 -0
  742. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-90952dd5eac36b17.js +1 -0
  743. package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-90952dd5eac36b17.js +1 -0
  744. package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-90952dd5eac36b17.js +1 -0
  745. package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-90952dd5eac36b17.js +1 -0
  746. package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-90952dd5eac36b17.js +1 -0
  747. package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-90952dd5eac36b17.js +1 -0
  748. package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-90952dd5eac36b17.js +1 -0
  749. package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-90952dd5eac36b17.js +1 -0
  750. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-90952dd5eac36b17.js +1 -0
  751. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-90952dd5eac36b17.js +1 -0
  752. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-90952dd5eac36b17.js +1 -0
  753. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-90952dd5eac36b17.js +1 -0
  754. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-90952dd5eac36b17.js +1 -0
  755. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-90952dd5eac36b17.js +1 -0
  756. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-90952dd5eac36b17.js +1 -0
  757. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-90952dd5eac36b17.js +1 -0
  758. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-90952dd5eac36b17.js +1 -0
  759. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-90952dd5eac36b17.js +1 -0
  760. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-90952dd5eac36b17.js +1 -0
  761. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-90952dd5eac36b17.js +1 -0
  762. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-90952dd5eac36b17.js +1 -0
  763. package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-90952dd5eac36b17.js +1 -0
  764. package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-90952dd5eac36b17.js +1 -0
  765. package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-90952dd5eac36b17.js +1 -0
  766. package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-90952dd5eac36b17.js +1 -0
  767. package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-90952dd5eac36b17.js +1 -0
  768. package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-90952dd5eac36b17.js +1 -0
  769. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/setup/route-90952dd5eac36b17.js +1 -0
  770. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/status/route-90952dd5eac36b17.js +1 -0
  771. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/unlock/route-90952dd5eac36b17.js +1 -0
  772. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/input/route-90952dd5eac36b17.js +1 -0
  773. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/resize/route-90952dd5eac36b17.js +1 -0
  774. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/route-90952dd5eac36b17.js +1 -0
  775. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/stream/route-90952dd5eac36b17.js +1 -0
  776. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/route-90952dd5eac36b17.js +1 -0
  777. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-90952dd5eac36b17.js +1 -0
  778. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-90952dd5eac36b17.js +1 -0
  779. package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-90952dd5eac36b17.js +1 -0
  780. package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-90952dd5eac36b17.js +1 -0
  781. package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-90952dd5eac36b17.js +1 -0
  782. package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-90952dd5eac36b17.js +1 -0
  783. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-90952dd5eac36b17.js +1 -0
  784. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-90952dd5eac36b17.js +1 -0
  785. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-90952dd5eac36b17.js +1 -0
  786. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-90952dd5eac36b17.js +1 -0
  787. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-90952dd5eac36b17.js +1 -0
  788. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-90952dd5eac36b17.js +1 -0
  789. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-90952dd5eac36b17.js +1 -0
  790. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-90952dd5eac36b17.js +1 -0
  791. package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-90952dd5eac36b17.js +1 -0
  792. package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-90952dd5eac36b17.js +1 -0
  793. package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-90952dd5eac36b17.js +1 -0
  794. package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-90952dd5eac36b17.js +1 -0
  795. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-90952dd5eac36b17.js +1 -0
  796. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-90952dd5eac36b17.js +1 -0
  797. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-90952dd5eac36b17.js +1 -0
  798. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-90952dd5eac36b17.js +1 -0
  799. package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-90952dd5eac36b17.js +1 -0
  800. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-90952dd5eac36b17.js +1 -0
  801. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-90952dd5eac36b17.js +1 -0
  802. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-90952dd5eac36b17.js +1 -0
  803. package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-90952dd5eac36b17.js +1 -0
  804. package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-90952dd5eac36b17.js +1 -0
  805. package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-90952dd5eac36b17.js +1 -0
  806. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-90952dd5eac36b17.js +1 -0
  807. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-90952dd5eac36b17.js +1 -0
  808. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-90952dd5eac36b17.js +1 -0
  809. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-90952dd5eac36b17.js +1 -0
  810. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-90952dd5eac36b17.js +1 -0
  811. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-90952dd5eac36b17.js +1 -0
  812. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-90952dd5eac36b17.js +1 -0
  813. package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-90952dd5eac36b17.js +1 -0
  814. package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-90952dd5eac36b17.js +1 -0
  815. package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-90952dd5eac36b17.js +1 -0
  816. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-90952dd5eac36b17.js +1 -0
  817. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-90952dd5eac36b17.js +1 -0
  818. package/cli/app/.next-cli-build/static/chunks/app/api/version/route-90952dd5eac36b17.js +1 -0
  819. package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-90952dd5eac36b17.js +1 -0
  820. package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-90952dd5eac36b17.js +1 -0
  821. package/cli/app/.next-cli-build/static/chunks/app/login/{page-e117fe524fd03da3.js → page-a72f657f33cdaa8f.js} +1 -1
  822. package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-90952dd5eac36b17.js +1 -0
  823. package/cli/app/.next-cli-build/static/chunks/app/page-90952dd5eac36b17.js +1 -0
  824. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-90952dd5eac36b17.js +1 -0
  825. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-90952dd5eac36b17.js +1 -0
  826. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-90952dd5eac36b17.js +1 -0
  827. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-90952dd5eac36b17.js +1 -0
  828. package/cli/app/.next-cli-build/static/css/46b47c65b0eb8d0a.css +1 -0
  829. package/cli/app/CHANGELOG.md +6 -0
  830. package/cli/app/package.json +3 -2
  831. package/cli/package.json +1 -1
  832. package/cli/src/cli/menus/cliTools.js +148 -34
  833. package/package.json +3 -2
  834. package/cli/app/.next-cli-build/server/chunks/1656.js +0 -1
  835. package/cli/app/.next-cli-build/server/chunks/2722.js +0 -54
  836. package/cli/app/.next-cli-build/static/chunks/1992-b492aa3235a8c259.js +0 -1
  837. package/cli/app/.next-cli-build/static/chunks/5497-bb3d6d69dfd94240.js +0 -7
  838. package/cli/app/.next-cli-build/static/chunks/6069-f1984b72c3cef6a9.js +0 -54
  839. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-b9e61d29da8941f7.js +0 -1
  840. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-9762b5d12b9faca6.js +0 -1
  841. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-93b75c738ae813fe.js +0 -1
  842. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-35b97573fd86a9fb.js +0 -1
  843. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-469b30236e3a6d19.js +0 -3
  844. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-2468e6ba8d1efeec.js +0 -1
  845. package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-f29633932d5ddd5a.js +0 -1
  846. package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-f29633932d5ddd5a.js +0 -1
  847. package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f29633932d5ddd5a.js +0 -1
  848. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f29633932d5ddd5a.js +0 -1
  849. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f29633932d5ddd5a.js +0 -1
  850. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f29633932d5ddd5a.js +0 -1
  851. package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-f29633932d5ddd5a.js +0 -1
  852. package/cli/app/.next-cli-build/static/chunks/app/api/cache/stats/route-f29633932d5ddd5a.js +0 -1
  853. package/cli/app/.next-cli-build/static/chunks/app/api/changelog/route-f29633932d5ddd5a.js +0 -1
  854. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f29633932d5ddd5a.js +0 -1
  855. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f29633932d5ddd5a.js +0 -1
  856. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f29633932d5ddd5a.js +0 -1
  857. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f29633932d5ddd5a.js +0 -1
  858. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f29633932d5ddd5a.js +0 -1
  859. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-f29633932d5ddd5a.js +0 -1
  860. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f29633932d5ddd5a.js +0 -1
  861. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f29633932d5ddd5a.js +0 -1
  862. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f29633932d5ddd5a.js +0 -1
  863. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f29633932d5ddd5a.js +0 -1
  864. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f29633932d5ddd5a.js +0 -1
  865. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f29633932d5ddd5a.js +0 -1
  866. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f29633932d5ddd5a.js +0 -1
  867. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f29633932d5ddd5a.js +0 -1
  868. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f29633932d5ddd5a.js +0 -1
  869. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f29633932d5ddd5a.js +0 -1
  870. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f29633932d5ddd5a.js +0 -1
  871. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f29633932d5ddd5a.js +0 -1
  872. package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f29633932d5ddd5a.js +0 -1
  873. package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-f29633932d5ddd5a.js +0 -1
  874. package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-f29633932d5ddd5a.js +0 -1
  875. package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-f29633932d5ddd5a.js +0 -1
  876. package/cli/app/.next-cli-build/static/chunks/app/api/context/route-f29633932d5ddd5a.js +0 -1
  877. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/chat/completions/route-f29633932d5ddd5a.js +0 -1
  878. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/cli-tools/keys/route-f29633932d5ddd5a.js +0 -1
  879. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/media/[operation]/route-f29633932d5ddd5a.js +0 -1
  880. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-f29633932d5ddd5a.js +0 -1
  881. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-f29633932d5ddd5a.js +0 -1
  882. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-f29633932d5ddd5a.js +0 -1
  883. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/start/route-f29633932d5ddd5a.js +0 -1
  884. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/status/route-f29633932d5ddd5a.js +0 -1
  885. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-f29633932d5ddd5a.js +0 -1
  886. package/cli/app/.next-cli-build/static/chunks/app/api/health/ready/route-f29633932d5ddd5a.js +0 -1
  887. package/cli/app/.next-cli-build/static/chunks/app/api/health/route-f29633932d5ddd5a.js +0 -1
  888. package/cli/app/.next-cli-build/static/chunks/app/api/init/route-f29633932d5ddd5a.js +0 -1
  889. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-f29633932d5ddd5a.js +0 -1
  890. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f29633932d5ddd5a.js +0 -1
  891. package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-f29633932d5ddd5a.js +0 -1
  892. package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-f29633932d5ddd5a.js +0 -1
  893. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f29633932d5ddd5a.js +0 -1
  894. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f29633932d5ddd5a.js +0 -1
  895. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f29633932d5ddd5a.js +0 -1
  896. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f29633932d5ddd5a.js +0 -1
  897. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f29633932d5ddd5a.js +0 -1
  898. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f29633932d5ddd5a.js +0 -1
  899. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f29633932d5ddd5a.js +0 -1
  900. package/cli/app/.next-cli-build/static/chunks/app/api/metrics/route-f29633932d5ddd5a.js +0 -1
  901. package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-f29633932d5ddd5a.js +0 -1
  902. package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-f29633932d5ddd5a.js +0 -1
  903. package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-f29633932d5ddd5a.js +0 -1
  904. package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f29633932d5ddd5a.js +0 -1
  905. package/cli/app/.next-cli-build/static/chunks/app/api/models/route-f29633932d5ddd5a.js +0 -1
  906. package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-f29633932d5ddd5a.js +0 -1
  907. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f29633932d5ddd5a.js +0 -1
  908. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +0 -1
  909. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +0 -1
  910. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-f29633932d5ddd5a.js +0 -1
  911. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-f29633932d5ddd5a.js +0 -1
  912. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-f29633932d5ddd5a.js +0 -1
  913. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +0 -1
  914. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +0 -1
  915. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route-f29633932d5ddd5a.js +0 -1
  916. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/latest/route-f29633932d5ddd5a.js +0 -1
  917. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/route-f29633932d5ddd5a.js +0 -1
  918. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +0 -1
  919. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +0 -1
  920. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-f29633932d5ddd5a.js +0 -1
  921. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-f29633932d5ddd5a.js +0 -1
  922. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-f29633932d5ddd5a.js +0 -1
  923. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-f29633932d5ddd5a.js +0 -1
  924. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-f29633932d5ddd5a.js +0 -1
  925. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +0 -1
  926. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +0 -1
  927. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route-f29633932d5ddd5a.js +0 -1
  928. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/latest/route-f29633932d5ddd5a.js +0 -1
  929. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-f29633932d5ddd5a.js +0 -1
  930. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-token/route-f29633932d5ddd5a.js +0 -1
  931. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/quota-cookie/route-f29633932d5ddd5a.js +0 -1
  932. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f29633932d5ddd5a.js +0 -1
  933. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f29633932d5ddd5a.js +0 -1
  934. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f29633932d5ddd5a.js +0 -1
  935. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f29633932d5ddd5a.js +0 -1
  936. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f29633932d5ddd5a.js +0 -1
  937. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f29633932d5ddd5a.js +0 -1
  938. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +0 -1
  939. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +0 -1
  940. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-f29633932d5ddd5a.js +0 -1
  941. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-f29633932d5ddd5a.js +0 -1
  942. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-f29633932d5ddd5a.js +0 -1
  943. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f29633932d5ddd5a.js +0 -1
  944. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f29633932d5ddd5a.js +0 -1
  945. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f29633932d5ddd5a.js +0 -1
  946. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +0 -1
  947. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +0 -1
  948. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-f29633932d5ddd5a.js +0 -1
  949. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-f29633932d5ddd5a.js +0 -1
  950. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-f29633932d5ddd5a.js +0 -1
  951. package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-f29633932d5ddd5a.js +0 -1
  952. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f29633932d5ddd5a.js +0 -1
  953. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f29633932d5ddd5a.js +0 -1
  954. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f29633932d5ddd5a.js +0 -1
  955. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f29633932d5ddd5a.js +0 -1
  956. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f29633932d5ddd5a.js +0 -1
  957. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f29633932d5ddd5a.js +0 -1
  958. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f29633932d5ddd5a.js +0 -1
  959. package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-f29633932d5ddd5a.js +0 -1
  960. package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-f29633932d5ddd5a.js +0 -1
  961. package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f29633932d5ddd5a.js +0 -1
  962. package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-f29633932d5ddd5a.js +0 -1
  963. package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f29633932d5ddd5a.js +0 -1
  964. package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f29633932d5ddd5a.js +0 -1
  965. package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f29633932d5ddd5a.js +0 -1
  966. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f29633932d5ddd5a.js +0 -1
  967. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f29633932d5ddd5a.js +0 -1
  968. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f29633932d5ddd5a.js +0 -1
  969. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f29633932d5ddd5a.js +0 -1
  970. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f29633932d5ddd5a.js +0 -1
  971. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f29633932d5ddd5a.js +0 -1
  972. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-f29633932d5ddd5a.js +0 -1
  973. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-f29633932d5ddd5a.js +0 -1
  974. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-f29633932d5ddd5a.js +0 -1
  975. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-f29633932d5ddd5a.js +0 -1
  976. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-f29633932d5ddd5a.js +0 -1
  977. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-f29633932d5ddd5a.js +0 -1
  978. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-f29633932d5ddd5a.js +0 -1
  979. package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-f29633932d5ddd5a.js +0 -1
  980. package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f29633932d5ddd5a.js +0 -1
  981. package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f29633932d5ddd5a.js +0 -1
  982. package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-f29633932d5ddd5a.js +0 -1
  983. package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-f29633932d5ddd5a.js +0 -1
  984. package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-f29633932d5ddd5a.js +0 -1
  985. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/setup/route-f29633932d5ddd5a.js +0 -1
  986. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/status/route-f29633932d5ddd5a.js +0 -1
  987. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/unlock/route-f29633932d5ddd5a.js +0 -1
  988. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/input/route-f29633932d5ddd5a.js +0 -1
  989. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/resize/route-f29633932d5ddd5a.js +0 -1
  990. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/route-f29633932d5ddd5a.js +0 -1
  991. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/stream/route-f29633932d5ddd5a.js +0 -1
  992. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/route-f29633932d5ddd5a.js +0 -1
  993. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f29633932d5ddd5a.js +0 -1
  994. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f29633932d5ddd5a.js +0 -1
  995. package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-f29633932d5ddd5a.js +0 -1
  996. package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-f29633932d5ddd5a.js +0 -1
  997. package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-f29633932d5ddd5a.js +0 -1
  998. package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f29633932d5ddd5a.js +0 -1
  999. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f29633932d5ddd5a.js +0 -1
  1000. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f29633932d5ddd5a.js +0 -1
  1001. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f29633932d5ddd5a.js +0 -1
  1002. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f29633932d5ddd5a.js +0 -1
  1003. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f29633932d5ddd5a.js +0 -1
  1004. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f29633932d5ddd5a.js +0 -1
  1005. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f29633932d5ddd5a.js +0 -1
  1006. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f29633932d5ddd5a.js +0 -1
  1007. package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-f29633932d5ddd5a.js +0 -1
  1008. package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f29633932d5ddd5a.js +0 -1
  1009. package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-f29633932d5ddd5a.js +0 -1
  1010. package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f29633932d5ddd5a.js +0 -1
  1011. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f29633932d5ddd5a.js +0 -1
  1012. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f29633932d5ddd5a.js +0 -1
  1013. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f29633932d5ddd5a.js +0 -1
  1014. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f29633932d5ddd5a.js +0 -1
  1015. package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f29633932d5ddd5a.js +0 -1
  1016. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f29633932d5ddd5a.js +0 -1
  1017. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f29633932d5ddd5a.js +0 -1
  1018. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f29633932d5ddd5a.js +0 -1
  1019. package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f29633932d5ddd5a.js +0 -1
  1020. package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f29633932d5ddd5a.js +0 -1
  1021. package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f29633932d5ddd5a.js +0 -1
  1022. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f29633932d5ddd5a.js +0 -1
  1023. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f29633932d5ddd5a.js +0 -1
  1024. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f29633932d5ddd5a.js +0 -1
  1025. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f29633932d5ddd5a.js +0 -1
  1026. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-f29633932d5ddd5a.js +0 -1
  1027. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f29633932d5ddd5a.js +0 -1
  1028. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f29633932d5ddd5a.js +0 -1
  1029. package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-f29633932d5ddd5a.js +0 -1
  1030. package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-f29633932d5ddd5a.js +0 -1
  1031. package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f29633932d5ddd5a.js +0 -1
  1032. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f29633932d5ddd5a.js +0 -1
  1033. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f29633932d5ddd5a.js +0 -1
  1034. package/cli/app/.next-cli-build/static/chunks/app/api/version/route-f29633932d5ddd5a.js +0 -1
  1035. package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f29633932d5ddd5a.js +0 -1
  1036. package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-f29633932d5ddd5a.js +0 -1
  1037. package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f29633932d5ddd5a.js +0 -1
  1038. package/cli/app/.next-cli-build/static/chunks/app/page-f29633932d5ddd5a.js +0 -1
  1039. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f29633932d5ddd5a.js +0 -1
  1040. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f29633932d5ddd5a.js +0 -1
  1041. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f29633932d5ddd5a.js +0 -1
  1042. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f29633932d5ddd5a.js +0 -1
  1043. package/cli/app/.next-cli-build/static/css/da517aac33d5e0e3.css +0 -1
  1044. /package/cli/app/.next-cli-build/static/{HsIIn09pDAIpZIohaWSMR → 2GcXDLDxuvj6CKV-GA0Ft}/_buildManifest.js +0 -0
  1045. /package/cli/app/.next-cli-build/static/{HsIIn09pDAIpZIohaWSMR → 2GcXDLDxuvj6CKV-GA0Ft}/_ssgManifest.js +0 -0
@@ -1,9 +1,9 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{54909:(e,t,s)=>{Promise.resolve().then(s.bind(s,94588))},62199:(e,t,s)=>{"use strict";s.d(t,{O:()=>r});let a=Object.freeze({"/v1/embeddings":"embeddings","/v1/images/generations":"images","/v1/audio/speech":"speech","/v1/audio/transcriptions":"transcriptions","/v1/search":"search","/v1/web/fetch":"fetch"});function r(e){if("string"!=typeof e)return null;let t=e.indexOf("?"),s=-1===t?e:e.slice(0,t),r=-1===t?"":e.slice(t),o=a[s];return o?`/api/dashboard/media/${o}${r}`:null}},70217:(e,t,s)=>{"use strict";s.d(t,{BU:()=>u,G9:()=>n,d4:()=>d,gJ:()=>a,i2:()=>c});let a=[{id:"all",label:"All"},{id:"active",label:"Active",keys:["active"]},{id:"errors",label:"Errors",keys:["connection_error","auth_error","quota_exhausted","rate_limited","banned","cooldown","unknown"]},{id:"connection",label:"Connection",keys:["connection_error"]},{id:"auth",label:"Auth",keys:["auth_error"]},{id:"limit",label:"Limit",keys:["rate_limited","cooldown"]},{id:"exhausted",label:"Exhausted",keys:["quota_exhausted"]},{id:"banned",label:"Banned",keys:["banned"]},{id:"disabled",label:"Disabled",keys:["disabled"]}],r={active:{label:"active",severity:"success",terminal:!1},disabled:{label:"disabled",severity:"default",terminal:!1},connection_error:{label:"connection error",severity:"error",terminal:!1},auth_error:{label:"auth error",severity:"error",terminal:!0},quota_exhausted:{label:"exhausted",severity:"error",terminal:!0},rate_limited:{label:"rate limited",severity:"warning",terminal:!1},banned:{label:"banned",severity:"error",terminal:!0},cooldown:{label:"cooldown",severity:"warning",terminal:!1},unknown:{label:"unknown",severity:"default",terminal:!1}},o={policy_suspended:"banned",credential_rejected:"auth_error",reauth_required:"auth_error",authentication:"auth_error",entitlement_or_quota:"quota_exhausted",rate_limited:"rate_limited",permission_denied:"auth_error",upstream_transient:"connection_error"};function l(e){if(!e)return"";if("string"==typeof e)return e.toLowerCase();try{return JSON.stringify(e).toLowerCase()}catch{return String(e).toLowerCase()}}function n(e={},t=Date.now()){let s=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>new Date(e).getTime()).filter(e=>Number.isFinite(e)&&e>t);return s.length>0?new Date(Math.min(...s)).toISOString():null}function i(e,t=""){let s=r[e]||r.unknown;return{key:e,...s,reason:t}}function d(e={}){var t;let s=(t=e).quarantinedAt?i(o[l(t.failureClass)]||"unknown",t.quarantineReason||t.lastError||"Connection is quarantined"):null;if(s)return s;if(!1===e.isActive)return i("disabled","Connection is disabled");if(function(e={}){return null!==n(e)}(e))return i("cooldown","Model cooldown is active");if(function(e){if(!e)return!1;let t=new Date(e).getTime();return Number.isFinite(t)&&t>Date.now()}(e.rateLimitedUntil))return i("rate_limited","Rate limit cooldown is active");let a=l(e.testStatus||e.status),r=l(e.lastErrorType||e.errorType),c=l(e.errorCode||e.statusCode),u=l(e.lastError||e.error),m=`${a} ${r} ${c} ${u}`.trim();return!m||["active","success","ok"].includes(a)?i("active",""):m.includes("ban")||m.includes("suspend")||m.includes("restricted")?i("banned",e.lastError||"Account appears restricted"):m.includes("exhaust")||m.includes("quota exceeded")||m.includes("insufficient_quota")||m.includes("payment required")||"402"===c?i("quota_exhausted",e.lastError||"Quota exhausted"):r.includes("rate_limited")||m.includes("rate limit")||m.includes("too many requests")||"429"===c?i("rate_limited",e.lastError||"Rate limited"):r.includes("auth")||r.includes("token")||m.includes("unauthorized")||m.includes("invalid api key")||m.includes("token invalid")||m.includes("token expired")||m.includes("revoked")||"401"===c||"403"===c?i("auth_error",e.lastError||"Authentication failed"):r.includes("network")||m.includes("network")||m.includes("timeout")||m.includes("fetch failed")||m.includes("econn")||m.includes("dns")||m.includes("proxy")?i("connection_error",e.lastError||"Connection failed"):["error","expired","unavailable","failed"].includes(a)?i("connection_error",e.lastError||e.testStatus||"Connection failed"):i("unknown",e.lastError||e.testStatus||"")}function c(e,t){if(!t||"all"===t)return!0;let s=a.find(e=>e.id===t);return!s||s.keys.includes(d(e).key)}function u(e){return e?.severity==="success"?"success":e?.severity==="error"?"error":"default"}},81277:(e,t,s)=>{"use strict";s.d(t,{c:()=>o});var a=s(12115),r=s(70217);function o(e={}){let[t,s]=(0,a.useState)(null),l=JSON.stringify(Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).sort(([e],[t])=>e.localeCompare(t)));return(0,a.useEffect)(()=>(function(e,t,s={}){let a=s.now||Date.now,o=s.setTimer||globalThis.setTimeout,l=s.clearTimer||globalThis.clearTimeout,n=!1,i=null,d=()=>{if(i=null,n)return;let s=a(),l=(0,r.G9)(e,s);t(l),l&&(i=o(d,Math.min(Math.max(1,new Date(l).getTime()-s+1),0x7fffffff)))};return i=o(d,0),()=>{n=!0,null!==i&&l(i),i=null}})(Object.fromEntries(JSON.parse(l)),s),[l]),t}},94588:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>L});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(52679),u=s(28777),m=s(11059),p=s(14051),x=s.n(p),h=s(81277);function b({until:e}){let[t,s]=(0,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 f({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:o,onMoveUp:l,onMoveDown:d,onToggleActive:c,onUpdateProxy:u,onEdit:m,onDelete:p}){let[x,g]=(0,n.useState)(!1),[y,v]=(0,n.useState)(!1),j=(0,n.useRef)(null),w=new Map((t||[]).map(e=>[e.id,e])),N=e.providerSpecificData?.proxyPoolId||null,k=N?w.get(N):null,C=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,S=!!N||C,$=k?`Pool: ${k.name}`:N?`Pool: ${N} (inactive/missing)`:C?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",_="",E=k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(E)try{let e=new URL(E);_=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{_=E}let T=k?.noProxy||e.providerSpecificData?.connectionNoProxy||"",O=k?.isActive===!0?"success":N||C?"error":"default",P=(0,h.c)(e),A=null!==P;(0,n.useEffect)(()=>{if(!x)return;let e=e=>{j.current&&!j.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[x]);let I="unavailable"!==e.testStatus||A?e.testStatus:"active",R=s?e.name||e.email||e.displayName||"OAuth Account":e.name,M=async e=>{v(!0);try{await u("__none__"===e?null:e)}finally{v(!1),g(!1)}};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: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_up"})}),(0,a.jsx)("button",{onClick:d,disabled:o,className:`p-0.5 rounded ${o?"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:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:R}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:!1===e.isActive?"default":"active"===I||"success"===I?"success":"error"===I||"expired"===I||"unavailable"===I?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":I||"Unknown"}),S&&(0,a.jsx)(i.Ex,{variant:O,size:"sm",children:"Proxy"}),A&&!1!==e.isActive&&(0,a.jsx)(b,{until:P}),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]})]}),S&&(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:$,children:$}),_&&(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:_}),T&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:T,children:["no_proxy: ",T]})]})]})]}),(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:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:j,children:[(0,a.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${S?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),x&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,a.jsx)("button",{onClick:()=>M("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!N?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>M(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${N===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center 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:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function g({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:o,onClose:l}){let d="__none__",[c,u]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[m,p]=(0,n.useState)(!1),[x,h]=(0,n.useState)(null),[b,f]=(0,n.useState)(!1),y=async()=>{p(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),s=await e.json();h(s.valid?"success":"failed")}catch{h("failed")}finally{p(!1)}},v=async()=>{if(t&&c.apiKey){f(!0);try{let e=!1;try{p(!0),h(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await s.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{p(!1)}await o({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{f(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:l,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:c.name,onChange:e=>u({...c,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",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.apiKey,onChange:e=>u({...c,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||m||b,variant:"secondary",children:m?"Checking...":"Check"})})]}),x&&(0,a.jsx)(i.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"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",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.priority,onChange:e=>u({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,a.jsx)(i.l6,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>u({...c,proxyPoolId:e.target.value}),options:[{value:d,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!c.name||!c.apiKey||b,children:b?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function y({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[o,l]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[u,m]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),[h,b]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),[k,C]=(0,n.useState)(null),S=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),o=await t.json(),n=await s.json(),i=a.ok?await a.json():{};t.ok&&r((o.connections||[]).filter(t=>t.provider===e)),s.ok&&l(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};j(d.fallbackStrategy||null),N(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1")}catch(e){console.log("ConnectionsCard fetch error:",e)}finally{c(!1)}},[e]);(0,n.useEffect)(()=>{S()},[S]);let $=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?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,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("saveStrategy error:",e)}},_=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e+1})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t+1})})])}catch{await S()}},E=async e=>{C({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{C(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(t=>t.filter(t=>t.id!==e))}catch(e){console.log("delete error:",e)}}})},T=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("toggle error:",e)}},O=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("proxy error:",e)}},P=async t=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})})).ok&&(await S(),m(!1))}catch(e){console.log("save apikey error:",e)}},A=async e=>{try{(await fetch(`/api/providers/${h.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await S(),x(!1))}catch(e){console.log("update connection error:",e)}};return d?(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"===v,onChange:e=>{let t=e?"round-robin":null;j(t),e&&!w&&N("1"),$(t,e?w||"1":w)}}),"round-robin"===v&&(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:w,onChange:e=>{N(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:()=>m(!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)(f,{connection:e,proxyPools:o,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>_(r,r-1),onMoveDown:()=>_(r,r+1),onToggleActive:t=>T(e.id,t),onUpdateProxy:t=>O(e.id,t),onEdit:()=>{b(e),x(!0)},onDelete:()=>E(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:()=>m(!0),children:"Add"})})]})]}),(0,a.jsx)(g,{isOpen:u,provider:e,proxyPools:o,onSave:P,onClose:()=>m(!1)}),(0,a.jsx)(i.wI,{isOpen:p,connection:h,proxyPools:o,onSave:A,onClose:()=>x(!1)}),(0,a.jsx)(i.uo,{isOpen:!!k,onClose:()=>C(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}function v({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:l,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let u="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:u?{color:u}: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 j({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 w({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,m.C)(),[l,d]=(0,n.useState)({}),[p,x]=(0,n.useState)([]),[h,b]=(0,n.useState)({}),[f,g]=(0,n.useState)(null),[y,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),[S,$]=(0,n.useState)([]),_=s||(0,c.wG)(e),E=t||"llm",T=(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&&$((o.connections||[]).filter(t=>t.provider===e)),a.ok&&x(l.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[e]);(0,n.useEffect)(()=>{T()},[T]);let O=async(e,t)=>{let s=`${_}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await T()}catch(e){console.log("set alias error:",e)}},P=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await T()}catch(e){console.log("delete alias error:",e)}},A=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:_,id:e,type:E})})).ok&&(await T(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},I=async e=>{try{let t=new URLSearchParams({providerAlias:_,id:e,type:E});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await T(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},R=async e=>{if(!f){g(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${_}/${e}`,kind:t})}),a=await s.json();b(t=>({...t,[e]:a.ok?"ok":"error"})),N(a.ok?"":a.error||"Model not reachable")}catch{b(t=>({...t,[e]:"error"})),N("Network error")}finally{g(null)}}},M=(0,u.KC)(e),L=t?M.filter(e=>e.kinds?e.kinds.includes(t):(e.type||"llm")===t):M,D=p.filter(e=>e.providerAlias===_&&(e.type||"llm")===E&&!L.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()}`:""]})}),y&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:y}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[L.map(e=>{let t=`${_}/${e.id}`,s=Object.entries(l).find(([,e])=>e===t)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${_}/${e.id}`,alias:s,copied:r,onCopy:o,onSetAlias:t=>O(e.id,t),onDeleteAlias:()=>P(s),testStatus:h[e.id],onTest:S.length>0?()=>R(e.id):void 0,isTesting:f===e.id,isFree:e.isFree},e.id)}),D.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${_}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>I(e.id),testStatus:h[e.id],onTest:S.length>0?()=>R(e.id):void 0,isTesting:f===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>C(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(j,{isOpen:k,onSave:async e=>{await A(e),C(!1)},onClose:()=>C(!1)})]})}b.propTypes={until:x().string.isRequired},f.propTypes={connection:x().shape({id:x().string,name:x().string,email:x().string,displayName:x().string,testStatus:x().string,isActive:x().bool,lastError:x().string,priority:x().number}).isRequired,proxyPools:x().array,isOAuth:x().bool.isRequired,isFirst:x().bool.isRequired,isLast:x().bool.isRequired,onMoveUp:x().func.isRequired,onMoveDown:x().func.isRequired,onToggleActive:x().func.isRequired,onUpdateProxy:x().func,onEdit:x().func.isRequired,onDelete:x().func.isRequired},g.propTypes={isOpen:x().bool.isRequired,provider:x().string,providerName:x().string,proxyPools:x().array,onSave:x().func.isRequired,onClose:x().func.isRequired},y.propTypes={providerId:x().string.isRequired,isOAuth:x().bool},v.propTypes={model:x().shape({id:x().string.isRequired}).isRequired,fullModel:x().string.isRequired,copied:x().string,onCopy:x().func.isRequired,testStatus:x().oneOf(["ok","error"]),isCustom:x().bool,isFree:x().bool,onDeleteAlias:x().func,onTest:x().func,isTesting:x().bool},j.propTypes={isOpen:x().bool.isRequired,onSave:x().func.isRequired,onClose:x().func.isRequired},w.propTypes={providerId:x().string.isRequired,kindFilter:x().string,providerAliasOverride:x().string};let N={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},nvidia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},hyperbolic:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},deepgram:{hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/deepgram/voices"},huggingface:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},cartesia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},playht:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},coqui:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},tortoise:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},inworld:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"inworld-tts-models",apiEndpoint:"/api/media-providers/tts/inworld/voices"},qwen:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},minimax:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices",defaultVoiceId:"English_expressive_narrator"},"minimax-cn":{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices?provider=minimax-cn",defaultVoiceId:"English_expressive_narrator"},gemini:{hasLanguageDropdown:!1,hasLanguageHint:!0,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"gemini-tts-models",voiceKey:"gemini-tts-voices",voicesPerModel:!0}};var k=s(717),C=s(91781),S=s(62199);function $({label:e,children:t}){return(0,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})]})}let _=`// Audio will appear here after running.
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{54909:(e,t,s)=>{Promise.resolve().then(s.bind(s,94588))},62199:(e,t,s)=>{"use strict";s.d(t,{O:()=>r});let a=Object.freeze({"/v1/embeddings":"embeddings","/v1/images/generations":"images","/v1/audio/speech":"speech","/v1/audio/transcriptions":"transcriptions","/v1/search":"search","/v1/web/fetch":"fetch"});function r(e){if("string"!=typeof e)return null;let t=e.indexOf("?"),s=-1===t?e:e.slice(0,t),r=-1===t?"":e.slice(t),o=a[s];return o?`/api/dashboard/media/${o}${r}`:null}},70217:(e,t,s)=>{"use strict";s.d(t,{BU:()=>u,G9:()=>n,d4:()=>d,gJ:()=>a,i2:()=>c});let a=[{id:"all",label:"All"},{id:"active",label:"Active",keys:["active"]},{id:"errors",label:"Errors",keys:["connection_error","auth_error","quota_exhausted","rate_limited","banned","cooldown","unknown"]},{id:"connection",label:"Connection",keys:["connection_error"]},{id:"auth",label:"Auth",keys:["auth_error"]},{id:"limit",label:"Limit",keys:["rate_limited","cooldown"]},{id:"exhausted",label:"Exhausted",keys:["quota_exhausted"]},{id:"banned",label:"Banned",keys:["banned"]},{id:"disabled",label:"Disabled",keys:["disabled"]}],r={active:{label:"active",severity:"success",terminal:!1},disabled:{label:"disabled",severity:"default",terminal:!1},connection_error:{label:"connection error",severity:"error",terminal:!1},auth_error:{label:"auth error",severity:"error",terminal:!0},quota_exhausted:{label:"exhausted",severity:"error",terminal:!0},rate_limited:{label:"rate limited",severity:"warning",terminal:!1},banned:{label:"banned",severity:"error",terminal:!0},cooldown:{label:"cooldown",severity:"warning",terminal:!1},unknown:{label:"unknown",severity:"default",terminal:!1}},o={policy_suspended:"banned",credential_rejected:"auth_error",reauth_required:"auth_error",authentication:"auth_error",entitlement_or_quota:"quota_exhausted",rate_limited:"rate_limited",permission_denied:"auth_error",upstream_transient:"connection_error"};function l(e){if(!e)return"";if("string"==typeof e)return e.toLowerCase();try{return JSON.stringify(e).toLowerCase()}catch{return String(e).toLowerCase()}}function n(e={},t=Date.now()){let s=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>new Date(e).getTime()).filter(e=>Number.isFinite(e)&&e>t);return s.length>0?new Date(Math.min(...s)).toISOString():null}function i(e,t=""){let s=r[e]||r.unknown;return{key:e,...s,reason:t}}function d(e={}){var t;let s=(t=e).quarantinedAt?i(o[l(t.failureClass)]||"unknown",t.quarantineReason||t.lastError||"Connection is quarantined"):null;if(s)return s;if(!1===e.isActive)return i("disabled","Connection is disabled");if(function(e={}){return null!==n(e)}(e))return i("cooldown","Model cooldown is active");if(function(e){if(!e)return!1;let t=new Date(e).getTime();return Number.isFinite(t)&&t>Date.now()}(e.rateLimitedUntil))return i("rate_limited","Rate limit cooldown is active");let a=l(e.testStatus||e.status),r=l(e.lastErrorType||e.errorType),c=l(e.errorCode||e.statusCode),u=l(e.lastError||e.error),m=`${a} ${r} ${c} ${u}`.trim();return!m||["active","success","ok"].includes(a)?i("active",""):m.includes("ban")||m.includes("suspend")||m.includes("restricted")?i("banned",e.lastError||"Account appears restricted"):m.includes("exhaust")||m.includes("quota exceeded")||m.includes("insufficient_quota")||m.includes("payment required")||"402"===c?i("quota_exhausted",e.lastError||"Quota exhausted"):r.includes("rate_limited")||m.includes("rate limit")||m.includes("too many requests")||"429"===c?i("rate_limited",e.lastError||"Rate limited"):r.includes("auth")||r.includes("token")||m.includes("unauthorized")||m.includes("invalid api key")||m.includes("token invalid")||m.includes("token expired")||m.includes("revoked")||"401"===c||"403"===c?i("auth_error",e.lastError||"Authentication failed"):r.includes("network")||m.includes("network")||m.includes("timeout")||m.includes("fetch failed")||m.includes("econn")||m.includes("dns")||m.includes("proxy")?i("connection_error",e.lastError||"Connection failed"):["error","expired","unavailable","failed"].includes(a)?i("connection_error",e.lastError||e.testStatus||"Connection failed"):i("unknown",e.lastError||e.testStatus||"")}function c(e,t){if(!t||"all"===t)return!0;let s=a.find(e=>e.id===t);return!s||s.keys.includes(d(e).key)}function u(e){return e?.severity==="success"?"success":e?.severity==="error"?"error":"default"}},81277:(e,t,s)=>{"use strict";s.d(t,{c:()=>o});var a=s(12115),r=s(70217);function o(e={}){let[t,s]=(0,a.useState)(null),l=JSON.stringify(Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).sort(([e],[t])=>e.localeCompare(t)));return(0,a.useEffect)(()=>(function(e,t,s={}){let a=s.now||Date.now,o=s.setTimer||globalThis.setTimeout,l=s.clearTimer||globalThis.clearTimeout,n=!1,i=null,d=()=>{if(i=null,n)return;let s=a(),l=(0,r.G9)(e,s);t(l),l&&(i=o(d,Math.min(Math.max(1,new Date(l).getTime()-s+1),0x7fffffff)))};return i=o(d,0),()=>{n=!0,null!==i&&l(i),i=null}})(Object.fromEntries(JSON.parse(l)),s),[l]),t}},94588:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>L});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(52679),u=s(28777),m=s(11059),p=s(14051),x=s.n(p),h=s(81277);function b({until:e}){let[t,s]=(0,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 f({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:o,onMoveUp:l,onMoveDown:d,onToggleActive:c,onUpdateProxy:u,onEdit:m,onDelete:p}){let[x,g]=(0,n.useState)(!1),[y,v]=(0,n.useState)(!1),j=(0,n.useRef)(null),w=new Map((t||[]).map(e=>[e.id,e])),N=e.providerSpecificData?.proxyPoolId||null,k=N?w.get(N):null,C=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,S=!!N||C,$=k?`Pool: ${k.name}`:N?`Pool: ${N} (inactive/missing)`:C?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",_="",T=k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(T)try{let e=new URL(T);_=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{_=T}let E=k?.noProxy||e.providerSpecificData?.connectionNoProxy||"",R=k?.isActive===!0?"success":N||C?"error":"default",O=(0,h.c)(e),P=null!==O;(0,n.useEffect)(()=>{if(!x)return;let e=e=>{j.current&&!j.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[x]);let A="unavailable"!==e.testStatus||P?e.testStatus:"active",I=s?e.name||e.email||e.displayName||"OAuth Account":e.name,M=async e=>{v(!0);try{await u("__none__"===e?null:e)}finally{v(!1),g(!1)}};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: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_up"})}),(0,a.jsx)("button",{onClick:d,disabled:o,className:`p-0.5 rounded ${o?"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:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:I}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:!1===e.isActive?"default":"active"===A||"success"===A?"success":"error"===A||"expired"===A||"unavailable"===A?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":A||"Unknown"}),S&&(0,a.jsx)(i.Ex,{variant:R,size:"sm",children:"Proxy"}),P&&!1!==e.isActive&&(0,a.jsx)(b,{until:O}),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]})]}),S&&(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:$,children:$}),_&&(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:_}),E&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(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:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:j,children:[(0,a.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${S?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),x&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,a.jsx)("button",{onClick:()=>M("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!N?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>M(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${N===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center 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:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function g({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:o,onClose:l}){let d="__none__",[c,u]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[m,p]=(0,n.useState)(!1),[x,h]=(0,n.useState)(null),[b,f]=(0,n.useState)(!1),y=async()=>{p(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),s=await e.json();h(s.valid?"success":"failed")}catch{h("failed")}finally{p(!1)}},v=async()=>{if(t&&c.apiKey){f(!0);try{let e=!1;try{p(!0),h(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await s.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{p(!1)}await o({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{f(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:l,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:c.name,onChange:e=>u({...c,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",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.apiKey,onChange:e=>u({...c,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||m||b,variant:"secondary",children:m?"Checking...":"Check"})})]}),x&&(0,a.jsx)(i.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"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",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.priority,onChange:e=>u({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,a.jsx)(i.l6,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>u({...c,proxyPoolId:e.target.value}),options:[{value:d,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!c.name||!c.apiKey||b,children:b?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function y({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[o,l]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[u,m]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),[h,b]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),k=(0,n.useRef)(null),C=(0,n.useRef)("1"),[S,$]=(0,n.useState)(null),_=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),o=await t.json(),n=await s.json(),i=a.ok?await a.json():{};t.ok&&r((o.connections||[]).filter(t=>t.provider===e)),s.ok&&l(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};j(d.fallbackStrategy||null),N(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1"),C.current=null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1"}catch(e){console.log("ConnectionsCard fetch error:",e)}finally{c(!1)}},[e]);(0,n.useEffect)(()=>{_()},[_]);let T=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?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,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("saveStrategy error:",e)}},E=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{let[s,r]=await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e+1})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t+1})})]);s.ok&&r.ok||await _()}catch{await _()}},R=async e=>{$({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{$(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(t=>t.filter(t=>t.id!==e))}catch(e){console.log("delete error:",e)}}})},O=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("toggle error:",e)}},P=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("proxy error:",e)}},A=async t=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})})).ok&&(await _(),m(!1))}catch(e){console.log("save apikey error:",e)}},I=async e=>{try{(await fetch(`/api/providers/${h.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await _(),x(!1))}catch(e){console.log("update connection error:",e)}};return d?(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"===v,onChange:e=>{let t=e?"round-robin":null;j(t),e&&!w&&N("1");let s=e?w||"1":w;C.current=s,k.current&&(clearTimeout(k.current),k.current=null),T(t,s)}}),"round-robin"===v&&(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:w,onChange:e=>{N(e.target.value),C.current=e.target.value,k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{T("round-robin",C.current)},500)},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:()=>m(!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)(f,{connection:e,proxyPools:o,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>E(r,r-1),onMoveDown:()=>E(r,r+1),onToggleActive:t=>O(e.id,t),onUpdateProxy:t=>P(e.id,t),onEdit:()=>{b(e),x(!0)},onDelete:()=>R(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:()=>m(!0),children:"Add"})})]})]}),(0,a.jsx)(g,{isOpen:u,provider:e,proxyPools:o,onSave:A,onClose:()=>m(!1)}),(0,a.jsx)(i.wI,{isOpen:p,connection:h,proxyPools:o,onSave:I,onClose:()=>x(!1)}),(0,a.jsx)(i.uo,{isOpen:!!S,onClose:()=>$(null),onConfirm:S?.onConfirm,title:S?.title||"Confirm",message:S?.message,variant:"danger"})]})}function v({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:l,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let u="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:u?{color:u}: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 j({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 w({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,m.C)(),[l,d]=(0,n.useState)({}),[p,x]=(0,n.useState)([]),[h,b]=(0,n.useState)({}),[f,g]=(0,n.useState)(null),[y,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),[S,$]=(0,n.useState)([]),_=s||(0,c.wG)(e),T=t||"llm",E=(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&&$((o.connections||[]).filter(t=>t.provider===e)),a.ok&&x(l.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[e]);(0,n.useEffect)(()=>{E()},[E]);let R=async(e,t)=>{let s=`${_}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await E()}catch(e){console.log("set alias error:",e)}},O=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await E()}catch(e){console.log("delete alias error:",e)}},P=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:_,id:e,type:T})})).ok&&(await E(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},A=async e=>{try{let t=new URLSearchParams({providerAlias:_,id:e,type:T});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await E(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},I=async e=>{if(!f){g(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${_}/${e}`,kind:t})}),a=await s.json();b(t=>({...t,[e]:a.ok?"ok":"error"})),N(a.ok?"":a.error||"Model not reachable")}catch{b(t=>({...t,[e]:"error"})),N("Network error")}finally{g(null)}}},M=(0,u.KC)(e),L=t?M.filter(e=>e.kinds?e.kinds.includes(t):(e.type||"llm")===t):M,D=p.filter(e=>e.providerAlias===_&&(e.type||"llm")===T&&!L.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()}`:""]})}),y&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:y}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[L.map(e=>{let t=`${_}/${e.id}`,s=Object.entries(l).find(([,e])=>e===t)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${_}/${e.id}`,alias:s,copied:r,onCopy:o,onSetAlias:t=>R(e.id,t),onDeleteAlias:()=>O(s),testStatus:h[e.id],onTest:S.length>0?()=>I(e.id):void 0,isTesting:f===e.id,isFree:e.isFree},e.id)}),D.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${_}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>A(e.id),testStatus:h[e.id],onTest:S.length>0?()=>I(e.id):void 0,isTesting:f===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>C(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(j,{isOpen:k,onSave:async e=>{await P(e),C(!1)},onClose:()=>C(!1)})]})}b.propTypes={until:x().string.isRequired},f.propTypes={connection:x().shape({id:x().string,name:x().string,email:x().string,displayName:x().string,testStatus:x().string,isActive:x().bool,lastError:x().string,priority:x().number}).isRequired,proxyPools:x().array,isOAuth:x().bool.isRequired,isFirst:x().bool.isRequired,isLast:x().bool.isRequired,onMoveUp:x().func.isRequired,onMoveDown:x().func.isRequired,onToggleActive:x().func.isRequired,onUpdateProxy:x().func,onEdit:x().func.isRequired,onDelete:x().func.isRequired},g.propTypes={isOpen:x().bool.isRequired,provider:x().string,providerName:x().string,proxyPools:x().array,onSave:x().func.isRequired,onClose:x().func.isRequired},y.propTypes={providerId:x().string.isRequired,isOAuth:x().bool},v.propTypes={model:x().shape({id:x().string.isRequired}).isRequired,fullModel:x().string.isRequired,copied:x().string,onCopy:x().func.isRequired,testStatus:x().oneOf(["ok","error"]),isCustom:x().bool,isFree:x().bool,onDeleteAlias:x().func,onTest:x().func,isTesting:x().bool},j.propTypes={isOpen:x().bool.isRequired,onSave:x().func.isRequired,onClose:x().func.isRequired},w.propTypes={providerId:x().string.isRequired,kindFilter:x().string,providerAliasOverride:x().string};let N={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},nvidia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},hyperbolic:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},deepgram:{hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/deepgram/voices"},huggingface:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},cartesia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},playht:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},coqui:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},tortoise:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},inworld:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"inworld-tts-models",apiEndpoint:"/api/media-providers/tts/inworld/voices"},qwen:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},minimax:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices",defaultVoiceId:"English_expressive_narrator"},"minimax-cn":{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices?provider=minimax-cn",defaultVoiceId:"English_expressive_narrator"},gemini:{hasLanguageDropdown:!1,hasLanguageHint:!0,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"gemini-tts-models",voiceKey:"gemini-tts-voices",voicesPerModel:!0}};var k=s(717),C=s(91781),S=s(62199);function $({label:e,children:t}){return(0,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})]})}let _=`// Audio will appear here after running.
2
2
  // Example JSON response (response_format=json):
3
3
  {
4
4
  "format": "mp3",
5
5
  "audio": "//NExAANaAIIAUAAANNNNNNNN..." // base64 encoded MP3
6
- }`,E=`{
6
+ }`,T=`{
7
7
  "object": "list",
8
8
  "data": [{
9
9
  "object": "embedding",
@@ -12,7 +12,7 @@
12
12
  }],
13
13
  "model": "...",
14
14
  "usage": { "prompt_tokens": 9, "total_tokens": 9 }
15
- }`,T="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png";function O(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}let P={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
15
+ }`,E="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png";function R(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}let O={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
16
16
  "results": [
17
17
  { "title": "...", "url": "...", "snippet": "..." }
18
18
  ]
@@ -35,25 +35,25 @@
35
35
  "data": [
36
36
  { "url": "...", "format": "mp3" }
37
37
  ]
38
- }`}};function A({providerId:e,customAlias:t}){let s=(0,c.gC)(e),r=s?t||e:(0,c.wG)(e),o=s?[]:(0,u.KC)(e).filter(e=>"embedding"===e.type),[l,d]=(0,n.useState)(o[0]?.id??""),[p,x]=(0,n.useState)("The quick brown fox jumps over the lazy dog"),[h,b]=(0,n.useState)(""),[f,g]=(0,n.useState)(""),[y,v]=(0,n.useState)(!1),[j,w]=(0,n.useState)(""),[N,k]=(0,n.useState)(""),[C,_]=(0,n.useState)(null),[T,O]=(0,n.useState)(!1),[P,I]=(0,n.useState)(""),{copied:R,copy:M}=(0,m.C)(),{copied:L,copy:D}=(0,m.C)();(0,n.useEffect)(()=>{w(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&k(e.publicUrl)}).catch(()=>{})},[]);let K=y?N:j,U=l?`${r}/${l}`:"",B=()=>{let e={model:U,input:p.trim()},t=Number(h);return h&&Number.isFinite(t)&&t>0&&(e.dimensions=t),e},F=`curl -X POST ${K}/v1/embeddings \\
38
+ }`}};function P({providerId:e,customAlias:t}){let s=(0,c.gC)(e),r=s?t||e:(0,c.wG)(e),o=s?[]:(0,u.KC)(e).filter(e=>"embedding"===e.type),[l,d]=(0,n.useState)(o[0]?.id??""),[p,x]=(0,n.useState)("The quick brown fox jumps over the lazy dog"),[h,b]=(0,n.useState)(""),[f,g]=(0,n.useState)(""),[y,v]=(0,n.useState)(!1),[j,w]=(0,n.useState)(""),[N,k]=(0,n.useState)(""),[C,_]=(0,n.useState)(null),[E,R]=(0,n.useState)(!1),[O,A]=(0,n.useState)(""),{copied:I,copy:M}=(0,m.C)(),{copied:L,copy:D}=(0,m.C)();(0,n.useEffect)(()=>{w(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&k(e.publicUrl)}).catch(()=>{})},[]);let K=y?N:j,U=l?`${r}/${l}`:"",B=()=>{let e={model:U,input:p.trim()},t=Number(h);return h&&Number.isFinite(t)&&t>0&&(e.dimensions=t),e},F=`curl -X POST ${K}/v1/embeddings \\
39
39
  -H "Content-Type: application/json" \\
40
40
  -H "Authorization: Bearer ${f||"YOUR_KEY"}" \\
41
- -d '${JSON.stringify(B())}'`,q=async()=>{if(!p.trim()||!U)return;O(!0),I(""),_(null);let e=Date.now();try{let t={"Content-Type":"application/json"};f&&(t.Authorization=`Bearer ${f}`);let s=await fetch((0,S.O)("/v1/embeddings"),{method:"POST",headers:t,body:JSON.stringify(B())}),a=Date.now()-e,r=await s.json();if(!s.ok)return void I(r?.error?.message||r?.error||`HTTP ${s.status}`);_({data:r,latencyMs:a})}catch(e){I(e.message||"Network error")}finally{O(!1)}},J=C?JSON.stringify(C.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)($,{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)($,{label:"Endpoint",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)("input",{value:K,onChange:e=>y?k(e.target.value):w(e.target.value),className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"}),N&&(0,a.jsxs)("button",{onClick:()=>v(e=>!e),title:y?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${y?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{label:"API Key",children:(0,a.jsx)("input",{type:"password",value:f,onChange:e=>g(e.target.value),placeholder:"sk-...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)($,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:p,onChange:e=>x(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),p&&(0,a.jsx)("button",{type:"button",onClick:()=>x(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)($,{label:"Dimensions",children:(0,a.jsx)("input",{type:"number",min:"1",value:h,onChange:e=>b(e.target.value),placeholder:"optional, e.g. 512, 1024 (leave empty for default)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,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:()=>M(F),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.jsxs)("button",{onClick:q,disabled:T||!p.trim()||!U,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:T?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),T?"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:F})]}),P&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:P}),(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 ",C&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",C.latencyMs,"ms"]})]}),C&&(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:L?"check":"content_copy"}),L?"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 E;let t=JSON.parse(JSON.stringify(e));return(t.data||[]).forEach(e=>{Array.isArray(e.embedding)&&e.embedding.length>4&&(e.embedding=[...e.embedding.slice(0,4).map(e=>parseFloat(e.toFixed(6))),`... (${e.embedding.length} dims)`])}),JSON.stringify(t,null,2)})(C?.data)})]})]})]})}function I({providerId:e}){let t,s=(0,c.wG)(e),r=N[e]||N["edge-tts"],[o,l]=(0,n.useState)(r.defaultVoiceId||""),[d,p]=(0,n.useState)(""),[x,h]=(0,n.useState)(r.defaultVoiceId||""),[b,f]=(0,n.useState)([]),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)(()=>{let t=c.Q2[e]?.ttsConfig?.models;if(t?.length)return t[0].id;if(r.hasModelSelector&&r.modelKey){let e=(0,u.KC)(r.modelKey);return e?.[0]?.id||""}return""}),[w,E]=(0,n.useState)("Hello, this is a text to speech test."),[T,O]=(0,n.useState)(!1),[P,A]=(0,n.useState)(""),[R,M]=(0,n.useState)(""),[L,D]=(0,n.useState)("mp3"),[K,U]=(0,n.useState)(""),[B,F]=(0,n.useState)(null),[q,J]=(0,n.useState)(!1),[z,V]=(0,n.useState)(""),[H,W]=(0,n.useState)(null),{copied:G,copy:Y}=(0,m.C)(),[Q,Z]=(0,n.useState)(!1),[X,ee]=(0,n.useState)([]),[et,es]=(0,n.useState)(!1),[ea,er]=(0,n.useState)(""),[eo,el]=(0,n.useState)(""),[en,ei]=(0,n.useState)({}),[ed,ec]=(0,n.useState)("");(0,n.useEffect)(()=>{if(A(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&M(e.publicUrl)}).catch(()=>{}),"hardcoded"===r.voiceSource){let t=r.hasModelSelector&&r.modelKey&&(0,u.KC)(r.modelKey)?.[0]?.id||"",s=r.voicesPerModel&&t?(0,k.jY)(e,t)||[]:(0,u.KC)(r.voiceKey||e).filter(e=>"tts"===e.type);if(s.length)if(r.hasBrowseButton){let e=s.find(e=>"en"===e.id)||s[0];y(e.id),l(e.id),p(e.name),f([{id:e.id,name:e.name}])}else f(s),l(s[0].id),p(s[0].name||s[0].id)}},[e]),(0,n.useEffect)(()=>{if(!r.voicesPerModel||!v)return;let t=(0,k.jY)(e,v)||[];f(t),t.length&&(l(t[0].id),p(t[0].name||t[0].id))},[v]);let eu=async()=>{if(Z(!0),er(""),el(""),!X.length){es(!0);try{if("hardcoded"===r.voiceSource){let t=r.voiceKey||e,s=(0,u.KC)(t).filter(e=>"tts"===e.type),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}]});ei(a),ee(Object.values(a).sort((e,t)=>e.name.localeCompare(t.name)))}else{let t=r.apiEndpoint?r.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 el(a.error);ee(a.languages||[]),ei(a.byLang||{})}}catch(e){el(e.message)}finally{es(!1)}}},em=ea?X.filter(e=>e.name.toLowerCase().includes(ea.toLowerCase())||e.code.toLowerCase().includes(ea.toLowerCase())):X,ep=T?R:P,ex=r.hasVoiceIdInput&&x||o,eh=r.hasModelSelector&&v&&ex?`${s}/${v}/${ex}`:r.hasModelSelector&&v?`${s}/${v}`:ex?`${s}/${ex}`:"",eb=(t={model:eh,input:w},r.hasLanguageHint&&ed&&(t.language=ed),t),ef=`curl -X POST ${ep}/v1/audio/speech${"json"===L?"?response_format=json":""} \\
41
+ -d '${JSON.stringify(B())}'`,q=async()=>{if(!p.trim()||!U)return;R(!0),A(""),_(null);let e=Date.now();try{let t={"Content-Type":"application/json"};f&&(t.Authorization=`Bearer ${f}`);let s=await fetch((0,S.O)("/v1/embeddings"),{method:"POST",headers:t,body:JSON.stringify(B())}),a=Date.now()-e,r=await s.json();if(!s.ok)return void A(r?.error?.message||r?.error||`HTTP ${s.status}`);_({data:r,latencyMs:a})}catch(e){A(e.message||"Network error")}finally{R(!1)}},J=C?JSON.stringify(C.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)($,{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)($,{label:"Endpoint",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)("input",{value:K,onChange:e=>y?k(e.target.value):w(e.target.value),className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"}),N&&(0,a.jsxs)("button",{onClick:()=>v(e=>!e),title:y?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${y?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{label:"API Key",children:(0,a.jsx)("input",{type:"password",value:f,onChange:e=>g(e.target.value),placeholder:"sk-...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)($,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:p,onChange:e=>x(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),p&&(0,a.jsx)("button",{type:"button",onClick:()=>x(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)($,{label:"Dimensions",children:(0,a.jsx)("input",{type:"number",min:"1",value:h,onChange:e=>b(e.target.value),placeholder:"optional, e.g. 512, 1024 (leave empty for default)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,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:()=>M(F),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:I?"check":"content_copy"}),I?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:q,disabled:E||!p.trim()||!U,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:E?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),E?"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:F})]}),O&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:O}),(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 ",C&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",C.latencyMs,"ms"]})]}),C&&(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:L?"check":"content_copy"}),L?"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 T;let t=JSON.parse(JSON.stringify(e));return(t.data||[]).forEach(e=>{Array.isArray(e.embedding)&&e.embedding.length>4&&(e.embedding=[...e.embedding.slice(0,4).map(e=>parseFloat(e.toFixed(6))),`... (${e.embedding.length} dims)`])}),JSON.stringify(t,null,2)})(C?.data)})]})]})]})}function A({providerId:e}){let t,s=(0,c.wG)(e),r=N[e]||N["edge-tts"],[o,l]=(0,n.useState)(r.defaultVoiceId||""),[d,p]=(0,n.useState)(""),[x,h]=(0,n.useState)(r.defaultVoiceId||""),[b,f]=(0,n.useState)([]),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)(()=>{let t=c.Q2[e]?.ttsConfig?.models;if(t?.length)return t[0].id;if(r.hasModelSelector&&r.modelKey){let e=(0,u.KC)(r.modelKey);return e?.[0]?.id||""}return""}),[w,T]=(0,n.useState)("Hello, this is a text to speech test."),[E,R]=(0,n.useState)(!1),[O,P]=(0,n.useState)(""),[I,M]=(0,n.useState)(""),[L,D]=(0,n.useState)("mp3"),[K,U]=(0,n.useState)(""),[B,F]=(0,n.useState)(null),[q,J]=(0,n.useState)(!1),[z,V]=(0,n.useState)(""),[H,W]=(0,n.useState)(null),{copied:G,copy:Y}=(0,m.C)(),[Q,Z]=(0,n.useState)(!1),[X,ee]=(0,n.useState)([]),[et,es]=(0,n.useState)(!1),[ea,er]=(0,n.useState)(""),[eo,el]=(0,n.useState)(""),[en,ei]=(0,n.useState)({}),[ed,ec]=(0,n.useState)("");(0,n.useEffect)(()=>{if(P(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&M(e.publicUrl)}).catch(()=>{}),"hardcoded"===r.voiceSource){let t=r.hasModelSelector&&r.modelKey&&(0,u.KC)(r.modelKey)?.[0]?.id||"",s=r.voicesPerModel&&t?(0,k.jY)(e,t)||[]:(0,u.KC)(r.voiceKey||e).filter(e=>"tts"===e.type);if(s.length)if(r.hasBrowseButton){let e=s.find(e=>"en"===e.id)||s[0];y(e.id),l(e.id),p(e.name),f([{id:e.id,name:e.name}])}else f(s),l(s[0].id),p(s[0].name||s[0].id)}},[e]),(0,n.useEffect)(()=>{if(!r.voicesPerModel||!v)return;let t=(0,k.jY)(e,v)||[];f(t),t.length&&(l(t[0].id),p(t[0].name||t[0].id))},[v]);let eu=async()=>{if(Z(!0),er(""),el(""),!X.length){es(!0);try{if("hardcoded"===r.voiceSource){let t=r.voiceKey||e,s=(0,u.KC)(t).filter(e=>"tts"===e.type),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}]});ei(a),ee(Object.values(a).sort((e,t)=>e.name.localeCompare(t.name)))}else{let t=r.apiEndpoint?r.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 el(a.error);ee(a.languages||[]),ei(a.byLang||{})}}catch(e){el(e.message)}finally{es(!1)}}},em=ea?X.filter(e=>e.name.toLowerCase().includes(ea.toLowerCase())||e.code.toLowerCase().includes(ea.toLowerCase())):X,ep=E?I:O,ex=r.hasVoiceIdInput&&x||o,eh=r.hasModelSelector&&v&&ex?`${s}/${v}/${ex}`:r.hasModelSelector&&v?`${s}/${v}`:ex?`${s}/${ex}`:"",eb=(t={model:eh,input:w},r.hasLanguageHint&&ed&&(t.language=ed),t),ef=`curl -X POST ${ep}/v1/audio/speech${"json"===L?"?response_format=json":""} \\
42
42
  -H "Content-Type: application/json" \\
43
43
  -H "Authorization: Bearer YOUR_KEY" \\
44
44
  -d '${JSON.stringify(eb)}' \\
45
- ${"json"===L?"":"--output speech.mp3"}`,eg=async()=>{if(!w.trim()||!eh)return;J(!0),V(""),U(""),F(null);let e=Date.now();try{let t=(0,S.O)(`/v1/audio/speech${"json"===L?"?response_format=json":""}`),s=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...eb,input:w.trim()})});if(W(Date.now()-e),!s.ok){let e=await s.json().catch(()=>({}));V(e?.error?.message||e?.error||`HTTP ${s.status}`);return}if("json"===L){let e=await s.json();F(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob());U(URL.createObjectURL(t))}else{let e=await s.blob();U(URL.createObjectURL(e))}}catch(e){V(e.message||"Network error")}finally{J(!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)($,{label:"Endpoint",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.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:[ep,"/v1/audio/speech"]}),R&&(0,a.jsxs)("button",{onClick:()=>O(e=>!e),title:T?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${T?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{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:(0,a.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),r.hasModelSelector&&(r.modelKey||c.Q2[e]?.ttsConfig?.models?.length)&&(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("select",{value:v,onChange:e=>j(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:((c.Q2[e]?.ttsConfig?.models?.length?c.Q2[e].ttsConfig.models:(0,u.KC)(r.modelKey))||[]).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),r.hasLanguageHint&&(0,a.jsx)($,{label:"Language",children:(0,a.jsxs)("select",{value:ed,onChange:e=>ec(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"}),C.I.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.id))]})}),r.hasBrowseButton&&(0,a.jsx)($,{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:eu,className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:g?(0,a.jsx)("span",{className:"text-text-main",children:X.find(e=>e.code===g)?.name||g}):(0,a.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,a.jsxs)("button",{onClick:eu,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"]})]})}),b.length>0&&(0,a.jsx)($,{label:"Voice",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:b.map(e=>(0,a.jsxs)("button",{onClick:()=>{l(e.id),p(e.name),r.hasVoiceIdInput&&h(e.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${o===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))})}),r.hasVoiceIdInput&&(0,a.jsx)($,{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:x,onChange:e=>{h(e.target.value),l(e.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),x&&(0,a.jsx)("button",{type:"button",onClick:()=>{h(""),l("")},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"})})]})})}),r.hasLanguageDropdown&&(0,a.jsx)($,{label:"Language",children:(0,a.jsx)("select",{value:o,onChange:t=>{let s=(0,u.KC)(e).filter(e=>"tts"===e.type).find(e=>e.id===t.target.value);l(t.target.value),p(s?.name||t.target.value)},className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(0,u.KC)(e).filter(e=>"tts"===e.type).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)($,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:w,onChange:e=>E(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),w&&(0,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"})})]})}),(0,a.jsx)($,{label:"Output Format",children:(0,a.jsxs)("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:[(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:()=>Y(ef),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:G?"check":"content_copy"}),G?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eg,disabled:q||!w.trim()||!eh,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:q?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),q?"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:ef})]}),z&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:z}),K?(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 ",H&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",H,"ms"]})]}),(0,a.jsxs)("a",{href:K,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:K,className:"w-full"}),B&&(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:B.format,audio:B.audio?`${B.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:_})]})]})]}),Q&&(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:()=>Z(!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",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>Z(!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:ea,onChange:e=>er(e.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[eo&&(0,a.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:eo}),et?(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:[em.map(e=>(0,a.jsxs)("button",{onClick:()=>{let t;return Z(!1),y(e.code),void(f(t=en[e.code]?.voices||[]),t.length&&(l(t[0].id),p(t[0].name),r.hasVoiceIdInput&&h(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${g===e.code?"bg-primary/10 text-primary":""}`,children:[(0,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"]}),g===e.code&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===em.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}function R({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=P[t],d=l||{},p=(0,u.KC)(e).filter(e=>e.type===t),x=new Set(["image","video","music","imageToText"]).has(t),h=x&&0===p.length,[b,f]=(0,n.useState)(p[0]?.id??""),g=p.find(e=>e.id===b),y=!!g?.capabilities?.includes("edit"),v=!!g?.capabilities?.includes("mask"),[j,w]=(0,n.useState)(d.defaultInput||""),[N,k]=(0,n.useState)(""),[C,_]=(0,n.useState)(""),[E,A]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[I,M]=(0,n.useState)(!1),[L,D]=(0,n.useState)(""),[K,U]=(0,n.useState)(""),[B,F]=(0,n.useState)(null),[q,J]=(0,n.useState)(null),[z,V]=(0,n.useState)(null),[H,W]=(0,n.useState)("json"),[G,Y]=(0,n.useState)(""),[Q,Z]=(0,n.useState)(!1),[X,ee]=(0,n.useState)(""),[et,es]=(0,n.useState)([]),[ea,er]=(0,n.useState)(""),{copied:eo,copy:el}=(0,m.C)(),{copied:en,copy:ei}=(0,m.C)();if((0,n.useEffect)(()=>{D(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&U(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{es((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!o||!l)return null;let ed=I?K:L,ec=o.endpoint.path,eu=x?b?`${r}/${b}`:h?"":r:r,em="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===b?{image:T}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===b?{image:T,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},ep=N.trim()||em.image||"",ex=C.trim()||em.mask_image||"",eh=O(ep),eb=O(ex),ef=Object.entries(E).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),eg={model:eu,[l.bodyKey]:j,...l.extraBody,...ef,...y&&ep?{image:ep}:{},...v&&ex?{mask_image:ex}:{}},ey="image"===t&&"binary"===H,ev="image"===t&&"codex"===e&&!ey,ej=`${ec}${ey?"?response_format=binary":""}`,ew=(0,S.O)(ej),eN=`-H "Content-Type: application/json" \\
45
+ ${"json"===L?"":"--output speech.mp3"}`,eg=async()=>{if(!w.trim()||!eh)return;J(!0),V(""),U(""),F(null);let e=Date.now();try{let t=(0,S.O)(`/v1/audio/speech${"json"===L?"?response_format=json":""}`),s=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...eb,input:w.trim()})});if(W(Date.now()-e),!s.ok){let e=await s.json().catch(()=>({}));V(e?.error?.message||e?.error||`HTTP ${s.status}`);return}if("json"===L){let e=await s.json();F(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob());U(URL.createObjectURL(t))}else{let e=await s.blob();U(URL.createObjectURL(e))}}catch(e){V(e.message||"Network error")}finally{J(!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)($,{label:"Endpoint",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.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:[ep,"/v1/audio/speech"]}),I&&(0,a.jsxs)("button",{onClick:()=>R(e=>!e),title:E?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${E?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{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:(0,a.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),r.hasModelSelector&&(r.modelKey||c.Q2[e]?.ttsConfig?.models?.length)&&(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("select",{value:v,onChange:e=>j(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:((c.Q2[e]?.ttsConfig?.models?.length?c.Q2[e].ttsConfig.models:(0,u.KC)(r.modelKey))||[]).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),r.hasLanguageHint&&(0,a.jsx)($,{label:"Language",children:(0,a.jsxs)("select",{value:ed,onChange:e=>ec(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"}),C.I.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.id))]})}),r.hasBrowseButton&&(0,a.jsx)($,{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:eu,className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:g?(0,a.jsx)("span",{className:"text-text-main",children:X.find(e=>e.code===g)?.name||g}):(0,a.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,a.jsxs)("button",{onClick:eu,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"]})]})}),b.length>0&&(0,a.jsx)($,{label:"Voice",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:b.map(e=>(0,a.jsxs)("button",{onClick:()=>{l(e.id),p(e.name),r.hasVoiceIdInput&&h(e.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${o===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))})}),r.hasVoiceIdInput&&(0,a.jsx)($,{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:x,onChange:e=>{h(e.target.value),l(e.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),x&&(0,a.jsx)("button",{type:"button",onClick:()=>{h(""),l("")},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"})})]})})}),r.hasLanguageDropdown&&(0,a.jsx)($,{label:"Language",children:(0,a.jsx)("select",{value:o,onChange:t=>{let s=(0,u.KC)(e).filter(e=>"tts"===e.type).find(e=>e.id===t.target.value);l(t.target.value),p(s?.name||t.target.value)},className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(0,u.KC)(e).filter(e=>"tts"===e.type).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)($,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:w,onChange:e=>T(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),w&&(0,a.jsx)("button",{type:"button",onClick:()=>T(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)($,{label:"Output Format",children:(0,a.jsxs)("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:[(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:()=>Y(ef),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:G?"check":"content_copy"}),G?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eg,disabled:q||!w.trim()||!eh,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:q?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),q?"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:ef})]}),z&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:z}),K?(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 ",H&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",H,"ms"]})]}),(0,a.jsxs)("a",{href:K,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:K,className:"w-full"}),B&&(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:B.format,audio:B.audio?`${B.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:_})]})]})]}),Q&&(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:()=>Z(!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",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>Z(!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:ea,onChange:e=>er(e.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[eo&&(0,a.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:eo}),et?(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:[em.map(e=>(0,a.jsxs)("button",{onClick:()=>{let t;return Z(!1),y(e.code),void(f(t=en[e.code]?.voices||[]),t.length&&(l(t[0].id),p(t[0].name),r.hasVoiceIdInput&&h(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${g===e.code?"bg-primary/10 text-primary":""}`,children:[(0,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"]}),g===e.code&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===em.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}function I({providerId:e,kind:t}){let s=(0,c.wG)(e),r=(0,c.rs)(s)===e?s:e,o=c.rj.find(e=>e.id===t),l=O[t],d=l||{},p=(0,u.KC)(e).filter(e=>e.type===t),x=new Set(["image","video","music","imageToText"]).has(t),h=x&&0===p.length,[b,f]=(0,n.useState)(p[0]?.id??""),g=p.find(e=>e.id===b),y=!!g?.capabilities?.includes("edit"),v=!!g?.capabilities?.includes("mask"),[j,w]=(0,n.useState)(d.defaultInput||""),[N,k]=(0,n.useState)(""),[C,_]=(0,n.useState)(""),[T,P]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[A,M]=(0,n.useState)(!1),[L,D]=(0,n.useState)(""),[K,U]=(0,n.useState)(""),[B,F]=(0,n.useState)(null),[q,J]=(0,n.useState)(null),[z,V]=(0,n.useState)(null),[H,W]=(0,n.useState)("json"),[G,Y]=(0,n.useState)(""),[Q,Z]=(0,n.useState)(!1),[X,ee]=(0,n.useState)(""),[et,es]=(0,n.useState)([]),[ea,er]=(0,n.useState)(""),{copied:eo,copy:el}=(0,m.C)(),{copied:en,copy:ei}=(0,m.C)();if((0,n.useEffect)(()=>{D(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&U(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{es((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!o||!l)return null;let ed=A?K:L,ec=o.endpoint.path,eu=x?b?`${r}/${b}`:h?"":r:r,em="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===b?{image:E}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===b?{image:E,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},ep=N.trim()||em.image||"",ex=C.trim()||em.mask_image||"",eh=R(ep),eb=R(ex),ef=Object.entries(T).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),eg={model:eu,[l.bodyKey]:j,...l.extraBody,...ef,...y&&ep?{image:ep}:{},...v&&ex?{mask_image:ex}:{}},ey="image"===t&&"binary"===H,ev="image"===t&&"codex"===e&&!ey,ej=`${ec}${ey?"?response_format=binary":""}`,ew=(0,S.O)(ej),eN=`-H "Content-Type: application/json" \\
46
46
  -H "Authorization: Bearer YOUR_KEY"${ea?` \\
47
47
  -H "x-connection-id: ${ea}"`:""}${ev?` \\
48
48
  -H "Accept: text/event-stream"`:""}`,ek=`curl -X ${o.endpoint.method} ${ed}${ej} \\
49
49
  ${eN.replace(/\\\n /g,"\\\n ")} \\
50
- -d '${JSON.stringify(eg)}'${ey?" \\\n --output image.png":""}`,eC=async()=>{if(!ew)return void ee("Not supported by this router build");if(!j.trim()||!eu)return;if(Z(!0),ee(""),F(null),J(null),V(null),G){try{URL.revokeObjectURL(G)}catch{}Y("")}let e=Date.now();try{let t={"Content-Type":"application/json"};ea&&(t["x-connection-id"]=ea),ev&&(t.Accept="text/event-stream");let s={...eg,model:eu},a=await fetch(ew,{method:o.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));ee(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);Y(s),F({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?J(e):"partial_image"===s?V(e):"done"===s?o=e:"error"===s&&(l=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(l)return void ee(l);o&&F({data:o,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;F({data:t,latencyMs:s})}}catch(e){ee(e.message||"Network error")}finally{Z(!1)}},eS=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(eS);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>`:eS(a);return t},e$=B?JSON.stringify(eS(B.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:[p.length>0?(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("select",{value:b,onChange:e=>f(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:p.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):h?(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("input",{value:b,onChange:e=>f(e.target.value),placeholder:"Enter model id (provider-specific)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}):null,(0,a.jsx)($,{label:"Endpoint",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.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:[ed,ec]}),K&&(0,a.jsxs)("button",{onClick:()=>M(e=>!e),title:I?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${I?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{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:(0,a.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),et.length>0&&(0,a.jsx)($,{label:"Connection",children:(0,a.jsxs)("select",{value:ea,onChange:e=>er(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)"}),et.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)($,{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"})})]})}),y&&(0,a.jsx)($,{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:em.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"})})]}),eh&&(0,a.jsx)("img",{src:eh,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),v&&(0,a.jsx)($,{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:C,onChange:e=>_(e.target.value),placeholder:em.mask_image||"https://example.com/mask.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),C&&(0,a.jsx)("button",{type:"button",onClick:()=>_(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eb&&(0,a.jsx)("img",{src:eb,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),(l.extraFields||[]).filter(e=>0===p.length||Array.isArray(g?.params)&&g.params.includes(e.key)).map(e=>(0,a.jsx)($,{label:e.label,children:"select"===e.type?(0,a.jsx)("select",{value:E[e.key]??"",onChange:t=>A(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(e.options||[]).map(e=>(0,a.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,a.jsx)("input",{type:"text",value:E[e.key]??"",placeholder:e.placeholder,onChange:t=>A(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}):(0,a.jsx)("input",{type:"number",value:E[e.key]??"",min:e.min,max:e.max,onChange:t=>A(s=>({...s,[e.key]:""===t.target.value?"":Number(t.target.value)})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})},e.key)),"image"===t&&(0,a.jsx)($,{label:"Output Format",children:(0,a.jsxs)("select",{value:H,onChange:e=>W(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,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:[ew&&(0,a.jsxs)("button",{onClick:()=>el(ek),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.jsxs)("button",{onClick:eC,disabled:!ew||Q||!j.trim()||!eu,title:ew?void 0:"Not supported by this router build",className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:Q?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),ew?Q?"Running...":"Run":"Unavailable"]})]})]}),ew?(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:ek}):(0,a.jsx)("div",{className:"rounded-lg border border-border bg-sidebar px-3 py-2.5 text-xs text-text-muted",children:"Not supported by this router build"})]}),(Q||q)&&ev&&(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:Q?{animation:"spin 1s linear infinite"}:void 0,children:Q?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[q?.stage||"starting",!Q&&q?.bytesReceived?` \xb7 ${(q.bytesReceived/1024).toFixed(1)} KB`:""]})]}),z?.b64_json&&!B&&(0,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)("img",{src:`data:image/png;base64,${z.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),X&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:X}),(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 ",B&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",B.latencyMs,"ms"]})]}),B&&(0,a.jsxs)("button",{onClick:()=>ei(e$),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:en?"check":"content_copy"}),en?"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:B?e$:l.defaultResponse}),"image"===t&&(G||B?.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:G||(B?.data?.data?.[0]?.b64_json?`data:image/png;base64,${B.data.data[0].b64_json}`:B?.data?.data?.[0]?.url||""),download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:G||(B?.data?.data?.[0]?.b64_json?`data:image/png;base64,${B.data.data[0].b64_json}`:B?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function M({providerId:e}){let t=(0,c.wG)(e),s=(0,u.KC)(e).filter(e=>"stt"===e.type),[r,o]=(0,n.useState)([]),l=[...s,...r],[d,p]=(0,n.useState)(s[0]?.id??""),x=l.find(e=>e.id===d),h=Array.isArray(x?.params)?x.params:[],[b,f]=(0,n.useState)(null),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)(""),[w,N]=(0,n.useState)("json"),[k,C]=(0,n.useState)(""),[_,E]=(0,n.useState)(!1),[T,O]=(0,n.useState)(""),[P,A]=(0,n.useState)(""),[I,R]=(0,n.useState)(null),[L,D]=(0,n.useState)(null),[K,U]=(0,n.useState)(!1),[B,F]=(0,n.useState)(""),{copied:q,copy:J}=(0,m.C)(),{copied:z,copy:V}=(0,m.C)();(0,n.useEffect)(()=>{O(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&A(e.publicUrl)}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{o((e.models||[]).filter(e=>"stt"===e.type&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let H=_?P:T,W=d?`${t}/${d}`:"",G=`curl -X POST ${H}/v1/audio/transcriptions \\
50
+ -d '${JSON.stringify(eg)}'${ey?" \\\n --output image.png":""}`,eC=async()=>{if(!ew)return void ee("Not supported by this router build");if(!j.trim()||!eu)return;if(Z(!0),ee(""),F(null),J(null),V(null),G){try{URL.revokeObjectURL(G)}catch{}Y("")}let e=Date.now();try{let t={"Content-Type":"application/json"};ea&&(t["x-connection-id"]=ea),ev&&(t.Accept="text/event-stream");let s={...eg,model:eu},a=await fetch(ew,{method:o.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));ee(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);Y(s),F({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?J(e):"partial_image"===s?V(e):"done"===s?o=e:"error"===s&&(l=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(l)return void ee(l);o&&F({data:o,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;F({data:t,latencyMs:s})}}catch(e){ee(e.message||"Network error")}finally{Z(!1)}},eS=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(eS);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>`:eS(a);return t},e$=B?JSON.stringify(eS(B.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:[p.length>0?(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("select",{value:b,onChange:e=>f(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:p.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):h?(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("input",{value:b,onChange:e=>f(e.target.value),placeholder:"Enter model id (provider-specific)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}):null,(0,a.jsx)($,{label:"Endpoint",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.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:[ed,ec]}),K&&(0,a.jsxs)("button",{onClick:()=>M(e=>!e),title:A?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${A?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{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:(0,a.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),et.length>0&&(0,a.jsx)($,{label:"Connection",children:(0,a.jsxs)("select",{value:ea,onChange:e=>er(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)"}),et.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)($,{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"})})]})}),y&&(0,a.jsx)($,{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:em.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"})})]}),eh&&(0,a.jsx)("img",{src:eh,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),v&&(0,a.jsx)($,{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:C,onChange:e=>_(e.target.value),placeholder:em.mask_image||"https://example.com/mask.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),C&&(0,a.jsx)("button",{type:"button",onClick:()=>_(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eb&&(0,a.jsx)("img",{src:eb,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),(l.extraFields||[]).filter(e=>0===p.length||Array.isArray(g?.params)&&g.params.includes(e.key)).map(e=>(0,a.jsx)($,{label:e.label,children:"select"===e.type?(0,a.jsx)("select",{value:T[e.key]??"",onChange:t=>P(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:T[e.key]??"",placeholder:e.placeholder,onChange:t=>P(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:T[e.key]??"",min:e.min,max:e.max,onChange:t=>P(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)($,{label:"Output Format",children:(0,a.jsxs)("select",{value:H,onChange:e=>W(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,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:[ew&&(0,a.jsxs)("button",{onClick:()=>el(ek),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.jsxs)("button",{onClick:eC,disabled:!ew||Q||!j.trim()||!eu,title:ew?void 0:"Not supported by this router build",className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:Q?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),ew?Q?"Running...":"Run":"Unavailable"]})]})]}),ew?(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:ek}):(0,a.jsx)("div",{className:"rounded-lg border border-border bg-sidebar px-3 py-2.5 text-xs text-text-muted",children:"Not supported by this router build"})]}),(Q||q)&&ev&&(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:Q?{animation:"spin 1s linear infinite"}:void 0,children:Q?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[q?.stage||"starting",!Q&&q?.bytesReceived?` \xb7 ${(q.bytesReceived/1024).toFixed(1)} KB`:""]})]}),z?.b64_json&&!B&&(0,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)("img",{src:`data:image/png;base64,${z.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),X&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:X}),(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 ",B&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",B.latencyMs,"ms"]})]}),B&&(0,a.jsxs)("button",{onClick:()=>ei(e$),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:en?"check":"content_copy"}),en?"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:B?e$:l.defaultResponse}),"image"===t&&(G||B?.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:G||(B?.data?.data?.[0]?.b64_json?`data:image/png;base64,${B.data.data[0].b64_json}`:B?.data?.data?.[0]?.url||""),download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:G||(B?.data?.data?.[0]?.b64_json?`data:image/png;base64,${B.data.data[0].b64_json}`:B?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function M({providerId:e}){let t=(0,c.wG)(e),s=(0,u.KC)(e).filter(e=>"stt"===e.type),[r,o]=(0,n.useState)([]),l=[...s,...r],[d,p]=(0,n.useState)(s[0]?.id??""),x=l.find(e=>e.id===d),h=Array.isArray(x?.params)?x.params:[],[b,f]=(0,n.useState)(null),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)(""),[w,N]=(0,n.useState)("json"),[k,C]=(0,n.useState)(""),[_,T]=(0,n.useState)(!1),[E,R]=(0,n.useState)(""),[O,P]=(0,n.useState)(""),[A,I]=(0,n.useState)(null),[L,D]=(0,n.useState)(null),[K,U]=(0,n.useState)(!1),[B,F]=(0,n.useState)(""),{copied:q,copy:J}=(0,m.C)(),{copied:z,copy:V}=(0,m.C)();(0,n.useEffect)(()=>{R(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&P(e.publicUrl)}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{o((e.models||[]).filter(e=>"stt"===e.type&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let H=_?O:E,W=d?`${t}/${d}`:"",G=`curl -X POST ${H}/v1/audio/transcriptions \\
51
51
  -H "Authorization: Bearer YOUR_KEY" \\
52
52
  -F "file=@${b?.name||"audio.mp3"}" \\
53
53
  -F "model=${W}"${h.includes("language")&&g?` \\
54
54
  -F "language=${g}"`:""}${h.includes("response_format")?` \\
55
55
  -F "response_format=${w}"`:""}${h.includes("temperature")&&k?` \\
56
56
  -F "temperature=${k}"`:""}${h.includes("prompt")&&v?` \\
57
- -F "prompt=${v}"`:""}`,Y=async()=>{if(!b||!W)return;U(!0),F(""),R(null);let e=Date.now();try{let t=new FormData;t.append("file",b),t.append("model",W),h.includes("language")&&g&&t.append("language",g),h.includes("response_format")&&t.append("response_format",w),h.includes("temperature")&&k&&t.append("temperature",k),h.includes("prompt")&&v&&t.append("prompt",v);let s=await fetch((0,S.O)("/v1/audio/transcriptions"),{method:"POST",body:t});D(Date.now()-e);let a=(s.headers.get("content-type")||"").includes("application/json")?await s.json():await s.text();if(!s.ok)return void F(a?.error?.message||a?.error||a||`HTTP ${s.status}`);R(a)}catch(e){F(e.message||"Network error")}finally{U(!1)}},Q="string"==typeof I?I:I?JSON.stringify(I,null,2):`{
57
+ -F "prompt=${v}"`:""}`,Y=async()=>{if(!b||!W)return;U(!0),F(""),I(null);let e=Date.now();try{let t=new FormData;t.append("file",b),t.append("model",W),h.includes("language")&&g&&t.append("language",g),h.includes("response_format")&&t.append("response_format",w),h.includes("temperature")&&k&&t.append("temperature",k),h.includes("prompt")&&v&&t.append("prompt",v);let s=await fetch((0,S.O)("/v1/audio/transcriptions"),{method:"POST",body:t});D(Date.now()-e);let a=(s.headers.get("content-type")||"").includes("application/json")?await s.json():await s.text();if(!s.ok)return void F(a?.error?.message||a?.error||a||`HTTP ${s.status}`);I(a)}catch(e){F(e.message||"Network error")}finally{U(!1)}},Q="string"==typeof A?A:A?JSON.stringify(A,null,2):`{
58
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)($,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>p(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>p(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)($,{label:"Endpoint",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.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[H,"/v1/audio/transcriptions"]}),P&&(0,a.jsxs)("button",{onClick:()=>E(e=>!e),title:_?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${_?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{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:(0,a.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),(0,a.jsx)($,{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=>f(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),b&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[b.name," \xb7 ",(b.size/1024).toFixed(1)," KB"]})]})}),h.includes("language")&&(0,a.jsx)($,{label:"Language",children:(0,a.jsx)("input",{value:g,onChange:e=>y(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),h.includes("prompt")&&(0,a.jsx)($,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("temperature")&&(0,a.jsx)($,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:k,onChange:e=>C(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("response_format")&&(0,a.jsx)($,{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:()=>J(G),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:q?"check":"content_copy"}),q?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:Y,disabled:K||!b||!W,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:K?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),K?"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:G})]}),B&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:B}),(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 ",I&&L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),I&&(0,a.jsxs)("button",{onClick:()=>V(Q),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:z?"check":"content_copy"}),z?"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:Q})]})]})]})}function L(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),u=(0,c.gC)(t)&&"embedding"===e,m=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[p,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(u),[f,g]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!u)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,u]),!o)return(0,r.notFound)();let v=c.Q2[t],j=u?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!u&&!v||u&&!h&&!p)return(0,r.notFound)();if(u&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=u?["embedding"]:j.serviceKinds??["llm"];return u||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:`${j.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${j.id}.png`,alt:j.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:j.textIcon||j.id.slice(0,2).toUpperCase(),fallbackColor:j.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:j.name}),!u&&j.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:j.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:[u&&(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))]})]}),u&&(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:()=>g(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:m,children:"Delete"})]})]})]}),!u&&j.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:j.kindNotice[e]})]}),!u&&j.notice?.text&&!j.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:j.notice.text}),j.notice.apiKeyUrl&&(0,a.jsx)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!u&&j.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(y,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(w,{providerId:t,kindFilter:e,providerAliasOverride:u?p?.prefix:void 0}),!u&&(j.searchConfig||j.fetchConfig||j.ttsConfig||j.sttConfig||j.embeddingConfig||j.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?j.fetchConfig:"tts"===e?j.ttsConfig:"stt"===e?j.sttConfig:"embedding"===e?j.embeddingConfig:j.searchConfig||{mode:"chat-completions",defaultModel:j.searchViaChat?.defaultModel,pricingUrl:j.searchViaChat?.pricingUrl,freeTier:j.searchViaChat?.freeTier},provider:j,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(A,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(I,{providerId:t}),"stt"===e&&!u&&(0,a.jsx)(M,{providerId:t}),!u&&P[e]&&(0,a.jsx)(R,{providerId:t,kind:e}),u&&(0,a.jsx)(i.x0,{isOpen:f,node:p,onClose:()=>g(!1),onSaved:e=>{x(e),g(!1)}})]}):(0,r.notFound)()}}},e=>{e.O(0,[2574,3862,3745,9802,620,5497,8441,3794,7358],()=>e(e.s=54909)),_N_E=e.O()}]);
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)($,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>p(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>p(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)($,{label:"Endpoint",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.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[H,"/v1/audio/transcriptions"]}),O&&(0,a.jsxs)("button",{onClick:()=>T(e=>!e),title:_?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${_?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{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:(0,a.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),(0,a.jsx)($,{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=>f(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),b&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[b.name," \xb7 ",(b.size/1024).toFixed(1)," KB"]})]})}),h.includes("language")&&(0,a.jsx)($,{label:"Language",children:(0,a.jsx)("input",{value:g,onChange:e=>y(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),h.includes("prompt")&&(0,a.jsx)($,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("temperature")&&(0,a.jsx)($,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:k,onChange:e=>C(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("response_format")&&(0,a.jsx)($,{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:()=>J(G),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:q?"check":"content_copy"}),q?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:Y,disabled:K||!b||!W,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:K?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),K?"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:G})]}),B&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:B}),(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 ",A&&L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),A&&(0,a.jsxs)("button",{onClick:()=>V(Q),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:z?"check":"content_copy"}),z?"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:Q})]})]})]})}function L(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),u=(0,c.gC)(t)&&"embedding"===e,m=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[p,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(u),[f,g]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!u)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,u]),!o)return(0,r.notFound)();let v=c.Q2[t],j=u?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!u&&!v||u&&!h&&!p)return(0,r.notFound)();if(u&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=u?["embedding"]:j.serviceKinds??["llm"];return u||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:`${j.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${j.id}.png`,alt:j.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:j.textIcon||j.id.slice(0,2).toUpperCase(),fallbackColor:j.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:j.name}),!u&&j.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:j.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:[u&&(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))]})]}),u&&(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:()=>g(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:m,children:"Delete"})]})]})]}),!u&&j.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:j.kindNotice[e]})]}),!u&&j.notice?.text&&!j.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:j.notice.text}),j.notice.apiKeyUrl&&(0,a.jsx)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!u&&j.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(y,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(w,{providerId:t,kindFilter:e,providerAliasOverride:u?p?.prefix:void 0}),!u&&(j.searchConfig||j.fetchConfig||j.ttsConfig||j.sttConfig||j.embeddingConfig||j.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?j.fetchConfig:"tts"===e?j.ttsConfig:"stt"===e?j.sttConfig:"embedding"===e?j.embeddingConfig:j.searchConfig||{mode:"chat-completions",defaultModel:j.searchViaChat?.defaultModel,pricingUrl:j.searchViaChat?.pricingUrl,freeTier:j.searchViaChat?.freeTier},provider:j,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(P,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(A,{providerId:t}),"stt"===e&&!u&&(0,a.jsx)(M,{providerId:t}),!u&&O[e]&&(0,a.jsx)(I,{providerId:t,kind:e}),u&&(0,a.jsx)(i.x0,{isOpen:f,node:p,onClose:()=>g(!1),onSaved:e=>{x(e),g(!1)}})]}):(0,r.notFound)()}}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=54909)),_N_E=e.O()}]);
@@ -1 +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:()=>f});var i=t(95155),r=t(73321),a=t(98500),n=t.n(a),o=t(12115),l=t(35497),c=t(57250),d=t(52679);let m=new Set([]),x={image:"image-combo",tts:"tts-combo"};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 p({provider:e,kind:s,connections:t,isCustom:r,onToggle:a}){let o=d.Q2[e.id],m=!!o?.noAuth,x=t.filter(s=>s.provider===e.id),u=x.filter(e=>{let s=h(e);return"active"===s||"success"===s}).length,f=x.filter(e=>{let s=h(e);return"error"===s||"expired"===s||"unavailable"===s}).length,g=x.length,j=g>0&&x.every(e=>!1===e.isActive);return(0,i.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,i.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${j?"opacity-50":""}`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.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,i.jsx)(c.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,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[r&&(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),m?(0,i.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):j?(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===g?(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,i.jsxs)(i.Fragment,{children:[u>0&&(0,i.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[u," Connected"]}),f>0&&(0,i.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[f," Error"]}),0===u&&0===f&&(0,i.jsxs)(l.Ex,{variant:"default",size:"sm",children:[g," Added"]})]})]})]})]}),g>0&&(0,i.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),a&&a(e.id,j)},children:(0,i.jsx)(l.lM,{size:"sm",checked:!j,onChange:()=>{},title:j?"Enable provider":"Disable provider"})})]})})})}function u({combos:e}){return 0===e.length?null:(0,i.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,i.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,i.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,i.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,i.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]:"",r=d.Q2[t];return(0,i.jsx)("div",{title:r?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${r?.color??"#888"}15`},children:(0,i.jsx)(c.A,{src:`/providers/${t}.png`,alt:r?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:r?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:r?.color})},`${e}-${s}`)}),e.models.length>6&&(0,i.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,i.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function f(){let{kind:e}=(0,r.useParams)(),s=(0,r.useRouter)(),[t,a]=(0,o.useState)([]),[n,c]=(0,o.useState)([]),[h,f]=(0,o.useState)([]),[g,j]=(0,o.useState)(!1);(0,o.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&s.replace("/dashboard/media-providers/web")},[e,s]);let b=d.rj.find(s=>s.id===e),v="embedding"===e,N=m.has(e);if((0,o.useEffect)(()=>{b&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>a(e.connections||[])).catch(()=>{}),v&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>c((e.nodes||[]).filter(e=>"custom-embedding"===e.type))).catch(()=>{}),N&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>f(e.combos||[])).catch(()=>{}))},[v,N,b]),!b)return(0,r.notFound)();let y=(0,d.o5)(e),k=h.filter(s=>s.kind===e),w=n.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),C=[...y,...w],$=async(e,s)=>{let i=t.filter(s=>s.provider===e);a(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),await Promise.allSettled(i.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},E=async()=>{let t=x[e]||`${e}-combo`,i=t,r=1,a=new Set(h.map(e=>e.name));for(;a.has(i);)i=`${t}-${r++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,models:[],kind:e})});if(n.ok){let e=await n.json();s.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await n.json()).error||"Failed to create combo")};return(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(v||N)&&(0,i.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[N&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:E,children:"Create Combo"}),v&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>j(!0),children:"Add Custom Embedding"})]}),N&&k.length>0&&(0,i.jsx)(u,{combos:k}),0===C.length?(0,i.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,i.jsx)("strong",{children:b.label})," yet."]}):(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[y.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,onToggle:$},s.id)),w.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,isCustom:!0,onToggle:$},s.id))]}),v&&(0,i.jsx)(l.x0,{isOpen:g,onClose:()=>j(!1),onCreated:e=>{c(s=>[...s,e]),j(!1)}})]})}},79069:(e,s,t)=>{Promise.resolve().then(t.bind(t,16144))}},e=>{e.O(0,[2574,3862,3745,9802,620,5497,8441,3794,7358],()=>e(e.s=79069)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>f});var i=t(95155),r=t(73321),a=t(98500),n=t.n(a),o=t(12115),l=t(35497),c=t(57250),d=t(52679);let m=new Set([]),x={image:"image-combo",tts:"tts-combo"};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 p({provider:e,kind:s,connections:t,isCustom:r,onToggle:a}){let o=d.Q2[e.id],m=!!o?.noAuth,x=t.filter(s=>s.provider===e.id),u=x.filter(e=>{let s=h(e);return"active"===s||"success"===s}).length,f=x.filter(e=>{let s=h(e);return"error"===s||"expired"===s||"unavailable"===s}).length,g=x.length,j=g>0&&x.every(e=>!1===e.isActive);return(0,i.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,i.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${j?"opacity-50":""}`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.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,i.jsx)(c.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,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[r&&(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),m?(0,i.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):j?(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===g?(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,i.jsxs)(i.Fragment,{children:[u>0&&(0,i.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[u," Connected"]}),f>0&&(0,i.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[f," Error"]}),0===u&&0===f&&(0,i.jsxs)(l.Ex,{variant:"default",size:"sm",children:[g," Added"]})]})]})]})]}),g>0&&(0,i.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),a&&a(e.id,j)},children:(0,i.jsx)(l.lM,{size:"sm",checked:!j,onChange:()=>{},title:j?"Enable provider":"Disable provider"})})]})})})}function u({combos:e}){return 0===e.length?null:(0,i.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,i.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,i.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,i.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,i.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]:"",r=d.Q2[t];return(0,i.jsx)("div",{title:r?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${r?.color??"#888"}15`},children:(0,i.jsx)(c.A,{src:`/providers/${t}.png`,alt:r?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:r?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:r?.color})},`${e}-${s}`)}),e.models.length>6&&(0,i.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,i.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function f(){let{kind:e}=(0,r.useParams)(),s=(0,r.useRouter)(),[t,a]=(0,o.useState)([]),[n,c]=(0,o.useState)([]),[h,f]=(0,o.useState)([]),[g,j]=(0,o.useState)(!1);(0,o.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&s.replace("/dashboard/media-providers/web")},[e,s]);let b=d.rj.find(s=>s.id===e),v="embedding"===e,N=m.has(e);if((0,o.useEffect)(()=>{b&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>a(e.connections||[])).catch(()=>{}),v&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>c((e.nodes||[]).filter(e=>"custom-embedding"===e.type))).catch(()=>{}),N&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>f(e.combos||[])).catch(()=>{}))},[v,N,b]),!b)return(0,r.notFound)();let y=(0,d.o5)(e),k=h.filter(s=>s.kind===e),w=n.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),C=[...y,...w],$=async(e,s)=>{let i=t.filter(s=>s.provider===e);a(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),(await Promise.allSettled(i.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e})))).some(e=>"rejected"===e.status)&&a(t=>t.map(t=>t.provider===e?{...t,isActive:!s}:t))},E=async()=>{let t=x[e]||`${e}-combo`,i=t,r=1,a=new Set(h.map(e=>e.name));for(;a.has(i);)i=`${t}-${r++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,models:[],kind:e})});if(n.ok){let e=await n.json();s.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await n.json()).error||"Failed to create combo")};return(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(v||N)&&(0,i.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[N&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:E,children:"Create Combo"}),v&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>j(!0),children:"Add Custom Embedding"})]}),N&&k.length>0&&(0,i.jsx)(u,{combos:k}),0===C.length?(0,i.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,i.jsx)("strong",{children:b.label})," yet."]}):(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[y.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,onToggle:$},s.id)),w.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,isCustom:!0,onToggle:$},s.id))]}),v&&(0,i.jsx)(l.x0,{isOpen:g,onClose:()=>j(!1),onCreated:e=>{c(s=>[...s,e]),j(!1)}})]})}},79069:(e,s,t)=>{Promise.resolve().then(t.bind(t,16144))}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=79069)),_N_E=e.O()}]);