vansrouter 0.7.8 → 0.8.2

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 (795) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +11 -11
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/react-loadable-manifest.json +4 -4
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +4 -4
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +5 -5
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  75. package/app/.next-cli-build/server/app/_global-error.rsc +2 -2
  76. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +2 -2
  77. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +2 -2
  82. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  83. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  86. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  87. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  88. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
  90. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  93. package/app/.next-cli-build/server/app/api/auth/check/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  102. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  104. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  107. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  113. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  115. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  117. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  121. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  125. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  127. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  129. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  221. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  235. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/usage/request-details/[id]/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  263. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  294. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  296. package/app/.next-cli-build/server/app/callback.html +1 -1
  297. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  298. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  299. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  300. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
  301. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  302. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  303. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  304. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  305. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  306. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  307. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  308. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  309. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  310. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  311. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  312. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
  313. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  314. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  315. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  316. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  317. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  318. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  319. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  320. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  321. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  322. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
  323. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  324. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  325. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  326. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  327. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  328. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  329. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  330. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  331. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  332. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
  333. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  334. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  335. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  336. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  337. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  338. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  339. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  340. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  341. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  342. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
  343. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  344. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  345. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  346. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  347. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  348. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  349. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  350. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  351. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  352. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  353. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
  354. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  355. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  356. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  357. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  358. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  359. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  360. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  361. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  362. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  363. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
  364. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  365. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  366. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  367. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  368. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  369. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  370. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  371. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  372. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
  374. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  375. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  376. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  377. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  378. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  379. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  380. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  381. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  382. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  383. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  384. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
  385. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  386. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  387. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  388. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  389. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  390. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  391. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  392. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  393. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  394. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
  395. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  396. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  398. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  399. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  400. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  401. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  402. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  403. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
  405. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  406. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  407. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  408. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  409. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  410. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  412. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  413. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
  415. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  416. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  421. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  422. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
  424. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  425. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  427. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  431. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  432. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  435. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  436. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  437. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
  438. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  439. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  440. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  441. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  442. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  445. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  446. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  447. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
  448. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  449. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  451. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  452. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  453. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  455. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  456. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
  458. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  459. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  461. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  462. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  464. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  465. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  466. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  467. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
  468. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  469. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  470. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  471. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  472. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  473. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  475. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
  477. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  478. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  480. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  482. package/app/.next-cli-build/server/app/landing.html +1 -1
  483. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  484. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  485. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
  487. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  488. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  490. package/app/.next-cli-build/server/app/login/page.js +1 -1
  491. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  493. package/app/.next-cli-build/server/app/login.html +1 -1
  494. package/app/.next-cli-build/server/app/login.rsc +6 -6
  495. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  496. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
  498. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  500. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  502. package/app/.next-cli-build/server/app/masuk/page.js +1 -1
  503. package/app/.next-cli-build/server/app/masuk/page.js.nft.json +1 -1
  504. package/app/.next-cli-build/server/app/masuk/page_client-reference-manifest.js +1 -1
  505. package/app/.next-cli-build/server/app-paths-manifest.json +11 -11
  506. package/app/.next-cli-build/server/chunks/1253.js +1 -1
  507. package/app/.next-cli-build/server/chunks/1536.js +1 -1
  508. package/app/.next-cli-build/server/chunks/2365.js +1 -1
  509. package/app/.next-cli-build/server/chunks/2554.js +4 -4
  510. package/app/.next-cli-build/server/chunks/2557.js +1 -1
  511. package/app/.next-cli-build/server/chunks/3424.js +1 -1
  512. package/app/.next-cli-build/server/chunks/383.js +1 -1
  513. package/app/.next-cli-build/server/chunks/4004.js +1 -1
  514. package/app/.next-cli-build/server/chunks/4029.js +1 -1
  515. package/app/.next-cli-build/server/chunks/403.js +1 -1
  516. package/app/.next-cli-build/server/chunks/404.js +1 -0
  517. package/app/.next-cli-build/server/chunks/4105.js +1 -1
  518. package/app/.next-cli-build/server/chunks/4418.js +1 -1
  519. package/app/.next-cli-build/server/chunks/4544.js +1 -1
  520. package/app/.next-cli-build/server/chunks/4574.js +2 -2
  521. package/app/.next-cli-build/server/chunks/5006.js +2 -2
  522. package/app/.next-cli-build/server/chunks/5204.js +4 -4
  523. package/app/.next-cli-build/server/chunks/5577.js +1 -1
  524. package/app/.next-cli-build/server/chunks/5598.js +1 -1
  525. package/app/.next-cli-build/server/chunks/6159.js +1 -1
  526. package/app/.next-cli-build/server/chunks/6723.js +1 -1
  527. package/app/.next-cli-build/server/chunks/6850.js +1 -0
  528. package/app/.next-cli-build/server/chunks/7916.js +1 -1
  529. package/app/.next-cli-build/server/chunks/818.js +1 -1
  530. package/app/.next-cli-build/server/chunks/8711.js +1 -1
  531. package/app/.next-cli-build/server/chunks/9294.js +9 -0
  532. package/app/.next-cli-build/server/chunks/9614.js +1 -1
  533. package/app/.next-cli-build/server/chunks/9984.js +1 -1
  534. package/app/.next-cli-build/server/instrumentation.js +1 -1
  535. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  536. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  537. package/app/.next-cli-build/server/pages/404.html +1 -1
  538. package/app/.next-cli-build/server/pages/500.html +1 -1
  539. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  540. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  541. package/app/.next-cli-build/static/chunks/{1049.3def0dd7804a4e6e.js → 1049.fe7b80c5fc82d475.js} +1 -1
  542. package/app/.next-cli-build/static/chunks/3700-6d19ded215c07e78.js +23 -0
  543. package/app/.next-cli-build/static/chunks/4385-3e455409e9263c2e.js +1 -0
  544. package/app/.next-cli-build/static/chunks/497-a4efc19d4e6d5742.js +1 -0
  545. package/app/.next-cli-build/static/chunks/5316-26a9be2b5b340adb.js +31 -0
  546. package/app/.next-cli-build/static/chunks/5737-d18fc416e283bc11.js +1 -0
  547. package/app/.next-cli-build/static/chunks/{9078.7b8723a1eed306a9.js → 9078.a9009d83d98ff33c.js} +2 -2
  548. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-33b2a2889f8a6c95.js → page-13a7a53439c201d2.js} +4 -4
  549. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-91b12eb7fe88deb4.js +1 -0
  550. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-9caaf0fd0cbd7132.js +4 -0
  551. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-6544624e09f8231b.js +1 -0
  552. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-8af6425bd1f2dff0.js → page-794575f7237c2fd7.js} +1 -1
  553. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-bb2e059c3f3dc49d.js → page-915b307dffadd9e1.js} +1 -1
  554. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-9b704f6f5e9d5617.js +1 -0
  555. package/app/.next-cli-build/static/chunks/app/landing/page-6c0d2c845c953827.js +1 -0
  556. package/app/.next-cli-build/static/chunks/webpack-213376c75275a9d9.js +1 -0
  557. package/app/.next-cli-build/static/css/beef0e694f607395.css +1 -0
  558. package/app/package.json +1 -1
  559. package/app/public/providers/agentrouter.webp +0 -0
  560. package/app/public/providers/alicode-intl.webp +0 -0
  561. package/app/public/providers/alicode.webp +0 -0
  562. package/app/public/providers/amp.webp +0 -0
  563. package/app/public/providers/anthropic-m.webp +0 -0
  564. package/app/public/providers/anthropic.webp +0 -0
  565. package/app/public/providers/antigravity.webp +0 -0
  566. package/app/public/providers/assemblyai.webp +0 -0
  567. package/app/public/providers/aws-polly.webp +0 -0
  568. package/app/public/providers/azure.webp +0 -0
  569. package/app/public/providers/black-forest-labs.webp +0 -0
  570. package/app/public/providers/blackbox.webp +0 -0
  571. package/app/public/providers/brave-search.webp +0 -0
  572. package/app/public/providers/byteplus.webp +0 -0
  573. package/app/public/providers/cartesia.webp +0 -0
  574. package/app/public/providers/cerebras.webp +0 -0
  575. package/app/public/providers/chutes.webp +0 -0
  576. package/app/public/providers/claude.webp +0 -0
  577. package/app/public/providers/cline.webp +0 -0
  578. package/app/public/providers/cloudflare-ai.webp +0 -0
  579. package/app/public/providers/codebuddy-cn.webp +0 -0
  580. package/app/public/providers/codex.webp +0 -0
  581. package/app/public/providers/cohere.webp +0 -0
  582. package/app/public/providers/comfyui.webp +0 -0
  583. package/app/public/providers/commandcode.webp +0 -0
  584. package/app/public/providers/continue.webp +0 -0
  585. package/app/public/providers/copilot.webp +0 -0
  586. package/app/public/providers/coqui.webp +0 -0
  587. package/app/public/providers/cursor.webp +0 -0
  588. package/app/public/providers/deepgram.webp +0 -0
  589. package/app/public/providers/deepseek-tui.webp +0 -0
  590. package/app/public/providers/deepseek.webp +0 -0
  591. package/app/public/providers/droid.webp +0 -0
  592. package/app/public/providers/edge-tts.webp +0 -0
  593. package/app/public/providers/elevenlabs.webp +0 -0
  594. package/app/public/providers/exa.webp +0 -0
  595. package/app/public/providers/fal-ai.webp +0 -0
  596. package/app/public/providers/firecrawl.webp +0 -0
  597. package/app/public/providers/fireworks.webp +0 -0
  598. package/app/public/providers/gemini-cli.webp +0 -0
  599. package/app/public/providers/gemini.webp +0 -0
  600. package/app/public/providers/gigachat.webp +0 -0
  601. package/app/public/providers/github.webp +0 -0
  602. package/app/public/providers/glm-cn.webp +0 -0
  603. package/app/public/providers/glm.webp +0 -0
  604. package/app/public/providers/google-pse.webp +0 -0
  605. package/app/public/providers/google-tts.webp +0 -0
  606. package/app/public/providers/grok-web.webp +0 -0
  607. package/app/public/providers/groq.webp +0 -0
  608. package/app/public/providers/hermes.webp +0 -0
  609. package/app/public/providers/heroku.webp +0 -0
  610. package/app/public/providers/huggingface.webp +0 -0
  611. package/app/public/providers/hyperbolic.webp +0 -0
  612. package/app/public/providers/iflow.webp +0 -0
  613. package/app/public/providers/inworld.webp +0 -0
  614. package/app/public/providers/jcode.webp +0 -0
  615. package/app/public/providers/jina-ai.webp +0 -0
  616. package/app/public/providers/jina-reader.webp +0 -0
  617. package/app/public/providers/kilocode.webp +0 -0
  618. package/app/public/providers/kimchi.webp +0 -0
  619. package/app/public/providers/kimi-coding.webp +0 -0
  620. package/app/public/providers/kimi.webp +0 -0
  621. package/app/public/providers/kiro.webp +0 -0
  622. package/app/public/providers/linkup.webp +0 -0
  623. package/app/public/providers/llamagate.webp +0 -0
  624. package/app/public/providers/local-device.webp +0 -0
  625. package/app/public/providers/mimo-free.webp +0 -0
  626. package/app/public/providers/minimax-cn.webp +0 -0
  627. package/app/public/providers/minimax.webp +0 -0
  628. package/app/public/providers/mistral.webp +0 -0
  629. package/app/public/providers/nanobanana.webp +0 -0
  630. package/app/public/providers/nanogpt.webp +0 -0
  631. package/app/public/providers/nebius.webp +0 -0
  632. package/app/public/providers/nscale.webp +0 -0
  633. package/app/public/providers/nvidia.webp +0 -0
  634. package/app/public/providers/oai-cc.webp +0 -0
  635. package/app/public/providers/oai-r.webp +0 -0
  636. package/app/public/providers/ollama-local.webp +0 -0
  637. package/app/public/providers/ollama.webp +0 -0
  638. package/app/public/providers/openai.webp +0 -0
  639. package/app/public/providers/openclaw.webp +0 -0
  640. package/app/public/providers/opencode-go.webp +0 -0
  641. package/app/public/providers/opencode.webp +0 -0
  642. package/app/public/providers/openrouter.webp +0 -0
  643. package/app/public/providers/ovhcloud.webp +0 -0
  644. package/app/public/providers/perplexity-web.webp +0 -0
  645. package/app/public/providers/perplexity.webp +0 -0
  646. package/app/public/providers/playht.webp +0 -0
  647. package/app/public/providers/predibase.webp +0 -0
  648. package/app/public/providers/qoder.webp +0 -0
  649. package/app/public/providers/qwen.webp +0 -0
  650. package/app/public/providers/recraft.webp +0 -0
  651. package/app/public/providers/roo.webp +0 -0
  652. package/app/public/providers/runwayml.webp +0 -0
  653. package/app/public/providers/sdwebui.webp +0 -0
  654. package/app/public/providers/searchapi.webp +0 -0
  655. package/app/public/providers/searxng.webp +0 -0
  656. package/app/public/providers/serper.webp +0 -0
  657. package/app/public/providers/siliconflow.webp +0 -0
  658. package/app/public/providers/stability-ai.webp +0 -0
  659. package/app/public/providers/tavily.webp +0 -0
  660. package/app/public/providers/together.webp +0 -0
  661. package/app/public/providers/topaz.webp +0 -0
  662. package/app/public/providers/tortoise.webp +0 -0
  663. package/app/public/providers/vertex-partner.webp +0 -0
  664. package/app/public/providers/vertex.webp +0 -0
  665. package/app/public/providers/volcengine-ark.webp +0 -0
  666. package/app/public/providers/voyage-ai.webp +0 -0
  667. package/app/public/providers/xai.webp +0 -0
  668. package/app/public/providers/xiaomi-mimo.webp +0 -0
  669. package/app/public/providers/xiaomi-tokenplan.webp +0 -0
  670. package/app/public/providers/youcom.webp +0 -0
  671. package/app/public/providers/zcode.webp +0 -0
  672. package/package.json +1 -1
  673. package/app/.next-cli-build/server/chunks/3133.js +0 -1
  674. package/app/.next-cli-build/server/chunks/5290.js +0 -1
  675. package/app/.next-cli-build/server/chunks/6955.js +0 -9
  676. package/app/.next-cli-build/static/chunks/3700-507d735bbeafc1f1.js +0 -23
  677. package/app/.next-cli-build/static/chunks/4385-e7386da5593047d9.js +0 -1
  678. package/app/.next-cli-build/static/chunks/497-e70e37c356d2ad24.js +0 -1
  679. package/app/.next-cli-build/static/chunks/5316-fff7784e40086b07.js +0 -31
  680. package/app/.next-cli-build/static/chunks/5737-db655a51294730ae.js +0 -1
  681. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-bbef1a0c34a9ee9e.js +0 -1
  682. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-a10e1f3c70f5ab7f.js +0 -4
  683. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-6aa26f4fba64b6d2.js +0 -1
  684. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-24d2ff6ef38b5076.js +0 -1
  685. package/app/.next-cli-build/static/chunks/app/landing/page-29ecb0d5c302e58c.js +0 -1
  686. package/app/.next-cli-build/static/chunks/webpack-79b65541449c3a45.js +0 -1
  687. package/app/.next-cli-build/static/css/1fc10f069b479895.css +0 -1
  688. package/app/public/providers/agentrouter.png +0 -0
  689. package/app/public/providers/alicode-intl.png +0 -0
  690. package/app/public/providers/alicode.png +0 -0
  691. package/app/public/providers/amp.png +0 -0
  692. package/app/public/providers/anthropic-m.png +0 -0
  693. package/app/public/providers/anthropic.png +0 -0
  694. package/app/public/providers/antigravity.png +0 -0
  695. package/app/public/providers/assemblyai.png +0 -0
  696. package/app/public/providers/aws-polly.png +0 -0
  697. package/app/public/providers/azure.png +0 -0
  698. package/app/public/providers/black-forest-labs.png +0 -0
  699. package/app/public/providers/blackbox.png +0 -0
  700. package/app/public/providers/brave-search.png +0 -0
  701. package/app/public/providers/byteplus.png +0 -0
  702. package/app/public/providers/cartesia.png +0 -0
  703. package/app/public/providers/cerebras.png +0 -0
  704. package/app/public/providers/chutes.png +0 -0
  705. package/app/public/providers/claude.png +0 -0
  706. package/app/public/providers/cline.png +0 -0
  707. package/app/public/providers/cloudflare-ai.png +0 -0
  708. package/app/public/providers/codebuddy-cn.png +0 -0
  709. package/app/public/providers/codex.png +0 -0
  710. package/app/public/providers/cohere.png +0 -0
  711. package/app/public/providers/comfyui.png +0 -0
  712. package/app/public/providers/commandcode.png +0 -0
  713. package/app/public/providers/continue.png +0 -0
  714. package/app/public/providers/copilot.png +0 -0
  715. package/app/public/providers/coqui.png +0 -0
  716. package/app/public/providers/cursor.png +0 -0
  717. package/app/public/providers/deepgram.png +0 -0
  718. package/app/public/providers/deepseek-tui.png +0 -0
  719. package/app/public/providers/deepseek.png +0 -0
  720. package/app/public/providers/droid.png +0 -0
  721. package/app/public/providers/edge-tts.png +0 -0
  722. package/app/public/providers/elevenlabs.png +0 -0
  723. package/app/public/providers/exa.png +0 -0
  724. package/app/public/providers/fal-ai.png +0 -0
  725. package/app/public/providers/firecrawl.png +0 -0
  726. package/app/public/providers/fireworks.png +0 -0
  727. package/app/public/providers/gemini-cli.png +0 -0
  728. package/app/public/providers/gemini.png +0 -0
  729. package/app/public/providers/github.png +0 -0
  730. package/app/public/providers/glm-cn.png +0 -0
  731. package/app/public/providers/glm.png +0 -0
  732. package/app/public/providers/google-pse.png +0 -0
  733. package/app/public/providers/google-tts.png +0 -0
  734. package/app/public/providers/grok-web.png +0 -0
  735. package/app/public/providers/groq.png +0 -0
  736. package/app/public/providers/hermes.png +0 -0
  737. package/app/public/providers/huggingface.png +0 -0
  738. package/app/public/providers/hyperbolic.png +0 -0
  739. package/app/public/providers/iflow.png +0 -0
  740. package/app/public/providers/inworld.png +0 -0
  741. package/app/public/providers/jcode.png +0 -0
  742. package/app/public/providers/jina-ai.png +0 -0
  743. package/app/public/providers/jina-reader.png +0 -0
  744. package/app/public/providers/kilocode.png +0 -0
  745. package/app/public/providers/kimchi.png +0 -0
  746. package/app/public/providers/kimi-coding.png +0 -0
  747. package/app/public/providers/kimi.png +0 -0
  748. package/app/public/providers/kiro.png +0 -0
  749. package/app/public/providers/linkup.png +0 -0
  750. package/app/public/providers/local-device.png +0 -0
  751. package/app/public/providers/mimo-free.png +0 -0
  752. package/app/public/providers/minimax-cn.png +0 -0
  753. package/app/public/providers/minimax.png +0 -0
  754. package/app/public/providers/mistral.png +0 -0
  755. package/app/public/providers/nanobanana.png +0 -0
  756. package/app/public/providers/nebius.png +0 -0
  757. package/app/public/providers/nvidia.png +0 -0
  758. package/app/public/providers/oai-cc.png +0 -0
  759. package/app/public/providers/oai-r.png +0 -0
  760. package/app/public/providers/ollama-local.png +0 -0
  761. package/app/public/providers/ollama.png +0 -0
  762. package/app/public/providers/openai.png +0 -0
  763. package/app/public/providers/openclaw.png +0 -0
  764. package/app/public/providers/opencode-go.png +0 -0
  765. package/app/public/providers/opencode.png +0 -0
  766. package/app/public/providers/openrouter.png +0 -0
  767. package/app/public/providers/perplexity-web.png +0 -0
  768. package/app/public/providers/perplexity.png +0 -0
  769. package/app/public/providers/playht.png +0 -0
  770. package/app/public/providers/qoder.png +0 -0
  771. package/app/public/providers/qwen.png +0 -0
  772. package/app/public/providers/recraft.png +0 -0
  773. package/app/public/providers/roo.png +0 -0
  774. package/app/public/providers/runwayml.png +0 -0
  775. package/app/public/providers/sdwebui.png +0 -0
  776. package/app/public/providers/searchapi.png +0 -0
  777. package/app/public/providers/searxng.png +0 -0
  778. package/app/public/providers/serper.png +0 -0
  779. package/app/public/providers/siliconflow.png +0 -0
  780. package/app/public/providers/stability-ai.png +0 -0
  781. package/app/public/providers/tavily.png +0 -0
  782. package/app/public/providers/together.png +0 -0
  783. package/app/public/providers/topaz.png +0 -0
  784. package/app/public/providers/tortoise.png +0 -0
  785. package/app/public/providers/vertex-partner.png +0 -0
  786. package/app/public/providers/vertex.png +0 -0
  787. package/app/public/providers/volcengine-ark.png +0 -0
  788. package/app/public/providers/voyage-ai.png +0 -0
  789. package/app/public/providers/xai.png +0 -0
  790. package/app/public/providers/xiaomi-mimo.png +0 -0
  791. package/app/public/providers/xiaomi-tokenplan.png +0 -0
  792. package/app/public/providers/youcom.png +0 -0
  793. package/app/public/providers/zcode.png +0 -0
  794. /package/app/.next-cli-build/static/{GKLmZnKWr8SmNlRLjgypS → s3-GQm3AGLpboXygnZn-r}/_buildManifest.js +0 -0
  795. /package/app/.next-cli-build/static/{GKLmZnKWr8SmNlRLjgypS → s3-GQm3AGLpboXygnZn-r}/_ssgManifest.js +0 -0
@@ -1,7 +1,7 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9078],{9078:(e,t,r)=>{r.r(t),r.d(t,{default:()=>p});var a=r(5102),s=r(2030),l=r(7665),i=r(1704),n=r(4260),o=r(5737),m=r(5223),d=r(1038);let c=[...Object.keys(d.zN),...Object.keys(d.IS),...Object.keys(d.nJ),...Object.keys(d.fg)],u=Object.keys(d.IS).filter(e=>d.IS[e].noAuth);function p({isOpen:e,onClose:t,onSelect:r,onDeselect:h,selectedModel:x,activeProviders:f=[],title:b="Select Model",modelAliases:v={},kindFilter:g=null,addedModelValues:j=[],closeOnSelect:y=!0}){let C=(0,s.useMemo)(()=>g?f.filter(e=>{let t=d.Q2[e.provider];return(t?.serviceKinds||["llm"]).includes(g)}):f,[f,g]),{getCaps:$}=(0,o.y)(),[N,w]=(0,s.useState)(""),[k,S]=(0,s.useState)([]),[P,E]=(0,s.useState)([]),[O,T]=(0,s.useState)([]),[_,z]=(0,s.useState)({});(0,s.useEffect)(()=>{if(!e)return;let t=!1;return fetch("/api/combos").then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{t||S(e.combos||[])}).catch(e=>{console.error("Error fetching combos:",e),t||S([])}),()=>{t=!0}},[e]),(0,s.useEffect)(()=>{if(!e)return;let t=!1;return fetch("/api/provider-nodes").then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{t||E(e.nodes||[])}).catch(e=>{console.error("Error fetching provider nodes:",e),t||E([])}),()=>{t=!0}},[e]),(0,s.useEffect)(()=>{if(!e)return;let t=!1;return fetch("/api/models/custom").then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{t||T(e.models||[])}).catch(e=>{console.error("Error fetching custom models:",e),t||T([])}),()=>{t=!0}},[e]),(0,s.useEffect)(()=>{if(!e)return;let t=!1;return fetch("/api/models/disabled").then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{t||z(e.disabled||{})}).catch(e=>{console.error("Error fetching disabled models:",e),t||z({})}),()=>{t=!0}},[e]);let A=(0,s.useMemo)(()=>({...d.zN,...d.IS,...d.nJ,...d.fg}),[]),M=(0,s.useMemo)(()=>{let e={},t=new Set(["webSearch","webFetch"]),r=new Set(["image","tts","stt","embedding","imageToText"]),a=new Set(["tts","image","webFetch"]);return[...new Set([...C.map(e=>e.provider),...g?u.filter(e=>(d.Q2[e]?.serviceKinds||["llm"]).includes(g)):u])].sort((e,t)=>{let r=c.indexOf(e),a=c.indexOf(t);return(-1===r?999:r)-(-1===a?999:a)}).forEach(s=>{let l=(0,d.wG)(s),i=A[s]||{name:s,color:"#666"},n=(0,d.mq)(s)||(0,d.gb)(s);if(g&&t.has(g)){e[s]={name:i.name,alias:l,color:i.color,models:[{id:s,name:i.name,value:s}]};return}if(i.passthroughModels){let t=Object.entries(v).filter(([,e])=>e.startsWith(`${l}/`)).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t})),n=O.filter(e=>e.providerAlias===l).map(e=>({id:e.id,name:e.name||e.id,value:`${l}/${e.id}`,kind:(0,m.CP)(e),isCustom:!0})),o=t;if(g&&r.has(g)){let e=n.filter(e=>(0,m.CP)(e)===g);0===(o=[...e,...(0,m.KC)(s).filter(e=>(0,m.CP)(e)===g).map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,kind:(0,m.CP)(e)})).filter(t=>!e.some(e=>e.value===t.value))]).length&&a.has(g)&&(i.serviceKinds||["llm"]).includes(g)&&(o=[{id:s,name:i.name,value:l}])}else{let e=n.filter(e=>!(0,m.CP)(e)||"llm"===(0,m.CP)(e)),r=new Set([...t,...e].map(e=>e.value)),a=(0,m.KC)(s).filter(e=>!(0,m.CP)(e)||"llm"===(0,m.CP)(e)).map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,kind:(0,m.CP)(e)})).filter(e=>!r.has(e.value));o=[...e,...t.filter(t=>!e.some(e=>e.value===t.value)),...a]}if(o.length>0){let t=P.find(e=>e.id===s),r=t?.name||i.name;e[s]={name:r,alias:l,color:i.color,models:o}}}else if(n){if(g&&r.has(g))return;let t=f.find(e=>e.provider===s),a=P.find(e=>e.id===s),l=a?.name||t?.name||i.name,n=t?.providerSpecificData?.prefix||a?.prefix||s,o=Object.entries(v).filter(([,e])=>e.startsWith(`${s}/`)).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:`${n}/${t.replace(`${s}/`,"")}`})),m=O.filter(e=>e.providerAlias===s).map(e=>({id:e.id,name:e.name||e.id,value:`${n}/${e.id}`,isCustom:!0})),d=new Set(o.map(e=>e.value)),c=[...o,...m.filter(e=>!d.has(e.value))],u=c.length>0?c:[{id:`__placeholder__${s}`,name:`${n}/model-id`,value:`${n}/model-id`,isPlaceholder:!0}];e[s]={name:l,alias:n,color:i.color,models:u,isCustom:!0,hasModels:c.length>0}}else{var o;let t=(0,m.KC)(s),n=new Set(t.map(e=>e.id)),d=t.length>0,c=Object.entries(v).filter(([e,t])=>t.startsWith(`${l}/`)&&(!d||e===t.replace(`${l}/`,""))&&!n.has(t.replace(`${l}/`,""))).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t,isCustom:!0})),u=new Set(c.map(e=>e.id)),p=O.filter(e=>e.providerAlias===l&&!n.has(e.id)&&!u.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${l}/${e.id}`,isCustom:!0})),h=[...t.map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,kind:(0,m.CP)(e)})),...c,...p],x=new Set,f=(o=h.filter(e=>!x.has(e.value)&&(x.add(e.value),!0)),g?r.has(g)?o.filter(e=>e.isPlaceholder||(0,m.CP)(e)===g):o:o.filter(e=>e.isPlaceholder||e.isCustom||!(0,m.CP)(e)||"llm"===(0,m.CP)(e)));0===f.length&&g&&a.has(g)&&(i.serviceKinds||["llm"]).includes(g)&&(f=[{id:s,name:i.name,value:l}]),f.length>0&&(e[s]={name:i.name,alias:l,color:i.color,models:f})}}),Object.entries(e).forEach(([t,r])=>{let a=new Set([..._[(0,d.wG)(t)]||[],..._[t]||[]]);0!==a.size&&(r.models=r.models.filter(e=>!a.has(e.id)),0===r.models.length&&delete e[t])}),e},[C,v,A,P,O,_,g,f]),K=(0,s.useMemo)(()=>{if(g)return[];if(!N.trim())return k;let e=N.toLowerCase();return k.filter(t=>t.name.toLowerCase().includes(e))},[k,N,g]),L=(0,s.useMemo)(()=>{let e=N.trim().toLowerCase(),t={};return Object.entries(M).forEach(([r,a])=>{var s;let l=a.models;if(e){let t=a.name.toLowerCase().includes(e);if(0===(l=l.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e))).length&&!t)return}t[r]={...a,models:[...(s=l).filter(e=>j.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name)),...s.filter(e=>!j.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name))]}}),t},[M,N,j]),F=e=>{let a=e?.value||e?.name||e;j.includes(a)&&h?h(e):r(e),y&&(t(),w(""))};return(0,a.jsxs)(l.A,{isOpen:e,onClose:()=>{t(),w("")},title:b,size:"md",className:"p-4!",footer:null,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-2.5 py-2 bg-primary/8 border border-primary/20 rounded-lg text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary shrink-0",style:{fontSize:"14px"},children:"info"}),(0,a.jsx)("span",{children:"Click to add, click again to remove. Changes are saved automatically."})]}),(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,a.jsx)("input",{type:"text",placeholder:"Search...",value:N,onChange:e=>w(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,a.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-3",children:[K.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,a.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",K.length,")"]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:K.map(e=>{let t=x===e.name;return(0,a.jsxs)("button",{onClick:()=>F({id:e.name,name:e.name,value:e.name}),className:`
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9078],{9078:(e,t,r)=>{r.r(t),r.d(t,{default:()=>p});var a=r(5102),s=r(2030),l=r(7665),i=r(1704),n=r(4260),o=r(5737),m=r(5223),d=r(1038);let c=[...Object.keys(d.zN),...Object.keys(d.IS),...Object.keys(d.nJ),...Object.keys(d.fg)],u=Object.keys(d.IS).filter(e=>d.IS[e].noAuth);function p({isOpen:e,onClose:t,onSelect:r,onDeselect:h,selectedModel:x,activeProviders:f=[],title:b="Select Model",modelAliases:v={},kindFilter:g=null,addedModelValues:j=[],closeOnSelect:y=!0}){let C=(0,s.useMemo)(()=>g?f.filter(e=>{let t=d.Q2[e.provider];return(t?.serviceKinds||["llm"]).includes(g)}):f,[f,g]),{getCaps:$}=(0,o.y)(),[w,N]=(0,s.useState)(""),[k,S]=(0,s.useState)([]),[P,E]=(0,s.useState)([]),[O,T]=(0,s.useState)([]),[_,z]=(0,s.useState)({});(0,s.useEffect)(()=>{if(!e)return;let t=!1;return fetch("/api/combos").then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{t||S(e.combos||[])}).catch(e=>{console.error("Error fetching combos:",e),t||S([])}),()=>{t=!0}},[e]),(0,s.useEffect)(()=>{if(!e)return;let t=!1;return fetch("/api/provider-nodes").then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{t||E(e.nodes||[])}).catch(e=>{console.error("Error fetching provider nodes:",e),t||E([])}),()=>{t=!0}},[e]),(0,s.useEffect)(()=>{if(!e)return;let t=!1;return fetch("/api/models/custom").then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{t||T(e.models||[])}).catch(e=>{console.error("Error fetching custom models:",e),t||T([])}),()=>{t=!0}},[e]),(0,s.useEffect)(()=>{if(!e)return;let t=!1;return fetch("/api/models/disabled").then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{t||z(e.disabled||{})}).catch(e=>{console.error("Error fetching disabled models:",e),t||z({})}),()=>{t=!0}},[e]);let A=(0,s.useMemo)(()=>({...d.zN,...d.IS,...d.nJ,...d.fg}),[]),M=(0,s.useMemo)(()=>{let e={},t=new Set(["webSearch","webFetch"]),r=new Set(["image","tts","stt","embedding","imageToText"]),a=new Set(["tts","image","webFetch"]);return[...new Set([...C.map(e=>e.provider),...g?u.filter(e=>(d.Q2[e]?.serviceKinds||["llm"]).includes(g)):u])].sort((e,t)=>{let r=c.indexOf(e),a=c.indexOf(t);return(-1===r?999:r)-(-1===a?999:a)}).forEach(s=>{let l=(0,d.wG)(s),i=A[s]||{name:s,color:"#666"},n=(0,d.mq)(s)||(0,d.gb)(s);if(g&&t.has(g)){e[s]={name:i.name,alias:l,color:i.color,models:[{id:s,name:i.name,value:s}]};return}if(i.passthroughModels){let t=Object.entries(v).filter(([,e])=>e.startsWith(`${l}/`)).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t})),n=O.filter(e=>e.providerAlias===l).map(e=>({id:e.id,name:e.name||e.id,value:`${l}/${e.id}`,kind:(0,m.CP)(e),isCustom:!0})),o=t;if(g&&r.has(g)){let e=n.filter(e=>(0,m.CP)(e)===g);0===(o=[...e,...(0,m.KC)(s).filter(e=>(0,m.CP)(e)===g).map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,kind:(0,m.CP)(e)})).filter(t=>!e.some(e=>e.value===t.value))]).length&&a.has(g)&&(i.serviceKinds||["llm"]).includes(g)&&(o=[{id:s,name:i.name,value:l}])}else{let e=n.filter(e=>!(0,m.CP)(e)||"llm"===(0,m.CP)(e)),r=new Set([...t,...e].map(e=>e.value)),a=(0,m.KC)(s).filter(e=>!(0,m.CP)(e)||"llm"===(0,m.CP)(e)).map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,kind:(0,m.CP)(e)})).filter(e=>!r.has(e.value));o=[...e,...t.filter(t=>!e.some(e=>e.value===t.value)),...a]}if(o.length>0){let t=P.find(e=>e.id===s),r=t?.name||i.name;e[s]={name:r,alias:l,color:i.color,models:o}}}else if(n){if(g&&r.has(g))return;let t=f.find(e=>e.provider===s),a=P.find(e=>e.id===s),l=a?.name||t?.name||i.name,n=t?.providerSpecificData?.prefix||a?.prefix||s,o=Object.entries(v).filter(([,e])=>e.startsWith(`${s}/`)).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:`${n}/${t.replace(`${s}/`,"")}`})),m=O.filter(e=>e.providerAlias===s).map(e=>({id:e.id,name:e.name||e.id,value:`${n}/${e.id}`,isCustom:!0})),d=new Set(o.map(e=>e.value)),c=[...o,...m.filter(e=>!d.has(e.value))],u=c.length>0?c:[{id:`__placeholder__${s}`,name:`${n}/model-id`,value:`${n}/model-id`,isPlaceholder:!0}];e[s]={name:l,alias:n,color:i.color,models:u,isCustom:!0,hasModels:c.length>0}}else{var o;let t=(0,m.KC)(s),n=new Set(t.map(e=>e.id)),d=t.length>0,c=Object.entries(v).filter(([e,t])=>t.startsWith(`${l}/`)&&(!d||e===t.replace(`${l}/`,""))&&!n.has(t.replace(`${l}/`,""))).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t,isCustom:!0})),u=new Set(c.map(e=>e.id)),p=O.filter(e=>e.providerAlias===l&&!n.has(e.id)&&!u.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${l}/${e.id}`,isCustom:!0})),h=[...t.map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,kind:(0,m.CP)(e)})),...c,...p],x=new Set,f=(o=h.filter(e=>!x.has(e.value)&&(x.add(e.value),!0)),g?r.has(g)?o.filter(e=>e.isPlaceholder||(0,m.CP)(e)===g):o:o.filter(e=>e.isPlaceholder||e.isCustom||!(0,m.CP)(e)||"llm"===(0,m.CP)(e)));0===f.length&&g&&a.has(g)&&(i.serviceKinds||["llm"]).includes(g)&&(f=[{id:s,name:i.name,value:l}]),f.length>0&&(e[s]={name:i.name,alias:l,color:i.color,models:f})}}),Object.entries(e).forEach(([t,r])=>{let a=new Set([..._[(0,d.wG)(t)]||[],..._[t]||[]]);0!==a.size&&(r.models=r.models.filter(e=>!a.has(e.id)),0===r.models.length&&delete e[t])}),e},[C,v,A,P,O,_,g,f]),K=(0,s.useMemo)(()=>{if(g)return[];if(!w.trim())return k;let e=w.toLowerCase();return k.filter(t=>t.name.toLowerCase().includes(e))},[k,w,g]),L=(0,s.useMemo)(()=>{let e=w.trim().toLowerCase(),t={};return Object.entries(M).forEach(([r,a])=>{var s;let l=a.models;if(e){let t=a.name.toLowerCase().includes(e);if(0===(l=l.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e))).length&&!t)return}t[r]={...a,models:[...(s=l).filter(e=>j.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name)),...s.filter(e=>!j.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name))]}}),t},[M,w,j]),F=e=>{let a=e?.value||e?.name||e;j.includes(a)&&h?h(e):r(e),y&&(t(),N(""))};return(0,a.jsxs)(l.A,{isOpen:e,onClose:()=>{t(),N("")},title:b,size:"md",className:"p-4!",footer:null,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-2.5 py-2 bg-primary/8 border border-primary/20 rounded-lg text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary shrink-0",style:{fontSize:"14px"},children:"info"}),(0,a.jsx)("span",{children:"Click to add, click again to remove. Changes are saved automatically."})]}),(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,a.jsx)("input",{type:"text",placeholder:"Search...",value:w,onChange:e=>N(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,a.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-3",children:[K.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,a.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",K.length,")"]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:K.map(e=>{let t=x===e.name;return(0,a.jsxs)("button",{onClick:()=>F({id:e.name,name:e.name,value:e.name}),className:`
2
2
  px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer flex items-center gap-1
3
3
  ${t?"bg-primary text-white border-primary":j.includes(e.name)?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
4
- `,children:[j.includes(e.name)&&(0,a.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),e.name]},e.id)})})]}),Object.entries(L).map(([e,t])=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,a.jsx)(i.A,{src:`/providers/${e}.png`,alt:t.name,size:14,fallbackText:(t.name||e).slice(0,2).toUpperCase(),fallbackColor:t.color}),(0,a.jsx)("span",{className:"text-xs font-medium text-primary",children:t.name}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",t.models.length,")"]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.models.map(e=>{let t=x===e.value,r=e.isPlaceholder;return(0,a.jsx)("button",{onClick:()=>F(e),title:r?"Select to pre-fill, then edit model ID in the input":void 0,className:`
4
+ `,children:[j.includes(e.name)&&(0,a.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),e.name]},e.id)})})]}),Object.entries(L).map(([e,t])=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,a.jsx)(i.A,{src:`/providers/${e}.webp`,alt:t.name,size:14,fallbackText:(t.name||e).slice(0,2).toUpperCase(),fallbackColor:t.color}),(0,a.jsx)("span",{className:"text-xs font-medium text-primary",children:t.name}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",t.models.length,")"]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.models.map(e=>{let t=x===e.value,r=e.isPlaceholder;return(0,a.jsx)("button",{onClick:()=>F(e),title:r?"Select to pre-fill, then edit model ID in the input":void 0,className:`
5
5
  px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
6
6
  ${r?"border-dashed border-border text-text-muted hover:border-primary/50 hover:text-primary bg-surface italic":t?"bg-primary text-white border-primary":j.includes(e.value)?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
7
7
  `,children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[j.includes(e.value)&&!r&&(0,a.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"edit"}),e.name]}):e.isCustom?(0,a.jsxs)(a.Fragment,{children:[e.name,(0,a.jsx)("span",{className:"text-[9px] opacity-60 font-normal",children:"custom"}),(0,a.jsx)(n.A,{caps:$(e.value)})]}):(0,a.jsxs)(a.Fragment,{children:[e.name,(0,a.jsx)(n.A,{caps:$(e.value)})]})]})},e.value)})})]},e)),0===Object.keys(L).length&&0===K.length&&(0,a.jsxs)("div",{className:"text-center py-4 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-2xl mb-1 block",children:"search_off"}),(0,a.jsx)("p",{className:"text-xs",children:"No models found"})]})]})]})}}}]);
@@ -10,7 +10,7 @@
10
10
  "data": [
11
11
  { "url": "...", "b64_json": "..." }
12
12
  ]
13
- }`,extraFields:[{key:"n",label:"n",type:"number",default:1,min:1,max:4},{key:"size",label:"Size",type:"select",default:"auto",options:["auto","1024x1024","1024x1536","1536x1024","1024x1792","1792x1024"]},{key:"quality",label:"Quality",type:"select",default:"auto",options:["auto","low","medium","high","standard","hd"]},{key:"background",label:"Background",type:"select",default:"auto",options:["auto","transparent","opaque"]},{key:"style",label:"Style",type:"select",default:"",options:["","vivid","natural"]},{key:"response_format",label:"Format",type:"select",default:"",options:["","url","b64_json"]},{key:"image_detail",label:"Image Detail",type:"select",default:"high",options:["auto","low","high","original"]},{key:"output_format",label:"Codec",type:"select",default:"png",options:["png","jpeg","webp"]}]},imageToText:{inputLabel:"Image URL",inputPlaceholder:"https://example.com/image.png",defaultInput:"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg",bodyKey:"url",extraBody:{prompt:"Describe this image in detail"},defaultResponse:`{
13
+ }`,extraFields:[{key:"n",label:"n",type:"number",default:1,min:1,max:4},{key:"size",label:"Size",type:"select",default:"auto",options:["auto","1024x1024","1024x1536","1536x1024","1024x1792","1792x1024"]},{key:"quality",label:"Quality",type:"select",default:"auto",options:["auto","low","medium","high","standard","hd"]},{key:"background",label:"Background",type:"select",default:"auto",options:["auto","transparent","opaque"]},{key:"style",label:"Style",type:"select",default:"",options:["","vivid","natural"]},{key:"response_format",label:"Format",type:"select",default:"",options:["","url","b64_json"]},{key:"image_detail",label:"Image Detail",type:"select",default:"high",options:["auto","low","high","original"]},{key:"output_format",label:"Codec",type:"select",default:"png",options:["png","jpeg","webp"]}]},imageToText:{inputLabel:"Image URL",inputPlaceholder:"https://example.com/image.webp",defaultInput:"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg",bodyKey:"url",extraBody:{prompt:"Describe this image in detail"},defaultResponse:`{
14
14
  "text": "A cat sitting on a windowsill...",
15
15
  "model": "..."
16
16
  }`},video:{inputLabel:"Prompt",inputPlaceholder:"A serene lake at sunset",defaultInput:"A serene lake at sunset",bodyKey:"prompt",defaultResponse:`{
@@ -42,12 +42,12 @@
42
42
  -H "Content-Type: application/json" \\
43
43
  -H "Authorization: Bearer ${I||"YOUR_KEY"}" \\
44
44
  -d '${JSON.stringify(eg)}' \\
45
- ${"json"===R?"":"--output speech.mp3"}`,ej=async()=>{if(!k.trim()||!ef)return;H(!0),q(""),F(""),z(null);let e=Date.now();try{let t={"Content-Type":"application/json"};I&&(t.Authorization=`Bearer ${I}`);let a=`/api/v1/audio/speech${"json"===R?"?response_format=json":""}`,s=await fetch(a,{method:"POST",headers:t,body:JSON.stringify({...eg,input:k.trim()})});if(Y(Date.now()-e),!s.ok){let e=await s.json().catch(()=>({}));q(e?.error?.message||e?.error||`HTTP ${s.status}`);return}if("json"===R){let e=await s.json();z(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob());F(URL.createObjectURL(t))}else{let e=await s.blob();F(URL.createObjectURL(e))}}catch(e){q(e.message||"Network error")}finally{H(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.Card,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,s.jsx)(v,{label:"Endpoint",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.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:[eh,"/v1/audio/speech"]}),K&&(0,s.jsxs)("button",{onClick:()=>B(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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,s.jsx)(v,{label:"API Key",children:(0,s.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:I?`${I.slice(0,8)}${"•".repeat(Math.min(20,I.length-8))}`:(0,s.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),l.hasModelSelector&&(l.modelKey||(0,b.KC)(e).some(e=>"tts"===(0,b.CP)(e)))&&(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("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:((a=(0,b.KC)(e).filter(e=>"tts"===(0,b.CP)(e))).length?a:(0,b.KC)(l.modelKey)||[]).map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),l.hasLanguageHint&&(0,s.jsx)(v,{label:"Language",children:(0,s.jsxs)("select",{value:em,onChange:e=>eu(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"",children:"Auto-detect"}),$.I.map(e=>(0,s.jsx)("option",{value:e.name,children:e.name},e.id))]})}),l.hasBrowseButton&&(0,s.jsx)(v,{label:"Language",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)("button",{onClick:ex,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:y?(0,s.jsx)("span",{className:"text-text-main",children:et.find(e=>e.code===y)?.name||y}):(0,s.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,s.jsxs)("button",{onClick:ex,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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),h.length>0&&(0,s.jsx)(v,{label:"Voice",children:(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:h.map(e=>(0,s.jsxs)("button",{onClick:()=>{d(e.id),u(e.name),l.hasVoiceIdInput&&p(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,s.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,s.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))})}),l.hasVoiceIdInput&&(0,s.jsx)(v,{label:"Voice ID",children:(0,s.jsx)("div",{className:"flex flex-col gap-1",children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{value:x,onChange:e=>{p(e.target.value),d(e.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),x&&(0,s.jsx)("button",{type:"button",onClick:()=>{p(""),d("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),l.hasLanguageDropdown&&(0,s.jsx)(v,{label:"Language",children:(0,s.jsx)("select",{value:o,onChange:t=>{let a=(0,b.KC)(e).filter(e=>"tts"===(0,b.CP)(e)).find(e=>e.id===t.target.value);d(t.target.value),u(a?.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,b.KC)(e).filter(e=>"tts"===(0,b.CP)(e)).map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,s.jsx)(v,{label:"Input",children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{value:k,onChange:e=>A(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"}),k&&(0,s.jsx)("button",{type:"button",onClick:()=>A(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,s.jsx)(v,{label:"Output Format",children:(0,s.jsxs)("select",{value:R,onChange:e=>U(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,s.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,s.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("button",{onClick:()=>X(ey),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:Q?"check":"content_copy"}),Q?"Copied":"Copy"]}),(0,s.jsxs)("button",{onClick:ej,disabled:V||!k.trim()||!ef,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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:V?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),V?"Generating...":"Run"]})]})]}),(0,s.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:ey})]}),W&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:W}),D?(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",G&&(0,s.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",G,"ms"]})]}),(0,s.jsxs)("a",{href:D,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,s.jsx)("audio",{controls:!0,src:D,className:"w-full"}),J&&(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsx)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,s.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:J.format,audio:J.audio?`${J.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,s.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:P})]})]})]}),Z&&(0,s.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:()=>ee(!1),children:(0,s.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,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,s.jsx)("button",{onClick:()=>ee(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,s.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,s.jsx)("input",{autoFocus:!0,value:el,onChange:e=>eo(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,s.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[en&&(0,s.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:en}),es?(0,s.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,s.jsxs)("div",{className:"flex flex-col gap-0.5",children:[ep.map(e=>(0,s.jsxs)("button",{onClick:()=>{let t;return ee(!1),j(e.code),void(g(t=ed[e.code]?.voices||[]),t.length&&(d(t[0].id),u(t[0].name),l.hasVoiceIdInput&&p(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${y===e.code?"bg-primary/10 text-primary":""}`,children:[(0,s.jsx)("span",{className:"text-sm",children:e.name}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:[e.voices.length," voices"]}),y===e.code&&(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===ep.length&&(0,s.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}let A="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png";function I(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}function E({providerId:e,kind:t}){let a=(0,c.wG)(e),r=(0,c.rs)(a)===e?a:e,l=c.rj.find(e=>e.id===t),o=w[t],d=o||{},m=(0,b.KC)(e).filter(e=>(0,b.CP)(e)===t),u=new Set(["image","video","music","imageToText"]).has(t),x=u&&0===m.length,[p,h]=(0,n.useState)(m[0]?.id??""),g=m.find(e=>e.id===p),y=!!g?.capabilities?.includes("edit"),j=!!g?.capabilities?.includes("mask"),[N,k]=(0,n.useState)(d.defaultInput||""),[C,S]=(0,n.useState)(""),[$,P]=(0,n.useState)(""),[_,T]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[B,M]=(0,n.useState)(""),[O,K]=(0,n.useState)(!1),[L,R]=(0,n.useState)(""),[U,D]=(0,n.useState)(""),[F,J]=(0,n.useState)(null),[z,V]=(0,n.useState)(null),[H,W]=(0,n.useState)(null),[q,G]=(0,n.useState)("json"),[Y,Q]=(0,n.useState)(""),[X,Z]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(""),[ea,es]=(0,n.useState)([]),[er,el]=(0,n.useState)(""),{copied:eo,copy:en}=(0,f.C)(),{copied:ei,copy:ed}=(0,f.C)();if((0,n.useEffect)(()=>{R(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{M((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&D(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{es((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!l||!o)return null;let ec=O?U:L,em=l.endpoint.path,eu=u?p?`${r}/${p}`:x?"":r:r,ex="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===p?{image:A}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===p?{image:A,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},ep=C.trim()||ex.image||"",eh=$.trim()||ex.mask_image||"",eb=I(ep),ef=I(eh),eg=Object.entries(_).reduce((e,[t,a])=>(""===a||null==a||"number"==typeof a&&Number.isNaN(a)||(e[t]=a),e),{}),ey={model:eu,[o.bodyKey]:N,...o.extraBody,...eg,...y&&ep?{image:ep}:{},...j&&eh?{mask_image:eh}:{}},ej="image"===t&&"binary"===q,ev="image"===t&&"codex"===e&&!ej,ew=`${em}${ej?"?response_format=binary":""}`,eN=`-H "Content-Type: application/json" \\
45
+ ${"json"===R?"":"--output speech.mp3"}`,ej=async()=>{if(!k.trim()||!ef)return;H(!0),q(""),F(""),z(null);let e=Date.now();try{let t={"Content-Type":"application/json"};I&&(t.Authorization=`Bearer ${I}`);let a=`/api/v1/audio/speech${"json"===R?"?response_format=json":""}`,s=await fetch(a,{method:"POST",headers:t,body:JSON.stringify({...eg,input:k.trim()})});if(Y(Date.now()-e),!s.ok){let e=await s.json().catch(()=>({}));q(e?.error?.message||e?.error||`HTTP ${s.status}`);return}if("json"===R){let e=await s.json();z(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob());F(URL.createObjectURL(t))}else{let e=await s.blob();F(URL.createObjectURL(e))}}catch(e){q(e.message||"Network error")}finally{H(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.Card,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,s.jsx)(v,{label:"Endpoint",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.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:[eh,"/v1/audio/speech"]}),K&&(0,s.jsxs)("button",{onClick:()=>B(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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,s.jsx)(v,{label:"API Key",children:(0,s.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:I?`${I.slice(0,8)}${"•".repeat(Math.min(20,I.length-8))}`:(0,s.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),l.hasModelSelector&&(l.modelKey||(0,b.KC)(e).some(e=>"tts"===(0,b.CP)(e)))&&(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("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:((a=(0,b.KC)(e).filter(e=>"tts"===(0,b.CP)(e))).length?a:(0,b.KC)(l.modelKey)||[]).map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),l.hasLanguageHint&&(0,s.jsx)(v,{label:"Language",children:(0,s.jsxs)("select",{value:em,onChange:e=>eu(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"",children:"Auto-detect"}),$.I.map(e=>(0,s.jsx)("option",{value:e.name,children:e.name},e.id))]})}),l.hasBrowseButton&&(0,s.jsx)(v,{label:"Language",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)("button",{onClick:ex,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:y?(0,s.jsx)("span",{className:"text-text-main",children:et.find(e=>e.code===y)?.name||y}):(0,s.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,s.jsxs)("button",{onClick:ex,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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),h.length>0&&(0,s.jsx)(v,{label:"Voice",children:(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:h.map(e=>(0,s.jsxs)("button",{onClick:()=>{d(e.id),u(e.name),l.hasVoiceIdInput&&p(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,s.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,s.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))})}),l.hasVoiceIdInput&&(0,s.jsx)(v,{label:"Voice ID",children:(0,s.jsx)("div",{className:"flex flex-col gap-1",children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{value:x,onChange:e=>{p(e.target.value),d(e.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),x&&(0,s.jsx)("button",{type:"button",onClick:()=>{p(""),d("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),l.hasLanguageDropdown&&(0,s.jsx)(v,{label:"Language",children:(0,s.jsx)("select",{value:o,onChange:t=>{let a=(0,b.KC)(e).filter(e=>"tts"===(0,b.CP)(e)).find(e=>e.id===t.target.value);d(t.target.value),u(a?.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,b.KC)(e).filter(e=>"tts"===(0,b.CP)(e)).map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,s.jsx)(v,{label:"Input",children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{value:k,onChange:e=>A(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"}),k&&(0,s.jsx)("button",{type:"button",onClick:()=>A(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,s.jsx)(v,{label:"Output Format",children:(0,s.jsxs)("select",{value:R,onChange:e=>U(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,s.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,s.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("button",{onClick:()=>X(ey),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:Q?"check":"content_copy"}),Q?"Copied":"Copy"]}),(0,s.jsxs)("button",{onClick:ej,disabled:V||!k.trim()||!ef,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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:V?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),V?"Generating...":"Run"]})]})]}),(0,s.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:ey})]}),W&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:W}),D?(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",G&&(0,s.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",G,"ms"]})]}),(0,s.jsxs)("a",{href:D,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,s.jsx)("audio",{controls:!0,src:D,className:"w-full"}),J&&(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsx)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,s.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:J.format,audio:J.audio?`${J.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,s.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:P})]})]})]}),Z&&(0,s.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:()=>ee(!1),children:(0,s.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,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,s.jsx)("button",{onClick:()=>ee(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,s.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,s.jsx)("input",{autoFocus:!0,value:el,onChange:e=>eo(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,s.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[en&&(0,s.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:en}),es?(0,s.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,s.jsxs)("div",{className:"flex flex-col gap-0.5",children:[ep.map(e=>(0,s.jsxs)("button",{onClick:()=>{let t;return ee(!1),j(e.code),void(g(t=ed[e.code]?.voices||[]),t.length&&(d(t[0].id),u(t[0].name),l.hasVoiceIdInput&&p(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${y===e.code?"bg-primary/10 text-primary":""}`,children:[(0,s.jsx)("span",{className:"text-sm",children:e.name}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:[e.voices.length," voices"]}),y===e.code&&(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===ep.length&&(0,s.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}let A="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.webp";function I(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}function E({providerId:e,kind:t}){let a=(0,c.wG)(e),r=(0,c.rs)(a)===e?a:e,l=c.rj.find(e=>e.id===t),o=w[t],d=o||{},m=(0,b.KC)(e).filter(e=>(0,b.CP)(e)===t),u=new Set(["image","video","music","imageToText"]).has(t),x=u&&0===m.length,[p,h]=(0,n.useState)(m[0]?.id??""),g=m.find(e=>e.id===p),y=!!g?.capabilities?.includes("edit"),j=!!g?.capabilities?.includes("mask"),[N,k]=(0,n.useState)(d.defaultInput||""),[C,S]=(0,n.useState)(""),[$,P]=(0,n.useState)(""),[_,T]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[B,M]=(0,n.useState)(""),[O,K]=(0,n.useState)(!1),[L,R]=(0,n.useState)(""),[U,D]=(0,n.useState)(""),[F,J]=(0,n.useState)(null),[z,V]=(0,n.useState)(null),[H,W]=(0,n.useState)(null),[q,G]=(0,n.useState)("json"),[Y,Q]=(0,n.useState)(""),[X,Z]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(""),[ea,es]=(0,n.useState)([]),[er,el]=(0,n.useState)(""),{copied:eo,copy:en}=(0,f.C)(),{copied:ei,copy:ed}=(0,f.C)();if((0,n.useEffect)(()=>{R(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{M((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&D(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{es((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!l||!o)return null;let ec=O?U:L,em=l.endpoint.path,eu=u?p?`${r}/${p}`:x?"":r:r,ex="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===p?{image:A}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===p?{image:A,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.webp"}:{},ep=C.trim()||ex.image||"",eh=$.trim()||ex.mask_image||"",eb=I(ep),ef=I(eh),eg=Object.entries(_).reduce((e,[t,a])=>(""===a||null==a||"number"==typeof a&&Number.isNaN(a)||(e[t]=a),e),{}),ey={model:eu,[o.bodyKey]:N,...o.extraBody,...eg,...y&&ep?{image:ep}:{},...j&&eh?{mask_image:eh}:{}},ej="image"===t&&"binary"===q,ev="image"===t&&"codex"===e&&!ej,ew=`${em}${ej?"?response_format=binary":""}`,eN=`-H "Content-Type: application/json" \\
46
46
  -H "Authorization: Bearer ${B||"YOUR_KEY"}"${er?` \\
47
47
  -H "x-connection-id: ${er}"`:""}${ev?` \\
48
48
  -H "Accept: text/event-stream"`:""}`,ek=`curl -X ${l.endpoint.method} ${ec}${ew} \\
49
49
  ${eN.replace(/\\\n /g,"\\\n ")} \\
50
- -d '${JSON.stringify(ey)}'${ej?" \\\n --output image.png":""}`,eC=async()=>{if(!N.trim()||!eu)return;if(Z(!0),et(""),J(null),V(null),W(null),Y){try{URL.revokeObjectURL(Y)}catch{}Q("")}let e=Date.now();try{let t={"Content-Type":"application/json"};B&&(t.Authorization=`Bearer ${B}`),er&&(t["x-connection-id"]=er),ev&&(t.Accept="text/event-stream");let a={...ey,model:eu},s=await fetch(`/api${ew}`,{method:l.endpoint.method,headers:t,body:JSON.stringify(a)});if(!s.ok){let e=await s.json().catch(()=>({}));et(e?.error?.message||e?.error||`HTTP ${s.status}`);return}let r=s.headers.get("content-type")||"";if(r.startsWith("image/")){let t=await s.blob(),a=URL.createObjectURL(t);Q(a),J({data:{binary:!0,mime:r,size:t.size},latencyMs:Date.now()-e});return}if(r.includes("text/event-stream")&&s.body){let t=s.body.getReader(),a=new TextDecoder,r="",l=null,o=null;for(;;){let e,{done:s,value:n}=await t.read();if(s)break;for(r+=a.decode(n,{stream:!0});-1!==(e=r.indexOf("\n\n"));){let t=r.slice(0,e);r=r.slice(e+2);let a=null,s="";for(let e of t.split("\n"))e.startsWith("event:")?a=e.slice(6).trim():e.startsWith("data:")&&(s+=e.slice(5).trim());if(a)try{let e=s?JSON.parse(s):{};"progress"===a?V(e):"partial_image"===a?W(e):"done"===a?l=e:"error"===a&&(o=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(o)return void et(o);l&&J({data:l,latencyMs:n})}else{let t=await s.json(),a=Date.now()-e;J({data:t,latencyMs:a})}}catch(e){et(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[a,s]of Object.entries(e))t[a]="b64_json"===a&&"string"==typeof s&&s.length>100?`<${s.length} chars base64>`:eS(s);return t},e$=F?JSON.stringify(eS(F.data),null,2):"";return(0,s.jsxs)(i.Card,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[m.length>0?(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("select",{value:p,onChange:e=>h(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:m.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):x?(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("input",{value:p,onChange:e=>h(e.target.value),placeholder:"Enter model id (provider-specific)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}):null,(0,s.jsx)(v,{label:"Endpoint",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ec,em]}),U&&(0,s.jsxs)("button",{onClick:()=>K(e=>!e),title:O?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${O?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,s.jsx)(v,{label:"API Key",children:(0,s.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:B?`${B.slice(0,8)}${"•".repeat(Math.min(20,B.length-8))}`:(0,s.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),ea.length>0&&(0,s.jsx)(v,{label:"Connection",children:(0,s.jsxs)("select",{value:er,onChange:e=>el(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,s.jsx)("option",{value:"",children:"Auto (by priority)"}),ea.map(e=>{let t=e.providerSpecificData?.chatgptPlanType,a=e.email||e.name||e.id.slice(0,8);return(0,s.jsxs)("option",{value:e.id,children:[a,t?` [${t}]`:""]},e.id)})]})}),(0,s.jsx)(v,{label:o.inputLabel,children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:o.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"}),N&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),y&&(0,s.jsx)(v,{label:"Ref Image (URL)",children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{value:C,onChange:e=>S(e.target.value),placeholder:ex.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"}),C&&(0,s.jsx)("button",{type:"button",onClick:()=>S(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eb&&(0,s.jsx)("img",{src:eb,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),j&&(0,s.jsx)(v,{label:"Mask (URL)",children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{value:$,onChange:e=>P(e.target.value),placeholder:ex.mask_image||"https://example.com/mask.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),$&&(0,s.jsx)("button",{type:"button",onClick:()=>P(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),ef&&(0,s.jsx)("img",{src:ef,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),(o.extraFields||[]).filter(e=>0===m.length||Array.isArray(g?.params)&&g.params.includes(e.key)).map(e=>(0,s.jsx)(v,{label:e.label,children:"select"===e.type?(0,s.jsx)("select",{value:_[e.key]??"",onChange:t=>T(a=>({...a,[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,s.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,s.jsx)("input",{type:"text",value:_[e.key]??"",placeholder:e.placeholder,onChange:t=>T(a=>({...a,[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,s.jsx)("input",{type:"number",value:_[e.key]??"",min:e.min,max:e.max,onChange:t=>T(a=>({...a,[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,s.jsx)(v,{label:"Output Format",children:(0,s.jsxs)("select",{value:q,onChange:e=>G(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,s.jsx)("option",{value:"json",children:"JSON (Base64)"}),(0,s.jsx)("option",{value:"binary",children:"Binary File"})]})}),(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("button",{onClick:()=>en(ek),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eo?"check":"content_copy"}),eo?"Copied":"Copy"]}),(0,s.jsxs)("button",{onClick:eC,disabled:X||!N.trim()||!eu,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:X?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),X?"Running...":"Run"]})]})]}),(0,s.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})]}),(X||z)&&ev&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:X?{animation:"spin 1s linear infinite"}:void 0,children:X?"progress_activity":"check_circle"}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:[z?.stage||"starting",!X&&z?.bytesReceived?` \xb7 ${(z.bytesReceived/1024).toFixed(1)} KB`:""]})]}),H?.b64_json&&!F&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,s.jsx)("img",{src:`data:image/png;base64,${H.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),ee&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:ee}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",F&&(0,s.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",F.latencyMs,"ms"]})]}),F&&(0,s.jsxs)("button",{onClick:()=>ed(e$),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ei?"check":"content_copy"}),ei?"Copied":"Copy"]})]}),(0,s.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:F?e$:o.defaultResponse}),"image"===t&&(Y||F?.data?.data?.[0])&&(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:Y||(F?.data?.data?.[0]?.b64_json?`data:image/png;base64,${F.data.data[0].b64_json}`:F?.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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("img",{src:Y||(F?.data?.data?.[0]?.b64_json?`data:image/png;base64,${F.data.data[0].b64_json}`:F?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function T({providerId:e}){let t=(0,c.wG)(e),a=(0,b.KC)(e).filter(e=>"stt"===(0,b.CP)(e)),[r,l]=(0,n.useState)([]),o=[...a,...r],[d,m]=(0,n.useState)(a[0]?.id??""),u=o.find(e=>e.id===d),x=Array.isArray(u?.params)?u.params:[],[p,h]=(0,n.useState)(null),[g,y]=(0,n.useState)(""),[j,w]=(0,n.useState)(""),[N,k]=(0,n.useState)("json"),[C,S]=(0,n.useState)(""),[$,P]=(0,n.useState)(""),[_,A]=(0,n.useState)(!1),[I,E]=(0,n.useState)(""),[B,M]=(0,n.useState)(""),[O,K]=(0,n.useState)(null),[L,R]=(0,n.useState)(null),[U,D]=(0,n.useState)(!1),[F,J]=(0,n.useState)(""),{copied:z,copy:V}=(0,f.C)(),{copied:H,copy:W}=(0,f.C)();(0,n.useEffect)(()=>{E(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{P((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&M(e.publicUrl)}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{l((e.models||[]).filter(e=>"stt"===(0,b.CP)(e)&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let q=_?B:I,G=d?`${t}/${d}`:"",Y=`curl -X POST ${q}/v1/audio/transcriptions \\
50
+ -d '${JSON.stringify(ey)}'${ej?" \\\n --output image.webp":""}`,eC=async()=>{if(!N.trim()||!eu)return;if(Z(!0),et(""),J(null),V(null),W(null),Y){try{URL.revokeObjectURL(Y)}catch{}Q("")}let e=Date.now();try{let t={"Content-Type":"application/json"};B&&(t.Authorization=`Bearer ${B}`),er&&(t["x-connection-id"]=er),ev&&(t.Accept="text/event-stream");let a={...ey,model:eu},s=await fetch(`/api${ew}`,{method:l.endpoint.method,headers:t,body:JSON.stringify(a)});if(!s.ok){let e=await s.json().catch(()=>({}));et(e?.error?.message||e?.error||`HTTP ${s.status}`);return}let r=s.headers.get("content-type")||"";if(r.startsWith("image/")){let t=await s.blob(),a=URL.createObjectURL(t);Q(a),J({data:{binary:!0,mime:r,size:t.size},latencyMs:Date.now()-e});return}if(r.includes("text/event-stream")&&s.body){let t=s.body.getReader(),a=new TextDecoder,r="",l=null,o=null;for(;;){let e,{done:s,value:n}=await t.read();if(s)break;for(r+=a.decode(n,{stream:!0});-1!==(e=r.indexOf("\n\n"));){let t=r.slice(0,e);r=r.slice(e+2);let a=null,s="";for(let e of t.split("\n"))e.startsWith("event:")?a=e.slice(6).trim():e.startsWith("data:")&&(s+=e.slice(5).trim());if(a)try{let e=s?JSON.parse(s):{};"progress"===a?V(e):"partial_image"===a?W(e):"done"===a?l=e:"error"===a&&(o=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(o)return void et(o);l&&J({data:l,latencyMs:n})}else{let t=await s.json(),a=Date.now()-e;J({data:t,latencyMs:a})}}catch(e){et(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[a,s]of Object.entries(e))t[a]="b64_json"===a&&"string"==typeof s&&s.length>100?`<${s.length} chars base64>`:eS(s);return t},e$=F?JSON.stringify(eS(F.data),null,2):"";return(0,s.jsxs)(i.Card,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[m.length>0?(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("select",{value:p,onChange:e=>h(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:m.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):x?(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("input",{value:p,onChange:e=>h(e.target.value),placeholder:"Enter model id (provider-specific)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}):null,(0,s.jsx)(v,{label:"Endpoint",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ec,em]}),U&&(0,s.jsxs)("button",{onClick:()=>K(e=>!e),title:O?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${O?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,s.jsx)(v,{label:"API Key",children:(0,s.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:B?`${B.slice(0,8)}${"•".repeat(Math.min(20,B.length-8))}`:(0,s.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),ea.length>0&&(0,s.jsx)(v,{label:"Connection",children:(0,s.jsxs)("select",{value:er,onChange:e=>el(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,s.jsx)("option",{value:"",children:"Auto (by priority)"}),ea.map(e=>{let t=e.providerSpecificData?.chatgptPlanType,a=e.email||e.name||e.id.slice(0,8);return(0,s.jsxs)("option",{value:e.id,children:[a,t?` [${t}]`:""]},e.id)})]})}),(0,s.jsx)(v,{label:o.inputLabel,children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:o.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"}),N&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),y&&(0,s.jsx)(v,{label:"Ref Image (URL)",children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{value:C,onChange:e=>S(e.target.value),placeholder:ex.image||"https://example.com/source.webp",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,s.jsx)("button",{type:"button",onClick:()=>S(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eb&&(0,s.jsx)("img",{src:eb,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),j&&(0,s.jsx)(v,{label:"Mask (URL)",children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{value:$,onChange:e=>P(e.target.value),placeholder:ex.mask_image||"https://example.com/mask.webp",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),$&&(0,s.jsx)("button",{type:"button",onClick:()=>P(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),ef&&(0,s.jsx)("img",{src:ef,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),(o.extraFields||[]).filter(e=>0===m.length||Array.isArray(g?.params)&&g.params.includes(e.key)).map(e=>(0,s.jsx)(v,{label:e.label,children:"select"===e.type?(0,s.jsx)("select",{value:_[e.key]??"",onChange:t=>T(a=>({...a,[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,s.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,s.jsx)("input",{type:"text",value:_[e.key]??"",placeholder:e.placeholder,onChange:t=>T(a=>({...a,[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,s.jsx)("input",{type:"number",value:_[e.key]??"",min:e.min,max:e.max,onChange:t=>T(a=>({...a,[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,s.jsx)(v,{label:"Output Format",children:(0,s.jsxs)("select",{value:q,onChange:e=>G(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,s.jsx)("option",{value:"json",children:"JSON (Base64)"}),(0,s.jsx)("option",{value:"binary",children:"Binary File"})]})}),(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("button",{onClick:()=>en(ek),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eo?"check":"content_copy"}),eo?"Copied":"Copy"]}),(0,s.jsxs)("button",{onClick:eC,disabled:X||!N.trim()||!eu,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:X?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),X?"Running...":"Run"]})]})]}),(0,s.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})]}),(X||z)&&ev&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:X?{animation:"spin 1s linear infinite"}:void 0,children:X?"progress_activity":"check_circle"}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:[z?.stage||"starting",!X&&z?.bytesReceived?` \xb7 ${(z.bytesReceived/1024).toFixed(1)} KB`:""]})]}),H?.b64_json&&!F&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,s.jsx)("img",{src:`data:image/png;base64,${H.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),ee&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:ee}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",F&&(0,s.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",F.latencyMs,"ms"]})]}),F&&(0,s.jsxs)("button",{onClick:()=>ed(e$),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ei?"check":"content_copy"}),ei?"Copied":"Copy"]})]}),(0,s.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:F?e$:o.defaultResponse}),"image"===t&&(Y||F?.data?.data?.[0])&&(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:Y||(F?.data?.data?.[0]?.b64_json?`data:image/png;base64,${F.data.data[0].b64_json}`:F?.data?.data?.[0]?.url||""),download:"image.webp",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("img",{src:Y||(F?.data?.data?.[0]?.b64_json?`data:image/png;base64,${F.data.data[0].b64_json}`:F?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function T({providerId:e}){let t=(0,c.wG)(e),a=(0,b.KC)(e).filter(e=>"stt"===(0,b.CP)(e)),[r,l]=(0,n.useState)([]),o=[...a,...r],[d,m]=(0,n.useState)(a[0]?.id??""),u=o.find(e=>e.id===d),x=Array.isArray(u?.params)?u.params:[],[p,h]=(0,n.useState)(null),[g,y]=(0,n.useState)(""),[j,w]=(0,n.useState)(""),[N,k]=(0,n.useState)("json"),[C,S]=(0,n.useState)(""),[$,P]=(0,n.useState)(""),[_,A]=(0,n.useState)(!1),[I,E]=(0,n.useState)(""),[B,M]=(0,n.useState)(""),[O,K]=(0,n.useState)(null),[L,R]=(0,n.useState)(null),[U,D]=(0,n.useState)(!1),[F,J]=(0,n.useState)(""),{copied:z,copy:V}=(0,f.C)(),{copied:H,copy:W}=(0,f.C)();(0,n.useEffect)(()=>{E(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{P((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&M(e.publicUrl)}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{l((e.models||[]).filter(e=>"stt"===(0,b.CP)(e)&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let q=_?B:I,G=d?`${t}/${d}`:"",Y=`curl -X POST ${q}/v1/audio/transcriptions \\
51
51
  -H "Authorization: Bearer ${$||"YOUR_KEY"}" \\
52
52
  -F "file=@${p?.name||"audio.mp3"}" \\
53
53
  -F "model=${G}"${x.includes("language")&&g?` \\
@@ -56,4 +56,4 @@
56
56
  -F "temperature=${C}"`:""}${x.includes("prompt")&&j?` \\
57
57
  -F "prompt=${j}"`:""}`,Q=async()=>{if(!p||!G)return;D(!0),J(""),K(null);let e=Date.now();try{let t=new FormData;t.append("file",p),t.append("model",G),x.includes("language")&&g&&t.append("language",g),x.includes("response_format")&&t.append("response_format",N),x.includes("temperature")&&C&&t.append("temperature",C),x.includes("prompt")&&j&&t.append("prompt",j);let a={};$&&(a.Authorization=`Bearer ${$}`);let s=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:a,body:t});R(Date.now()-e);let r=(s.headers.get("content-type")||"").includes("application/json")?await s.json():await s.text();if(!s.ok)return void J(r?.error?.message||r?.error||r||`HTTP ${s.status}`);K(r)}catch(e){J(e.message||"Network error")}finally{D(!1)}},X="string"==typeof O?O:O?JSON.stringify(O,null,2):`{
58
58
  "text": "Hello world..."
59
- }`;return(0,s.jsxs)(i.Card,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[o.length>0?(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("select",{value:d,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:o.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("input",{value:d,onChange:e=>m(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,s.jsx)(v,{label:"Endpoint",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.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:[q,"/v1/audio/transcriptions"]}),B&&(0,s.jsxs)("button",{onClick:()=>A(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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,s.jsx)(v,{label:"API Key",children:(0,s.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,$.length-8))}`:(0,s.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,s.jsx)(v,{label:"Audio File",children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),p&&(0,s.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[p.name," \xb7 ",(p.size/1024).toFixed(1)," KB"]})]})}),x.includes("language")&&(0,s.jsx)(v,{label:"Language",children:(0,s.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"})}),x.includes("prompt")&&(0,s.jsx)(v,{label:"Prompt",children:(0,s.jsx)("input",{value:j,onChange:e=>w(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"})}),x.includes("temperature")&&(0,s.jsx)(v,{label:"Temperature",children:(0,s.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:C,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),x.includes("response_format")&&(0,s.jsx)(v,{label:"Response Format",children:(0,s.jsxs)("select",{value:N,onChange:e=>k(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,s.jsx)("option",{value:"json",children:"json"}),(0,s.jsx)("option",{value:"text",children:"text"}),(0,s.jsx)("option",{value:"srt",children:"srt"}),(0,s.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,s.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("button",{onClick:()=>V(Y),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:z?"check":"content_copy"}),z?"Copied":"Copy"]}),(0,s.jsxs)("button",{onClick:Q,disabled:U||!p||!G,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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:U?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),U?"Transcribing...":"Run"]})]})]}),(0,s.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:Y})]}),F&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",O&&L&&(0,s.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),O&&(0,s.jsxs)("button",{onClick:()=>W(X),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:H?"check":"content_copy"}),H?"Copied":"Copy"]})]}),(0,s.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:X})]})]})]})}function B(){let{kind:e,id:t}=(0,r.useParams)(),a=(0,r.useRouter)(),l=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,u=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&a.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[x,p]=(0,n.useState)(null),[b,f]=(0,n.useState)(m),[g,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!m)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(a=>{e||(p((a.nodes||[]).find(e=>e.id===t)||null),f(!1))}).catch(()=>{e||f(!1)}),()=>{e=!0}},[t,m]),!l)return(0,r.notFound)();let v=c.Q2[t],N=m?x?{id:t,name:x.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!b&&!x)return(0,r.notFound)();if(m&&b)return(0,s.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let C=m?["embedding"]:N.serviceKinds??["llm"];return m||C.includes(e)?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(o(),{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,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),l.label]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,s.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${N.color}15`},children:(0,s.jsx)(d.A,{src:`/providers/${N.id}.png`,alt:N.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:N.textIcon||N.id.slice(0,2).toUpperCase(),fallbackColor:N.color})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,s.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:N.name}),!m&&N.notice?.apiKeyUrl&&(0,s.jsxs)("a",{href:N.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,s.jsxs)(i.Badge,{variant:"default",size:"sm",children:["Custom \xb7 ",x?.prefix]}),C.map(t=>(0,s.jsx)(i.Badge,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(i.Button,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,s.jsx)(i.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:u,children:"Delete"})]})]})]}),!m&&N.kindNotice?.[e]&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,s.jsx)("p",{className:"text-sm",children:N.kindNotice[e]})]}),!m&&N.notice?.text&&!N.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:N.notice.text}),N.notice.apiKeyUrl&&(0,s.jsx)("a",{href:N.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!m&&N.noAuth?(0,s.jsx)(i.NoAuthProxyCard,{providerId:t}):(0,s.jsx)(h,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,s.jsx)(j,{providerId:t,kindFilter:e,providerAliasOverride:m?x?.prefix:void 0}),!m&&(N.searchConfig||N.fetchConfig||N.ttsConfig||N.sttConfig||N.embeddingConfig||N.searchViaChat)&&(0,s.jsx)(i.ProviderInfoCard,{config:"webFetch"===e?N.fetchConfig:"tts"===e?N.ttsConfig:"stt"===e?N.sttConfig:"embedding"===e?N.embeddingConfig:N.searchConfig||{mode:"chat-completions",defaultModel:N.searchViaChat?.defaultModel,pricingUrl:N.searchViaChat?.pricingUrl,freeTier:N.searchViaChat?.freeTier},provider:N,title:`${l.label} Config`}),"embedding"===e&&(0,s.jsx)(k,{providerId:t,customAlias:x?.prefix}),"tts"===e&&(0,s.jsx)(_,{providerId:t}),"stt"===e&&!m&&(0,s.jsx)(T,{providerId:t}),!m&&w[e]&&(0,s.jsx)(E,{providerId:t,kind:e}),m&&(0,s.jsx)(i.AddCustomEmbeddingModal,{isOpen:g,node:x,onClose:()=>y(!1),onSaved:e=>{p(e),y(!1)}})]}):(0,r.notFound)()}}},e=>{e.O(0,[2554,7418,3885,9458,9814,4385,497,2147,3204,7358],()=>e(e.s=2710)),_N_E=e.O()}]);
59
+ }`;return(0,s.jsxs)(i.Card,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[o.length>0?(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("select",{value:d,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:o.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("input",{value:d,onChange:e=>m(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,s.jsx)(v,{label:"Endpoint",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.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:[q,"/v1/audio/transcriptions"]}),B&&(0,s.jsxs)("button",{onClick:()=>A(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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,s.jsx)(v,{label:"API Key",children:(0,s.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,$.length-8))}`:(0,s.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,s.jsx)(v,{label:"Audio File",children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),p&&(0,s.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[p.name," \xb7 ",(p.size/1024).toFixed(1)," KB"]})]})}),x.includes("language")&&(0,s.jsx)(v,{label:"Language",children:(0,s.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"})}),x.includes("prompt")&&(0,s.jsx)(v,{label:"Prompt",children:(0,s.jsx)("input",{value:j,onChange:e=>w(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"})}),x.includes("temperature")&&(0,s.jsx)(v,{label:"Temperature",children:(0,s.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:C,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),x.includes("response_format")&&(0,s.jsx)(v,{label:"Response Format",children:(0,s.jsxs)("select",{value:N,onChange:e=>k(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,s.jsx)("option",{value:"json",children:"json"}),(0,s.jsx)("option",{value:"text",children:"text"}),(0,s.jsx)("option",{value:"srt",children:"srt"}),(0,s.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,s.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("button",{onClick:()=>V(Y),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:z?"check":"content_copy"}),z?"Copied":"Copy"]}),(0,s.jsxs)("button",{onClick:Q,disabled:U||!p||!G,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,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:U?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),U?"Transcribing...":"Run"]})]})]}),(0,s.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:Y})]}),F&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",O&&L&&(0,s.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),O&&(0,s.jsxs)("button",{onClick:()=>W(X),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:H?"check":"content_copy"}),H?"Copied":"Copy"]})]}),(0,s.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:X})]})]})]})}function B(){let{kind:e,id:t}=(0,r.useParams)(),a=(0,r.useRouter)(),l=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,u=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&a.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[x,p]=(0,n.useState)(null),[b,f]=(0,n.useState)(m),[g,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!m)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(a=>{e||(p((a.nodes||[]).find(e=>e.id===t)||null),f(!1))}).catch(()=>{e||f(!1)}),()=>{e=!0}},[t,m]),!l)return(0,r.notFound)();let v=c.Q2[t],N=m?x?{id:t,name:x.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!b&&!x)return(0,r.notFound)();if(m&&b)return(0,s.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let C=m?["embedding"]:N.serviceKinds??["llm"];return m||C.includes(e)?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(o(),{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,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),l.label]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,s.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${N.color}15`},children:(0,s.jsx)(d.A,{src:`/providers/${N.id}.webp`,alt:N.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:N.textIcon||N.id.slice(0,2).toUpperCase(),fallbackColor:N.color})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,s.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:N.name}),!m&&N.notice?.apiKeyUrl&&(0,s.jsxs)("a",{href:N.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,s.jsxs)(i.Badge,{variant:"default",size:"sm",children:["Custom \xb7 ",x?.prefix]}),C.map(t=>(0,s.jsx)(i.Badge,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(i.Button,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,s.jsx)(i.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:u,children:"Delete"})]})]})]}),!m&&N.kindNotice?.[e]&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,s.jsx)("p",{className:"text-sm",children:N.kindNotice[e]})]}),!m&&N.notice?.text&&!N.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:N.notice.text}),N.notice.apiKeyUrl&&(0,s.jsx)("a",{href:N.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!m&&N.noAuth?(0,s.jsx)(i.NoAuthProxyCard,{providerId:t}):(0,s.jsx)(h,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,s.jsx)(j,{providerId:t,kindFilter:e,providerAliasOverride:m?x?.prefix:void 0}),!m&&(N.searchConfig||N.fetchConfig||N.ttsConfig||N.sttConfig||N.embeddingConfig||N.searchViaChat)&&(0,s.jsx)(i.ProviderInfoCard,{config:"webFetch"===e?N.fetchConfig:"tts"===e?N.ttsConfig:"stt"===e?N.sttConfig:"embedding"===e?N.embeddingConfig:N.searchConfig||{mode:"chat-completions",defaultModel:N.searchViaChat?.defaultModel,pricingUrl:N.searchViaChat?.pricingUrl,freeTier:N.searchViaChat?.freeTier},provider:N,title:`${l.label} Config`}),"embedding"===e&&(0,s.jsx)(k,{providerId:t,customAlias:x?.prefix}),"tts"===e&&(0,s.jsx)(_,{providerId:t}),"stt"===e&&!m&&(0,s.jsx)(T,{providerId:t}),!m&&w[e]&&(0,s.jsx)(E,{providerId:t,kind:e}),m&&(0,s.jsx)(i.AddCustomEmbeddingModal,{isOpen:g,node:x,onClose:()=>y(!1),onSaved:e=>{p(e),y(!1)}})]}):(0,r.notFound)()}}},e=>{e.O(0,[2554,7418,3885,9458,9814,4385,497,2147,3204,7358],()=>e(e.s=2710)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{6615:(e,s,t)=>{Promise.resolve().then(t.bind(t,7250))},7250:(e,s,t)=>{"use strict";t.d(s,{default:()=>b});var a=t(5102),i=t(3278),r=t(3885),n=t.n(r),l=t(2030),o=t(497),d=t(1704),c=t(1038);let m=new Set([]),x={image:"image-combo",tts:"tts-combo"};function p(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 h({isNoAuth:e,allDisabled:s,total:t,connected:i,error:r}){return e?(0,a.jsx)(o.Badge,{variant:"success",size:"sm",children:"Ready"}):s?(0,a.jsx)(o.Badge,{variant:"default",size:"sm",children:"Disabled"}):0===t?(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,a.jsxs)(a.Fragment,{children:[i>0&&(0,a.jsxs)(o.Badge,{variant:"success",size:"sm",dot:!0,children:[i," Connected"]}),r>0&&(0,a.jsxs)(o.Badge,{variant:"error",size:"sm",dot:!0,children:[r," Error"]}),0===i&&0===r&&(0,a.jsxs)(o.Badge,{variant:"default",size:"sm",children:[t," Added"]})]})}function u({provider:e,kind:s,connections:t,isCustom:i,onToggle:r}){let l=c.Q2[e.id],m=!!l?.noAuth,x=t.filter(s=>s.provider===e.id),g=x.filter(e=>{let s=p(e);return"active"===s||"success"===s}).length,b=x.filter(e=>{let s=p(e);return"error"===s||"expired"===s||"unavailable"===s}).length,f=x.length,j=f>0&&x.every(e=>!1===e.isActive);return(0,a.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,a.jsx)(o.Card,{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,a.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.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,a.jsx)(d.A,{src:`/providers/${e.id}.webp`,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,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[i&&(0,a.jsx)(o.Badge,{variant:"default",size:"sm",children:"Custom"}),(0,a.jsx)(h,{isNoAuth:m,allDisabled:j,total:f,connected:g,error:b})]})]})]}),f>0&&(0,a.jsx)("button",{type:"button",className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),r&&r(e.id,j)},"aria-label":j?"Enable provider":"Disable provider",children:(0,a.jsx)(o.Toggle,{size:"sm",checked:!j,onChange:()=>{},title:j?"Enable provider":"Disable provider"})})]})})})}function g({combos:e}){return 0===e.length?null:(0,a.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,a.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,a.jsx)(o.Card,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,a.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,a.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]:"",i=c.Q2[t];return(0,a.jsx)("div",{title:i?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${i?.color??"#888"}15`},children:(0,a.jsx)(d.A,{src:`/providers/${t}.webp`,alt:i?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:i?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:i?.color})},`${e}-${s}`)}),e.models.length>6&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,a.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function b({initialConnections:e,initialNodes:s,initialCombos:t}){let{kind:r}=(0,i.useParams)(),n=(0,i.useRouter)(),[d,p]=(0,l.useState)(e||[]),[h,f]=(0,l.useState)(s||[]),[j,v]=(0,l.useState)(t||[]),[N,y]=(0,l.useState)(!1),k=c.rj.find(e=>e.id===r),C="embedding"===r,w=m.has(r);if("webSearch"===r||"webFetch"===r)return n.replace("/dashboard/media-providers/web"),null;if(!k)return(0,i.notFound)();let $=(0,c.o5)(r),z=j.filter(e=>e.kind===r),S=h.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),A=[...$,...S],E=async(e,s)=>{let t=d.filter(s=>s.provider===e);p(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),await Promise.allSettled(t.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},T=async()=>{let e=x[r]||`${r}-combo`,s=e,t=1,a=new Set(j.map(e=>e.name));for(;a.has(s);)s=`${e}-${t++}`;let i=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s,models:[],kind:r})});if(i.ok){let e=await i.json();n.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await i.json()).error||"Failed to create combo")};return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(C||w)&&(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[w&&(0,a.jsx)(o.Button,{size:"sm",icon:"add",onClick:T,children:"Create Combo"}),C&&(0,a.jsx)(o.Button,{size:"sm",icon:"add",onClick:()=>y(!0),children:"Add Custom Embedding"})]}),w&&z.length>0&&(0,a.jsx)(g,{combos:z}),0===A.length?(0,a.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,a.jsx)("strong",{children:k.label})," yet."]}):(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[$.map(e=>(0,a.jsx)(u,{provider:e,kind:r,connections:d,onToggle:E},e.id)),S.map(e=>(0,a.jsx)(u,{provider:e,kind:r,connections:d,isCustom:!0,onToggle:E},e.id))]}),C&&(0,a.jsx)(o.AddCustomEmbeddingModal,{isOpen:N,onClose:()=>y(!1),onCreated:e=>{f(s=>[...s,e]),y(!1)}})]})}}},e=>{e.O(0,[2554,7418,3885,9458,9814,4385,497,2147,3204,7358],()=>e(e.s=6615)),_N_E=e.O()}]);
@@ -0,0 +1,4 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{6312:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>j});var a=s(5102),l=s(3278),r=s(2030),n=s(3885),i=s.n(n),o=s(7837),d=s(497),c=s(1704),m=s(1038);let x=/^[a-zA-Z0-9_.\-]+$/,h={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},u={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},p={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function b(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function f({providers:e,onAdd:t,onMove:s,onRemove:l}){return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(d.Card,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(d.Button,{size:"sm",icon:"add",onClick:t,children:"Add Provider"})]}),0===e.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:e.map((t,r)=>{let{providerId:n,model:i}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(t),o=m.Q2[n];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:r+1}),(0,a.jsx)(c.A,{src:`/providers/${n}.webp`,alt:o?.name||n,size:24,className:"object-contain rounded shrink-0",fallbackText:o?.textIcon||n.slice(0,2).toUpperCase(),fallbackColor:o?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:o?.name||n}),i&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:i})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>s(r,-1),disabled:0===r,className:`p-1 rounded ${0===r?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{type:"button",onClick:()=>s(r,1),disabled:r===e.length-1,className:`p-1 rounded ${r===e.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{type:"button",onClick:()=>l(r),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${t}-${r}`)})})]})})}function j(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,n]=(0,r.useState)(null),[c,j]=(0,r.useState)(!0),[g,w]=(0,r.useState)(""),[y,v]=(0,r.useState)(""),[N,k]=(0,r.useState)([]),[S,C]=(0,r.useState)(!1),[U,O]=(0,r.useState)(!1),[$,_]=(0,r.useState)([]),[T,R]=(0,r.useState)(!1),[A,L]=(0,r.useState)(null),[P,z]=(0,r.useState)(""),[E,F]=(0,r.useState)(""),[M,D]=(0,r.useState)([]),[I,B]=(0,r.useState)({}),J=(0,r.useCallback)(async()=>{try{let[t,s,a,l,r,i]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(i.ok&&B((await i.json()).aliases||{}),l.ok){let e=await l.json();F((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&D((await r.json()).connections||[]),!t.ok){n(null),j(!1);return}let o=await t.json();n(o),w(o.name),k(o.models||[]);let d=s.ok?await s.json():{};C(d.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let c=a.ok?await a.json():[];_(c.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}j(!1)},[e]);(0,r.useEffect)(()=>{J()},[J]);let W=e=>e.trim()?x.test(e)?(v(""),!0):(v("Only letters, numbers, -, _ and ."),!1):(v("Name is required"),!1),H=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},q=async()=>{!W(g)||g===s.name||await H({name:g})&&await J()},G=async e=>{let t=e?.value||e;if(!t||N.includes(t))return;let s=[...N,t];k(s),await H({models:s})},Y=async e=>{let t=e?.value||e;if(!t||!N.includes(t))return;let s=N.filter(e=>e!==t);k(s),await H({models:s})},K=async e=>{let t=N.filter((t,s)=>s!==e);k(t),await H({models:t})},Q=async(e,t)=>{let s=[...N],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],k(s),await H({models:s}))},V=async e=>{C(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},X=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(b(s.kind))},Z=async()=>{if(R(!0),L(null),z(""),A?.audioUrl)try{URL.revokeObjectURL(A.audioUrl)}catch{}if(A?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(A.imageUrl)}catch{}let e=Date.now();try{let t=u[s.kind],a=p[s.kind](s.name),l={"Content-Type":"application/json"};E&&(l.Authorization=`Bearer ${E}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),n=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));z(e?.error?.message||e?.error||`HTTP ${r.status}`),L({json:JSON.stringify(e,null,2),latencyMs:n});return}let i=r.headers.get("content-type")||"";if(i.startsWith("image/")){let e=await r.blob();L({imageUrl:URL.createObjectURL(e),latencyMs:n});return}if(i.startsWith("audio/")||"application/octet-stream"===i){let e=await r.blob();L({audioUrl:URL.createObjectURL(e),latencyMs:n});return}let o=await r.json(),d=o?.data?.[0],c=d?.b64_json?`data:image/png;base64,${d.b64_json}`:d?.url||"";L({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:c,latencyMs:n})}catch(e){z(e.message||"Network error")}R(!1)};if(c)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let ee=h[s.kind]||m.rj.find(e=>e.id===s.kind)?.label||"Combo",et=u[s.kind],es=s.kind&&p[s.kind]?p[s.kind](s.name):null,ea=et?`curl -X POST http://localhost:20128${et} \\
2
+ -H "Content-Type: application/json" \\
3
+ -H "Authorization: Bearer ${E||"YOUR_KEY"}" \\
4
+ -d '${JSON.stringify(es)}'`:"",el=b(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(i(),{href:el,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[ee," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(d.Button,{variant:"outline",icon:"delete",onClick:X,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(d.Card,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d.Input,{label:"Combo Name",value:g,onChange:e=>{w(e.target.value),W(e.target.value)},onBlur:q,error:y}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(d.Toggle,{checked:S,onChange:V})]})]})]}),(0,a.jsx)(f,{providers:N,onAdd:()=>O(!0),onMove:Q,onRemove:K}),s.kind&&et&&(0,a.jsxs)(d.Card,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(d.Button,{size:"sm",icon:"play_arrow",onClick:Z,disabled:T||0===N.length,children:T?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:ea}),P&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:P}),A&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=A.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",A.latencyMs,"ms"]}),A.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:A.imageUrl,download:"image.webp",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)(o.default,{src:A.imageUrl,alt:"Generated",width:512,height:512,className:"max-w-full rounded-lg border border-border",unoptimized:!0})]}),A.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:A.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:A.audioUrl,className:"w-full","aria-label":"Generated speech audio",children:(0,a.jsx)("track",{kind:"captions"})})]}),A.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:A.json})]})]}),(0,a.jsxs)(d.Card,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===$.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:$.join("\n")})]}),(0,a.jsx)(d.ModelSelectModal,{isOpen:U,onClose:()=>O(!1),onSelect:G,onDeselect:Y,activeProviders:M,modelAliases:I,title:`Add ${ee} Model`,kindFilter:s.kind,addedModelValues:N,closeOnSelect:!1})]})}},7656:(e,t,s)=>{Promise.resolve().then(s.bind(s,6312))}},e=>{e.O(0,[2554,7418,3885,9458,9814,4385,497,2147,3204,7358],()=>e(e.s=7656)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{2158:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>u});var r=t(5102),a=t(3885),i=t.n(a),l=t(2030),o=t(3278),c=t(497),n=t(1704),d=t(1038);function m(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 x({isNoAuth:e,allDisabled:s,total:t,connected:a,error:i}){return e?(0,r.jsx)(c.Badge,{variant:"success",size:"sm",children:"Ready"}):s?(0,r.jsx)(c.Badge,{variant:"default",size:"sm",children:"Disabled"}):0===t?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[a>0&&(0,r.jsxs)(c.Badge,{variant:"success",size:"sm",dot:!0,children:[a," Connected"]}),i>0&&(0,r.jsxs)(c.Badge,{variant:"error",size:"sm",dot:!0,children:[i," Error"]}),0===a&&0===i&&(0,r.jsxs)(c.Badge,{variant:"default",size:"sm",children:[t," Added"]})]})}function h({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),p=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,b=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,u=o.length,f=u>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Card,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${f?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.webp`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:(0,r.jsx)(x,{isNoAuth:l,allDisabled:f,total:u,connected:p,error:b})})]})]})})})}function p({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Card,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.webp`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function b({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(c.Button,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(p,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(h,{provider:e,kind:t,connections:i},e.id))})]})}function u(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),c=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{c()},[]);let n=(0,d.o5)("webSearch"),m=(0,d.o5)("webFetch"),x=a.filter(e=>"webSearch"===e.kind),h=a.filter(e=>"webFetch"===e.kind),p=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(b,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:x,onCreateCombo:()=>p("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(b,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:m,connections:s,combos:h,onCreateCombo:()=>p("webFetch")})]})}},8750:(e,s,t)=>{Promise.resolve().then(t.bind(t,2158))}},e=>{e.O(0,[2554,7418,3885,9458,9814,4385,497,2147,3204,7358],()=>e(e.s=8750)),_N_E=e.O()}]);