9router 0.5.2 → 0.5.3

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 (1043) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +8 -8
  3. package/app/.next-cli-build/build-manifest.json +6 -6
  4. package/app/.next-cli-build/react-loadable-manifest.json +2 -2
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +4 -4
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  69. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  72. package/app/.next-cli-build/server/app/_global-error.rsc +7 -7
  73. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +7 -7
  74. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
  75. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +3 -3
  76. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +3 -3
  77. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +3 -3
  78. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  80. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  83. package/app/.next-cli-build/server/app/_not-found.rsc +18 -17
  84. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +18 -17
  85. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +4 -4
  86. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +7 -6
  87. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  88. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  89. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  90. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  91. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +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 +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +10 -10
  105. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  107. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  111. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  113. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  117. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  121. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  125. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  127. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  129. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  133. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  153. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +3 -3
  155. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  185. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  235. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  237. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  241. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  257. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  279. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -0
  289. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -0
  290. package/app/.next-cli-build/server/app/api/usage/logs/route_client-reference-manifest.js +1 -0
  291. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  300. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  314. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  346. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  348. package/app/.next-cli-build/server/app/callback.html +1 -1
  349. package/app/.next-cli-build/server/app/callback.rsc +22 -21
  350. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +22 -21
  351. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +4 -4
  352. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +7 -6
  353. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  354. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  355. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +3 -3
  356. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  357. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +20 -19
  358. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
  359. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +3 -3
  360. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  361. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  362. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +20 -19
  363. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +4 -4
  364. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +7 -6
  365. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  366. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  367. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +21 -20
  368. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +3 -3
  369. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +3 -3
  370. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  371. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  372. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +21 -20
  373. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +4 -4
  374. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +7 -6
  375. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  376. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  377. package/app/.next-cli-build/server/app/dashboard/combos.rsc +23 -22
  378. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +4 -4
  379. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +3 -3
  380. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  381. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  382. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +23 -22
  383. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +4 -4
  384. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +7 -6
  385. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  386. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  387. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +21 -20
  388. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
  389. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +3 -3
  390. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  391. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  392. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +21 -20
  393. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +4 -4
  394. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +7 -6
  395. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  396. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +23 -22
  398. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +4 -4
  399. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +3 -3
  400. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +3 -3
  401. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  402. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  403. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +23 -22
  404. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +4 -4
  405. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +7 -6
  406. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  407. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +20 -19
  409. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +3 -3
  410. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +3 -3
  411. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  412. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  413. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +20 -19
  414. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +4 -4
  415. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +7 -6
  416. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  417. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/profile.rsc +23 -22
  419. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +4 -4
  420. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +3 -3
  421. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  422. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  423. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +23 -22
  424. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +4 -4
  425. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +7 -6
  426. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  427. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +23 -22
  429. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +4 -4
  430. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +3 -3
  431. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +3 -3
  432. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  433. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  434. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +23 -22
  435. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +4 -4
  436. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +7 -6
  437. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  438. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/providers.rsc +23 -22
  440. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +4 -4
  441. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +3 -3
  442. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  443. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  444. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +23 -22
  445. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +4 -4
  446. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +7 -6
  447. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  448. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +23 -22
  450. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +4 -4
  451. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +3 -3
  452. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  453. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  454. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +23 -22
  455. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +4 -4
  456. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +7 -6
  457. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  458. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  459. package/app/.next-cli-build/server/app/dashboard/quota.rsc +21 -20
  460. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +4 -4
  461. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +3 -3
  462. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  463. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  464. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +21 -20
  465. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +4 -4
  466. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +7 -6
  467. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  468. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  469. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +22 -21
  473. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +22 -21
  474. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +4 -4
  475. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +7 -6
  476. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
  478. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +3 -3
  479. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +3 -3
  480. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +3 -3
  481. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/skills.rsc +23 -22
  483. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +4 -4
  484. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +3 -3
  485. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  486. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  487. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +23 -22
  488. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +4 -4
  489. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +7 -6
  490. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  491. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/translator.rsc +23 -22
  493. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +4 -4
  494. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +3 -3
  495. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  496. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  497. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +23 -22
  498. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +4 -4
  499. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +7 -6
  500. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/usage.rsc +23 -22
  503. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +4 -4
  504. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +3 -3
  505. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  506. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  507. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +23 -22
  508. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +4 -4
  509. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +7 -6
  510. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  511. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  512. package/app/.next-cli-build/server/app/dashboard.rsc +21 -20
  513. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +3 -3
  514. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  515. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  516. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +21 -20
  517. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +4 -4
  518. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +7 -6
  519. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  521. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  522. package/app/.next-cli-build/server/app/index.html +1 -1
  523. package/app/.next-cli-build/server/app/index.rsc +17 -16
  524. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +17 -16
  526. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +4 -4
  527. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +7 -6
  528. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  530. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  532. package/app/.next-cli-build/server/app/landing.html +1 -1
  533. package/app/.next-cli-build/server/app/landing.rsc +22 -21
  534. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +22 -21
  535. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +4 -4
  536. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +7 -6
  537. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  538. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
  539. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +3 -3
  540. package/app/.next-cli-build/server/app/login/page.js +2 -2
  541. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  542. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  543. package/app/.next-cli-build/server/app/login.html +1 -1
  544. package/app/.next-cli-build/server/app/login.rsc +22 -21
  545. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +22 -21
  546. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +4 -4
  547. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +7 -6
  548. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  549. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  550. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +3 -3
  551. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  552. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  553. package/app/.next-cli-build/server/app/page.js +2 -2
  554. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  555. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  556. package/app/.next-cli-build/server/app-paths-manifest.json +8 -8
  557. package/app/.next-cli-build/server/chunks/1220.js +3 -0
  558. package/app/.next-cli-build/server/chunks/1241.js +1 -0
  559. package/app/.next-cli-build/server/chunks/1260.js +1 -0
  560. package/app/.next-cli-build/server/chunks/1813.js +1 -0
  561. package/app/.next-cli-build/server/chunks/{9442.js → 1998.js} +1 -1
  562. package/app/.next-cli-build/server/chunks/2231.js +1 -0
  563. package/app/.next-cli-build/server/chunks/2391.js +1 -0
  564. package/app/.next-cli-build/server/chunks/{64.js → 241.js} +1 -1
  565. package/app/.next-cli-build/server/chunks/{4185.js → 2722.js} +25 -25
  566. package/app/.next-cli-build/server/chunks/28.js +1 -0
  567. package/app/.next-cli-build/server/chunks/318.js +170 -0
  568. package/app/.next-cli-build/server/chunks/3390.js +1 -0
  569. package/app/.next-cli-build/server/chunks/3535.js +1 -0
  570. package/app/.next-cli-build/server/chunks/{6067.js → 3546.js} +1 -1
  571. package/app/.next-cli-build/server/chunks/3586.js +73 -0
  572. package/app/.next-cli-build/server/chunks/3593.js +9 -0
  573. package/app/.next-cli-build/server/chunks/3913.js +64 -0
  574. package/app/.next-cli-build/server/chunks/4055.js +9 -0
  575. package/app/.next-cli-build/server/chunks/412.js +7 -0
  576. package/app/.next-cli-build/server/chunks/4161.js +1 -0
  577. package/app/.next-cli-build/server/chunks/4306.js +1 -0
  578. package/app/.next-cli-build/server/chunks/4632.js +1 -0
  579. package/app/.next-cli-build/server/chunks/{8495.js → 4739.js} +1 -1
  580. package/app/.next-cli-build/server/chunks/4741.js +18 -0
  581. package/app/.next-cli-build/server/chunks/4746.js +1 -0
  582. package/app/.next-cli-build/server/chunks/4780.js +9 -0
  583. package/app/.next-cli-build/server/chunks/4827.js +1 -0
  584. package/app/.next-cli-build/server/chunks/{9022.js → 4852.js} +1 -1
  585. package/app/.next-cli-build/server/chunks/4884.js +13 -0
  586. package/app/.next-cli-build/server/chunks/{593.js → 507.js} +2 -2
  587. package/app/.next-cli-build/server/chunks/5217.js +9 -0
  588. package/app/.next-cli-build/server/chunks/{3630.js → 5258.js} +1 -1
  589. package/app/.next-cli-build/server/chunks/5573.js +1 -0
  590. package/app/.next-cli-build/server/chunks/5615.js +43 -0
  591. package/app/.next-cli-build/server/chunks/5699.js +1 -0
  592. package/app/.next-cli-build/server/chunks/595.js +1 -0
  593. package/app/.next-cli-build/server/chunks/5961.js +1 -0
  594. package/app/.next-cli-build/server/chunks/6070.js +1 -0
  595. package/app/.next-cli-build/server/chunks/615.js +1 -0
  596. package/app/.next-cli-build/server/chunks/6182.js +63 -0
  597. package/app/.next-cli-build/server/chunks/63.js +45 -0
  598. package/app/.next-cli-build/server/chunks/6306.js +1 -0
  599. package/app/.next-cli-build/server/chunks/6445.js +10 -0
  600. package/app/.next-cli-build/server/chunks/6457.js +4 -0
  601. package/app/.next-cli-build/server/chunks/6482.js +11 -0
  602. package/app/.next-cli-build/server/chunks/{8613.js → 6763.js} +1 -1
  603. package/app/.next-cli-build/server/chunks/6777.js +1 -0
  604. package/app/.next-cli-build/server/chunks/{7243.js → 6844.js} +1 -1
  605. package/app/.next-cli-build/server/chunks/6935.js +1 -0
  606. package/app/.next-cli-build/server/chunks/6936.js +1 -0
  607. package/app/.next-cli-build/server/chunks/{1444.js → 698.js} +2 -2
  608. package/app/.next-cli-build/server/chunks/7774.js +120 -0
  609. package/app/.next-cli-build/server/chunks/7828.js +1 -0
  610. package/app/.next-cli-build/server/chunks/{7292.js → 7965.js} +1 -1
  611. package/app/.next-cli-build/server/chunks/8238.js +1 -0
  612. package/app/.next-cli-build/server/chunks/8255.js +1 -0
  613. package/app/.next-cli-build/server/chunks/8271.js +1 -0
  614. package/app/.next-cli-build/server/chunks/{14.js → 8473.js} +5 -5
  615. package/app/.next-cli-build/server/chunks/{499.js → 8520.js} +2 -2
  616. package/app/.next-cli-build/server/chunks/8895.js +56 -0
  617. package/app/.next-cli-build/server/chunks/8910.js +2 -0
  618. package/app/.next-cli-build/server/chunks/{1892.js → 8920.js} +1 -1
  619. package/app/.next-cli-build/server/chunks/8971.js +1 -0
  620. package/app/.next-cli-build/server/chunks/{2212.js → 9528.js} +3 -3
  621. package/app/.next-cli-build/server/chunks/9862.js +3 -0
  622. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  623. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  624. package/app/.next-cli-build/server/middleware.js +14 -14
  625. package/app/.next-cli-build/server/pages/404.html +1 -1
  626. package/app/.next-cli-build/server/pages/500.html +1 -1
  627. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  628. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  629. package/app/.next-cli-build/static/chunks/1051-eb9b83e9f5c9533e.js +64 -0
  630. package/app/.next-cli-build/static/chunks/1321-733bd3a2b6be1050.js +1 -0
  631. package/app/.next-cli-build/static/chunks/1393-deaa3e3fe5da3c0c.js +3 -0
  632. package/app/.next-cli-build/static/chunks/1a258343-5938f676ed376386.js +1 -0
  633. package/app/.next-cli-build/static/chunks/3794-123fdf632563f469.js +32 -0
  634. package/app/.next-cli-build/static/chunks/4bd1b696-e356ca5ba0218e27.js +1 -0
  635. package/app/.next-cli-build/static/chunks/5242-bb1a1a7ec3bfb62f.js +1 -0
  636. package/app/.next-cli-build/static/chunks/5497-ac9b18e2b3f003b0.js +7 -0
  637. package/app/.next-cli-build/static/chunks/5772-901f1092d831ec37.js +3 -0
  638. package/app/.next-cli-build/static/chunks/{3771-eede9b56a48ba2e7.js → 6069-62b10374f45001c3.js} +26 -26
  639. package/app/.next-cli-build/static/chunks/705-979ff3eb195b9023.js +1 -0
  640. package/app/.next-cli-build/static/chunks/7055-e60e20f43bfbe5f8.js +1 -0
  641. package/app/.next-cli-build/static/chunks/{1310.277601b1f5c247fc.js → 8202.1ffc6ce531e066ce.js} +1 -1
  642. package/app/.next-cli-build/static/chunks/8982-2ded4564d1c237bf.js +11 -0
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-8ee5e31272f7892c.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-d51be3d3bd57417a.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-9ddb019b546bcbba.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-f172b328f6511b37.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-88cd993b836dec9c.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-b2d5d55248dcd3d3.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-ae6bf8152d48c36c.js → page-39f27df3486a01a2.js} +3 -3
  650. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-2c067b98b7f56068.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-c091e40d2edabce6.js → page-2f8b58c042f39540.js} +2 -2
  652. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-73fb8942bb7fa117.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-c9ccbe661325f70b.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-bad276eb75372477.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-69a63c8c1b1f84e7.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-16bc4a53254fc734.js → page-c9314d6159658d8f.js} +2 -2
  657. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-e1d9bab947553056.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-48377e2f21dbeb44.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-950414df960c3e60.js → page-ab3911903c69147a.js} +2 -2
  660. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f72e66dd55d53998.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-0346bcad05ea40a4.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-38349afd23d063e2.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-b32efa0400b90a7f.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-db0c91ee7e56c647.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/_global-error/{page-70063f9482377fce.js → page-39495f6c1c52b83a.js} +1 -1
  666. package/app/.next-cli-build/static/chunks/app/_not-found/page-3396db0e61e07183.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/auth/login/{route-70063f9482377fce.js → route-39495f6c1c52b83a.js} +1 -1
  668. package/app/.next-cli-build/static/chunks/app/api/auth/logout/{route-70063f9482377fce.js → route-39495f6c1c52b83a.js} +1 -1
  669. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/{route-70063f9482377fce.js → route-39495f6c1c52b83a.js} +1 -1
  670. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-39495f6c1c52b83a.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-39495f6c1c52b83a.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-39495f6c1c52b83a.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-39495f6c1c52b83a.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-39495f6c1c52b83a.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-39495f6c1c52b83a.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-39495f6c1c52b83a.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-39495f6c1c52b83a.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-39495f6c1c52b83a.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-39495f6c1c52b83a.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-39495f6c1c52b83a.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-39495f6c1c52b83a.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-39495f6c1c52b83a.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-39495f6c1c52b83a.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-39495f6c1c52b83a.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-39495f6c1c52b83a.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-39495f6c1c52b83a.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-39495f6c1c52b83a.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-39495f6c1c52b83a.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-39495f6c1c52b83a.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-39495f6c1c52b83a.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-39495f6c1c52b83a.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/combos/route-39495f6c1c52b83a.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/health/route-39495f6c1c52b83a.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/init/route-39495f6c1c52b83a.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-39495f6c1c52b83a.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/keys/route-39495f6c1c52b83a.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/locale/route-39495f6c1c52b83a.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-39495f6c1c52b83a.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-39495f6c1c52b83a.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-39495f6c1c52b83a.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-39495f6c1c52b83a.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-39495f6c1c52b83a.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-39495f6c1c52b83a.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-39495f6c1c52b83a.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-39495f6c1c52b83a.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-39495f6c1c52b83a.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-39495f6c1c52b83a.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-39495f6c1c52b83a.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/models/route-39495f6c1c52b83a.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/models/test/route-39495f6c1c52b83a.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-39495f6c1c52b83a.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-39495f6c1c52b83a.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-39495f6c1c52b83a.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-39495f6c1c52b83a.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-39495f6c1c52b83a.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-39495f6c1c52b83a.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-39495f6c1c52b83a.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-39495f6c1c52b83a.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-39495f6c1c52b83a.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-39495f6c1c52b83a.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-39495f6c1c52b83a.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-39495f6c1c52b83a.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/pricing/route-39495f6c1c52b83a.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-39495f6c1c52b83a.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-39495f6c1c52b83a.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-39495f6c1c52b83a.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-39495f6c1c52b83a.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-39495f6c1c52b83a.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-39495f6c1c52b83a.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-39495f6c1c52b83a.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-39495f6c1c52b83a.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-39495f6c1c52b83a.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/providers/route-39495f6c1c52b83a.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-39495f6c1c52b83a.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-39495f6c1c52b83a.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-39495f6c1c52b83a.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-39495f6c1c52b83a.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-39495f6c1c52b83a.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-39495f6c1c52b83a.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-39495f6c1c52b83a.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-39495f6c1c52b83a.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-39495f6c1c52b83a.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-39495f6c1c52b83a.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-39495f6c1c52b83a.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-39495f6c1c52b83a.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/settings/route-39495f6c1c52b83a.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-39495f6c1c52b83a.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/tags/route-39495f6c1c52b83a.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-39495f6c1c52b83a.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-39495f6c1c52b83a.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-39495f6c1c52b83a.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-39495f6c1c52b83a.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-39495f6c1c52b83a.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-39495f6c1c52b83a.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-39495f6c1c52b83a.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-39495f6c1c52b83a.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-39495f6c1c52b83a.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-39495f6c1c52b83a.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-39495f6c1c52b83a.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-39495f6c1c52b83a.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-39495f6c1c52b83a.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-39495f6c1c52b83a.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-39495f6c1c52b83a.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-39495f6c1c52b83a.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-39495f6c1c52b83a.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-39495f6c1c52b83a.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-39495f6c1c52b83a.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-39495f6c1c52b83a.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-39495f6c1c52b83a.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-39495f6c1c52b83a.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-39495f6c1c52b83a.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-39495f6c1c52b83a.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-39495f6c1c52b83a.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-39495f6c1c52b83a.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-39495f6c1c52b83a.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-39495f6c1c52b83a.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-39495f6c1c52b83a.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-39495f6c1c52b83a.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-39495f6c1c52b83a.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-39495f6c1c52b83a.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-39495f6c1c52b83a.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-39495f6c1c52b83a.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-39495f6c1c52b83a.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-39495f6c1c52b83a.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-39495f6c1c52b83a.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/v1/route-39495f6c1c52b83a.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-39495f6c1c52b83a.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-39495f6c1c52b83a.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-39495f6c1c52b83a.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-39495f6c1c52b83a.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/version/route-39495f6c1c52b83a.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-39495f6c1c52b83a.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/version/update/route-39495f6c1c52b83a.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/callback/page-9e4704ee20743942.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-6586c129a35d40ef.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/landing/page-89ca9e565739184f.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/layout-81136c44a44956ea.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/login/page-b860537d58a9f64e.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-39495f6c1c52b83a.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/page-39495f6c1c52b83a.js +1 -0
  801. package/app/.next-cli-build/static/chunks/framework-711ef29bc66f648c.js +1 -0
  802. package/app/.next-cli-build/static/chunks/main-app-8803a230dfc5c361.js +1 -0
  803. package/app/.next-cli-build/static/chunks/main-d645701bfd70a30d.js +5 -0
  804. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-39495f6c1c52b83a.js +1 -0
  805. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-39495f6c1c52b83a.js +1 -0
  806. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-f740e7b53cfd899a.js +1 -0
  807. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-39495f6c1c52b83a.js +1 -0
  808. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-39495f6c1c52b83a.js +1 -0
  809. package/app/.next-cli-build/static/chunks/{webpack-ab7d9d893d55abd4.js → webpack-f482ccef6733ebcc.js} +1 -1
  810. package/app/.next-cli-build/static/css/8f9ac5a7bd3a79e5.css +1 -0
  811. package/app/.next-cli-build/static/media/material-symbols-outlined.ec1fa111.woff2 +0 -0
  812. package/app/cli/.build-home/.9router/db/backups/{upgrade-0.4.65-to-0.4.66-0.4.66-20260529-174857 → upgrade-0.5.2-to-0.5.3-0.5.3-20260618-172402}/data.sqlite +0 -0
  813. package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
  814. package/app/logs/translator/1_req_client.json +1112 -0
  815. package/app/logs/translator/2_req_source.json +1085 -0
  816. package/app/logs/translator/3_req_openai.json +1106 -0
  817. package/app/logs/translator/4_req_target.json +1094 -0
  818. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  819. package/app/node_modules/baseline-browser-mapping/package.json +2 -2
  820. package/app/package.json +2 -1
  821. package/package.json +1 -1
  822. package/app/.next-cli-build/server/chunks/107.js +0 -1
  823. package/app/.next-cli-build/server/chunks/1574.js +0 -3
  824. package/app/.next-cli-build/server/chunks/1735.js +0 -1
  825. package/app/.next-cli-build/server/chunks/1790.js +0 -1
  826. package/app/.next-cli-build/server/chunks/1883.js +0 -1
  827. package/app/.next-cli-build/server/chunks/2280.js +0 -10
  828. package/app/.next-cli-build/server/chunks/2371.js +0 -1
  829. package/app/.next-cli-build/server/chunks/2466.js +0 -1
  830. package/app/.next-cli-build/server/chunks/2701.js +0 -1
  831. package/app/.next-cli-build/server/chunks/3595.js +0 -1
  832. package/app/.next-cli-build/server/chunks/375.js +0 -45
  833. package/app/.next-cli-build/server/chunks/4116.js +0 -1
  834. package/app/.next-cli-build/server/chunks/4309.js +0 -1
  835. package/app/.next-cli-build/server/chunks/4343.js +0 -1
  836. package/app/.next-cli-build/server/chunks/4378.js +0 -1
  837. package/app/.next-cli-build/server/chunks/450.js +0 -7
  838. package/app/.next-cli-build/server/chunks/478.js +0 -1
  839. package/app/.next-cli-build/server/chunks/4839.js +0 -1
  840. package/app/.next-cli-build/server/chunks/5046.js +0 -3
  841. package/app/.next-cli-build/server/chunks/5053.js +0 -64
  842. package/app/.next-cli-build/server/chunks/514.js +0 -63
  843. package/app/.next-cli-build/server/chunks/5514.js +0 -1
  844. package/app/.next-cli-build/server/chunks/5607.js +0 -73
  845. package/app/.next-cli-build/server/chunks/583.js +0 -1
  846. package/app/.next-cli-build/server/chunks/6288.js +0 -120
  847. package/app/.next-cli-build/server/chunks/6359.js +0 -43
  848. package/app/.next-cli-build/server/chunks/6379.js +0 -56
  849. package/app/.next-cli-build/server/chunks/6502.js +0 -9
  850. package/app/.next-cli-build/server/chunks/6560.js +0 -1
  851. package/app/.next-cli-build/server/chunks/6634.js +0 -1
  852. package/app/.next-cli-build/server/chunks/666.js +0 -4
  853. package/app/.next-cli-build/server/chunks/6799.js +0 -1
  854. package/app/.next-cli-build/server/chunks/7061.js +0 -9
  855. package/app/.next-cli-build/server/chunks/7171.js +0 -9
  856. package/app/.next-cli-build/server/chunks/7234.js +0 -1
  857. package/app/.next-cli-build/server/chunks/7417.js +0 -1
  858. package/app/.next-cli-build/server/chunks/7686.js +0 -13
  859. package/app/.next-cli-build/server/chunks/7773.js +0 -18
  860. package/app/.next-cli-build/server/chunks/7870.js +0 -1
  861. package/app/.next-cli-build/server/chunks/7958.js +0 -1
  862. package/app/.next-cli-build/server/chunks/8146.js +0 -2
  863. package/app/.next-cli-build/server/chunks/8202.js +0 -170
  864. package/app/.next-cli-build/server/chunks/8474.js +0 -1
  865. package/app/.next-cli-build/server/chunks/8515.js +0 -1
  866. package/app/.next-cli-build/server/chunks/8539.js +0 -1
  867. package/app/.next-cli-build/server/chunks/9060.js +0 -9
  868. package/app/.next-cli-build/server/chunks/9068.js +0 -1
  869. package/app/.next-cli-build/server/chunks/9737.js +0 -1
  870. package/app/.next-cli-build/static/chunks/1273-62c3e49612c8936b.js +0 -1
  871. package/app/.next-cli-build/static/chunks/4156-c80440b839fa0061.js +0 -7
  872. package/app/.next-cli-build/static/chunks/505-189215c1255c77e3.js +0 -1
  873. package/app/.next-cli-build/static/chunks/5158-4b48a3595c794bbc.js +0 -32
  874. package/app/.next-cli-build/static/chunks/6673-c6da4639b0bceacc.js +0 -1
  875. package/app/.next-cli-build/static/chunks/6795-3ddcc1d55c65c001.js +0 -64
  876. package/app/.next-cli-build/static/chunks/8035-6f4bef6a09a84180.js +0 -3
  877. package/app/.next-cli-build/static/chunks/8038-368cfbdf9080110b.js +0 -1
  878. package/app/.next-cli-build/static/chunks/8872-3d43cb238f9deea9.js +0 -3
  879. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-5b35e4cbcb76147d.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-3e2500811f2b0bf2.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-f49db7ddac15e532.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-4faa8f623e956994.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-946e0efba371b5bd.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-f412ae23aeeab19f.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-29fbdd65fe6e902b.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-94cf7dba4b913805.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-b9be8108b66dc9b6.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-a6050eaf504110ab.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-a629454f53628ff6.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-7b8fb94e9856fef7.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-558d3a18b8075b24.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-6d17452b1d84b7f8.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-f1beedf73a6e8e84.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-27691bf39397a877.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-95236879b6ed5efa.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-b7cead5ba7eff7d3.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/_not-found/page-1ab122ef64d03506.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-70063f9482377fce.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-70063f9482377fce.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-70063f9482377fce.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-70063f9482377fce.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-70063f9482377fce.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-70063f9482377fce.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-70063f9482377fce.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-70063f9482377fce.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-70063f9482377fce.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-70063f9482377fce.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-70063f9482377fce.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-70063f9482377fce.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-70063f9482377fce.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-70063f9482377fce.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-70063f9482377fce.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-70063f9482377fce.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-70063f9482377fce.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-70063f9482377fce.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-70063f9482377fce.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-70063f9482377fce.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-70063f9482377fce.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-70063f9482377fce.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/combos/route-70063f9482377fce.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/health/route-70063f9482377fce.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/init/route-70063f9482377fce.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-70063f9482377fce.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/keys/route-70063f9482377fce.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/locale/route-70063f9482377fce.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-70063f9482377fce.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-70063f9482377fce.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-70063f9482377fce.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-70063f9482377fce.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-70063f9482377fce.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-70063f9482377fce.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-70063f9482377fce.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-70063f9482377fce.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-70063f9482377fce.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-70063f9482377fce.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-70063f9482377fce.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/models/route-70063f9482377fce.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/models/test/route-70063f9482377fce.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-70063f9482377fce.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-70063f9482377fce.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-70063f9482377fce.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-70063f9482377fce.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-70063f9482377fce.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-70063f9482377fce.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-70063f9482377fce.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-70063f9482377fce.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-70063f9482377fce.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-70063f9482377fce.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-70063f9482377fce.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-70063f9482377fce.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/pricing/route-70063f9482377fce.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-70063f9482377fce.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-70063f9482377fce.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-70063f9482377fce.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-70063f9482377fce.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-70063f9482377fce.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-70063f9482377fce.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-70063f9482377fce.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-70063f9482377fce.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-70063f9482377fce.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/providers/route-70063f9482377fce.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-70063f9482377fce.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-70063f9482377fce.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-70063f9482377fce.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-70063f9482377fce.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-70063f9482377fce.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-70063f9482377fce.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-70063f9482377fce.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-70063f9482377fce.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-70063f9482377fce.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-70063f9482377fce.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-70063f9482377fce.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-70063f9482377fce.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/settings/route-70063f9482377fce.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-70063f9482377fce.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/tags/route-70063f9482377fce.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-70063f9482377fce.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-70063f9482377fce.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-70063f9482377fce.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-70063f9482377fce.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-70063f9482377fce.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-70063f9482377fce.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-70063f9482377fce.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-70063f9482377fce.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-70063f9482377fce.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-70063f9482377fce.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-70063f9482377fce.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-70063f9482377fce.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-70063f9482377fce.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-70063f9482377fce.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-70063f9482377fce.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-70063f9482377fce.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-70063f9482377fce.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-70063f9482377fce.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-70063f9482377fce.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-70063f9482377fce.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-70063f9482377fce.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-70063f9482377fce.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-70063f9482377fce.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-70063f9482377fce.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-70063f9482377fce.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-70063f9482377fce.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-70063f9482377fce.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-70063f9482377fce.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-70063f9482377fce.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-70063f9482377fce.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-70063f9482377fce.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-70063f9482377fce.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-70063f9482377fce.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-70063f9482377fce.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-70063f9482377fce.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-70063f9482377fce.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/v1/route-70063f9482377fce.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-70063f9482377fce.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-70063f9482377fce.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-70063f9482377fce.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-70063f9482377fce.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/version/route-70063f9482377fce.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-70063f9482377fce.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/version/update/route-70063f9482377fce.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/callback/page-6ea4675be396cdb5.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-6aa73fef210a1080.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/landing/page-0084367666bd9046.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/layout-fcda570933db809f.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/login/page-f9158636f427d342.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-70063f9482377fce.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/page-70063f9482377fce.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/c6123951-b42288d628b452ba.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/c7879cf7-255d52e3eda24cb7.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/framework-ec2c38cd02cb5c98.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/main-app-2c8be355ba1c4e93.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/main-dc8d0a9e54eb27e6.js +0 -5
  1033. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-70063f9482377fce.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-70063f9482377fce.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-2e4f2b5b71d077f6.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-70063f9482377fce.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-70063f9482377fce.js +0 -1
  1038. package/app/.next-cli-build/static/css/2e1b7d528c228ec3.css +0 -1
  1039. package/app/.next-cli-build/static/media/material-symbols-outlined.1060ac06.woff2 +0 -0
  1040. /package/app/.next-cli-build/static/{V5d3w7MLY-kaI3zRYObvZ → PIwundMcbVdr1upjlwfNo}/_buildManifest.js +0 -0
  1041. /package/app/.next-cli-build/static/{V5d3w7MLY-kaI3zRYObvZ → PIwundMcbVdr1upjlwfNo}/_ssgManifest.js +0 -0
  1042. /package/app/node_modules/{next/node_modules/@next → @next}/env/dist/index.js +0 -0
  1043. /package/app/node_modules/{next/node_modules/@next → @next}/env/package.json +0 -0
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{597:(e,t,s)=>{Promise.resolve().then(s.bind(s,22242))},22242:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>M});var a=s(73365),r=s(29717),o=s(99568),l=s.n(o),n=s(1521),i=s(74156),d=s(68266),c=s(65276),m=s(33313),u=s(86447),p=s.n(u);function x({until:e}){let[t,s]=(0,n.useState)("");return((0,n.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);a<60?s(`${a}s`):a<3600?s(`${Math.floor(a/60)}m ${a%60}s`):s(`${Math.floor(a/3600)}h ${Math.floor(a%3600/60)}m`)};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function h({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:o,onMoveUp:l,onMoveDown:d,onToggleActive:c,onUpdateProxy:u,onEdit:p,onDelete:b}){let[f,g]=(0,n.useState)(!1),[y,v]=(0,n.useState)(!1),[j,w]=(0,n.useState)(!1),N=(0,n.useRef)(null),k=new Map((t||[]).map(e=>[e.id,e])),C=e.providerSpecificData?.proxyPoolId||null,S=C?k.get(C):null,$=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,P=!!C||$,_=S?`Pool: ${S.name}`:C?`Pool: ${C} (inactive/missing)`:$?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A="",T=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(T)try{let e=new URL(T);A=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{A=T}let I=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E=S?.isActive===!0?"success":C||$?"error":"default",R=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(Boolean).sort()[0]||null;(0,n.useEffect)(()=>{let t=()=>{w(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=R?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[R]),(0,n.useEffect)(()=>{if(!f)return;let e=e=>{N.current&&!N.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let O="unavailable"!==e.testStatus||j?e.testStatus:"active",M=s?e.name||e.email||e.displayName||"OAuth Account":e.name,K=async e=>{v(!0);try{await u("__none__"===e?null:e)}finally{v(!1),g(!1)}};return(0,a.jsxs)("div",{className:`group flex flex-col gap-3 p-2 rounded-lg sm:flex-row sm:items-center sm:justify-between hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:l,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:M}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:(0,m.g)(e.isActive,O),size:"sm",dot:!0,children:!1===e.isActive?"disabled":O||"Unknown"}),P&&(0,a.jsx)(i.Ex,{variant:E,size:"sm",children:"Proxy"}),j&&!1!==e.isActive&&(0,a.jsx)(x,{until:R}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),P&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:_,children:_}),A&&(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:A}),I&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:I,children:["no_proxy: ",I]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:N,children:[(0,a.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${P?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,a.jsx)("button",{onClick:()=>K("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!C?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>K(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${C===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:b,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function b({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:o,onClose:l}){let d="__none__",[c,m]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[u,p]=(0,n.useState)(!1),[x,h]=(0,n.useState)(null),[f,g]=(0,n.useState)(!1),y=async()=>{p(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),s=await e.json();h(s.valid?"success":"failed")}catch{h("failed")}finally{p(!1)}},v=async()=>{if(t&&c.apiKey){g(!0);try{let e=!1;try{p(!0),h(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await s.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{p(!1)}await o({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{g(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.name,onChange:e=>m({...c,name:e.target.value}),placeholder:"Production Key"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,a.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.apiKey,onChange:e=>m({...c,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||u||f,variant:"secondary",children:u?"Checking...":"Check"})})]}),x&&(0,a.jsx)(i.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Invalid"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,a.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.priority,onChange:e=>m({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,a.jsx)(i.l6,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>m({...c,proxyPoolId:e.target.value}),options:[{value:d,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!c.name||!c.apiKey||f,children:f?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function f({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[o,l]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[m,u]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),[g,y]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),[k,C]=(0,n.useState)(null),S=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),o=await t.json(),n=await s.json(),i=a.ok?await a.json():{};t.ok&&r((o.connections||[]).filter(t=>t.provider===e)),s.ok&&l(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};j(d.fallbackStrategy||null),N(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1")}catch(e){console.log("ConnectionsCard fetch error:",e)}finally{c(!1)}},[e]);(0,n.useEffect)(()=>{S()},[S]);let $=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?await a.json():{}).providerStrategies||{},o={};t&&(o.fallbackStrategy=t),"round-robin"===t&&""!==s&&(o.stickyRoundRobinLimit=Number(s)||3);let l={...r};0===Object.keys(o).length?delete l[e]:l[e]=o,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("saveStrategy error:",e)}},P=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch{await S()}},_=async e=>{C({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{C(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(t=>t.filter(t=>t.id!==e))}catch(e){console.log("delete error:",e)}}})},A=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("toggle error:",e)}},T=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("proxy error:",e)}},I=async t=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})})).ok&&(await S(),u(!1))}catch(e){console.log("save apikey error:",e)}},E=async e=>{try{(await fetch(`/api/providers/${g.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await S(),x(!1))}catch(e){console.log("update connection error:",e)}};return d?(0,a.jsx)(i.Zp,{children:(0,a.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(i.lM,{checked:"round-robin"===v,onChange:e=>{let t=e?"round-robin":null;j(t),e&&!w&&N("1"),$(t,e?w||"1":w)}}),"round-robin"===v&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:w,onChange:e=>{N(e.target.value),$("round-robin",e.target.value)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===s.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add Connection"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:s.map((e,r)=>(0,a.jsx)(h,{connection:e,proxyPools:o,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>P(r,r-1),onMoveDown:()=>P(r,r+1),onToggleActive:t=>A(e.id,t),onUpdateProxy:t=>T(e.id,t),onEdit:()=>{y(e),x(!0)},onDelete:()=>_(e.id)},e.id))}),(0,a.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add"})})]})]}),(0,a.jsx)(b,{isOpen:m,provider:e,proxyPools:o,onSave:I,onClose:()=>u(!1)}),(0,a.jsx)(i.wI,{isOpen:p,connection:g,proxyPools:o,onSave:E,onClose:()=>x(!1)}),(0,a.jsx)(i.uo,{isOpen:!!k,onClose:()=>C(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}x.propTypes={until:p().string.isRequired},h.propTypes={connection:p().shape({id:p().string,name:p().string,email:p().string,displayName:p().string,testStatus:p().string,isActive:p().bool,lastError:p().string,priority:p().number}).isRequired,proxyPools:p().array,isOAuth:p().bool.isRequired,isFirst:p().bool.isRequired,isLast:p().bool.isRequired,onMoveUp:p().func.isRequired,onMoveDown:p().func.isRequired,onToggleActive:p().func.isRequired,onUpdateProxy:p().func,onEdit:p().func.isRequired,onDelete:p().func.isRequired},b.propTypes={isOpen:p().bool.isRequired,provider:p().string,providerName:p().string,proxyPools:p().array,onSave:p().func.isRequired,onClose:p().func.isRequired},f.propTypes={providerId:p().string.isRequired,isOAuth:p().bool};var g=s(69633),y=s(96459);function v({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:l,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let m="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:m?{color:m}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e.id}`?"Copied!":"Copy"})]}),n&&(0,a.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),l&&(0,a.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function j({isOpen:e,onSave:t,onClose:s}){let[r,o]=(0,n.useState)(""),l=()=>{r.trim()&&(t(r.trim()),o(""))};return(0,a.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:r,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&l(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:l,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function w({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,y.C)(),[l,d]=(0,n.useState)({}),[m,u]=(0,n.useState)([]),[p,x]=(0,n.useState)({}),[h,b]=(0,n.useState)(null),[f,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),[S,$]=(0,n.useState)([]),P=s||(0,c.wG)(e),_=t||"llm",A=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/models/alias"),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/custom",{cache:"no-store"})]),r=await t.json(),o=await s.json(),l=await a.json();t.ok&&d(r.aliases||{}),s.ok&&$((o.connections||[]).filter(t=>t.provider===e)),a.ok&&u(l.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[e]);(0,n.useEffect)(()=>{A()},[A]);let T=async(e,t)=>{let s=`${P}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await A()}catch(e){console.log("set alias error:",e)}},I=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await A()}catch(e){console.log("delete alias error:",e)}},E=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:P,id:e,type:_})})).ok&&(await A(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},R=async e=>{try{let t=new URLSearchParams({providerAlias:P,id:e,type:_});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await A(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},O=async e=>{if(!h){b(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${P}/${e}`,kind:t})}),a=await s.json();x(t=>({...t,[e]:a.ok?"ok":"error"})),N(a.ok?"":a.error||"Model not reachable")}catch{x(t=>({...t,[e]:"error"})),N("Network error")}finally{b(null)}}},M=(0,g.KC)(e),K=t?M.filter(e=>e.kinds?e.kinds.includes(t):(0,g.CP)(e,"llm")===t):M,L=m.filter(e=>e.providerAlias===P&&(0,g.CP)(e,"llm")===_&&!K.some(t=>t.id===e.id));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),f&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:f}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[K.map(e=>{let t=`${P}/${e.id}`,s=Object.entries(l).find(([,e])=>e===t)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${P}/${e.id}`,alias:s,copied:r,onCopy:o,onSetAlias:t=>T(e.id,t),onDeleteAlias:()=>I(s),testStatus:p[e.id],onTest:S.length>0?()=>O(e.id):void 0,isTesting:h===e.id,isFree:e.isFree},e.id)}),L.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${P}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>R(e.id),testStatus:p[e.id],onTest:S.length>0?()=>O(e.id):void 0,isTesting:h===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>C(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(j,{isOpen:k,onSave:async e=>{await E(e),C(!1)},onClose:()=>C(!1)})]})}function N({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,a.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}v.propTypes={model:p().shape({id:p().string.isRequired}).isRequired,fullModel:p().string.isRequired,copied:p().string,onCopy:p().func.isRequired,testStatus:p().oneOf(["ok","error"]),isCustom:p().bool,isFree:p().bool,onDeleteAlias:p().func,onTest:p().func,isTesting:p().bool},j.propTypes={isOpen:p().bool.isRequired,onSave:p().func.isRequired,onClose:p().func.isRequired},w.propTypes={providerId:p().string.isRequired,kindFilter:p().string,providerAliasOverride:p().string};let k={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{41095:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>M});var a=s(95155),r=s(73321),o=s(98500),l=s.n(o),n=s(12115),i=s(35497),d=s(57250),c=s(88105),m=s(70217),u=s(14051),p=s.n(u);function x({until:e}){let[t,s]=(0,n.useState)("");return((0,n.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);a<60?s(`${a}s`):a<3600?s(`${Math.floor(a/60)}m ${a%60}s`):s(`${Math.floor(a/3600)}h ${Math.floor(a%3600/60)}m`)};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function h({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:o,onMoveUp:l,onMoveDown:d,onToggleActive:c,onUpdateProxy:u,onEdit:p,onDelete:b}){let[f,g]=(0,n.useState)(!1),[y,v]=(0,n.useState)(!1),[j,w]=(0,n.useState)(!1),N=(0,n.useRef)(null),k=new Map((t||[]).map(e=>[e.id,e])),C=e.providerSpecificData?.proxyPoolId||null,S=C?k.get(C):null,$=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,P=!!C||$,_=S?`Pool: ${S.name}`:C?`Pool: ${C} (inactive/missing)`:$?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A="",T=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(T)try{let e=new URL(T);A=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{A=T}let I=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E=S?.isActive===!0?"success":C||$?"error":"default",R=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(Boolean).sort()[0]||null;(0,n.useEffect)(()=>{let t=()=>{w(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=R?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[R]),(0,n.useEffect)(()=>{if(!f)return;let e=e=>{N.current&&!N.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let O="unavailable"!==e.testStatus||j?e.testStatus:"active",M=s?e.name||e.email||e.displayName||"OAuth Account":e.name,K=async e=>{v(!0);try{await u("__none__"===e?null:e)}finally{v(!1),g(!1)}};return(0,a.jsxs)("div",{className:`group flex flex-col gap-3 p-2 rounded-lg sm:flex-row sm:items-center sm:justify-between hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:l,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:M}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:(0,m.g)(e.isActive,O),size:"sm",dot:!0,children:!1===e.isActive?"disabled":O||"Unknown"}),P&&(0,a.jsx)(i.Ex,{variant:E,size:"sm",children:"Proxy"}),j&&!1!==e.isActive&&(0,a.jsx)(x,{until:R}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),P&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:_,children:_}),A&&(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:A}),I&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:I,children:["no_proxy: ",I]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:N,children:[(0,a.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${P?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,a.jsx)("button",{onClick:()=>K("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!C?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>K(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${C===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:b,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function b({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:o,onClose:l}){let d="__none__",[c,m]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[u,p]=(0,n.useState)(!1),[x,h]=(0,n.useState)(null),[f,g]=(0,n.useState)(!1),y=async()=>{p(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),s=await e.json();h(s.valid?"success":"failed")}catch{h("failed")}finally{p(!1)}},v=async()=>{if(t&&c.apiKey){g(!0);try{let e=!1;try{p(!0),h(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await s.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{p(!1)}await o({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{g(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.name,onChange:e=>m({...c,name:e.target.value}),placeholder:"Production Key"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,a.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.apiKey,onChange:e=>m({...c,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||u||f,variant:"secondary",children:u?"Checking...":"Check"})})]}),x&&(0,a.jsx)(i.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Invalid"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,a.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.priority,onChange:e=>m({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,a.jsx)(i.l6,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>m({...c,proxyPoolId:e.target.value}),options:[{value:d,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!c.name||!c.apiKey||f,children:f?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function f({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[o,l]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[m,u]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),[g,y]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),[k,C]=(0,n.useState)(null),S=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),o=await t.json(),n=await s.json(),i=a.ok?await a.json():{};t.ok&&r((o.connections||[]).filter(t=>t.provider===e)),s.ok&&l(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};j(d.fallbackStrategy||null),N(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1")}catch(e){console.log("ConnectionsCard fetch error:",e)}finally{c(!1)}},[e]);(0,n.useEffect)(()=>{S()},[S]);let $=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?await a.json():{}).providerStrategies||{},o={};t&&(o.fallbackStrategy=t),"round-robin"===t&&""!==s&&(o.stickyRoundRobinLimit=Number(s)||3);let l={...r};0===Object.keys(o).length?delete l[e]:l[e]=o,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("saveStrategy error:",e)}},P=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch{await S()}},_=async e=>{C({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{C(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(t=>t.filter(t=>t.id!==e))}catch(e){console.log("delete error:",e)}}})},A=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("toggle error:",e)}},T=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("proxy error:",e)}},I=async t=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})})).ok&&(await S(),u(!1))}catch(e){console.log("save apikey error:",e)}},E=async e=>{try{(await fetch(`/api/providers/${g.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await S(),x(!1))}catch(e){console.log("update connection error:",e)}};return d?(0,a.jsx)(i.Zp,{children:(0,a.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(i.lM,{checked:"round-robin"===v,onChange:e=>{let t=e?"round-robin":null;j(t),e&&!w&&N("1"),$(t,e?w||"1":w)}}),"round-robin"===v&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:w,onChange:e=>{N(e.target.value),$("round-robin",e.target.value)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===s.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add Connection"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:s.map((e,r)=>(0,a.jsx)(h,{connection:e,proxyPools:o,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>P(r,r-1),onMoveDown:()=>P(r,r+1),onToggleActive:t=>A(e.id,t),onUpdateProxy:t=>T(e.id,t),onEdit:()=>{y(e),x(!0)},onDelete:()=>_(e.id)},e.id))}),(0,a.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add"})})]})]}),(0,a.jsx)(b,{isOpen:m,provider:e,proxyPools:o,onSave:I,onClose:()=>u(!1)}),(0,a.jsx)(i.wI,{isOpen:p,connection:g,proxyPools:o,onSave:E,onClose:()=>x(!1)}),(0,a.jsx)(i.uo,{isOpen:!!k,onClose:()=>C(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}x.propTypes={until:p().string.isRequired},h.propTypes={connection:p().shape({id:p().string,name:p().string,email:p().string,displayName:p().string,testStatus:p().string,isActive:p().bool,lastError:p().string,priority:p().number}).isRequired,proxyPools:p().array,isOAuth:p().bool.isRequired,isFirst:p().bool.isRequired,isLast:p().bool.isRequired,onMoveUp:p().func.isRequired,onMoveDown:p().func.isRequired,onToggleActive:p().func.isRequired,onUpdateProxy:p().func,onEdit:p().func.isRequired,onDelete:p().func.isRequired},b.propTypes={isOpen:p().bool.isRequired,provider:p().string,providerName:p().string,proxyPools:p().array,onSave:p().func.isRequired,onClose:p().func.isRequired},f.propTypes={providerId:p().string.isRequired,isOAuth:p().bool};var g=s(28777),y=s(11059);function v({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:l,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let m="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:m?{color:m}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e.id}`?"Copied!":"Copy"})]}),n&&(0,a.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),l&&(0,a.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function j({isOpen:e,onSave:t,onClose:s}){let[r,o]=(0,n.useState)(""),l=()=>{r.trim()&&(t(r.trim()),o(""))};return(0,a.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:r,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&l(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:l,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function w({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,y.C)(),[l,d]=(0,n.useState)({}),[m,u]=(0,n.useState)([]),[p,x]=(0,n.useState)({}),[h,b]=(0,n.useState)(null),[f,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),[S,$]=(0,n.useState)([]),P=s||(0,c.wG)(e),_=t||"llm",A=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/models/alias"),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/custom",{cache:"no-store"})]),r=await t.json(),o=await s.json(),l=await a.json();t.ok&&d(r.aliases||{}),s.ok&&$((o.connections||[]).filter(t=>t.provider===e)),a.ok&&u(l.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[e]);(0,n.useEffect)(()=>{A()},[A]);let T=async(e,t)=>{let s=`${P}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await A()}catch(e){console.log("set alias error:",e)}},I=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await A()}catch(e){console.log("delete alias error:",e)}},E=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:P,id:e,type:_})})).ok&&(await A(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},R=async e=>{try{let t=new URLSearchParams({providerAlias:P,id:e,type:_});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await A(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},O=async e=>{if(!h){b(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${P}/${e}`,kind:t})}),a=await s.json();x(t=>({...t,[e]:a.ok?"ok":"error"})),N(a.ok?"":a.error||"Model not reachable")}catch{x(t=>({...t,[e]:"error"})),N("Network error")}finally{b(null)}}},M=(0,g.KC)(e),K=t?M.filter(e=>e.kinds?e.kinds.includes(t):(0,g.CP)(e,"llm")===t):M,L=m.filter(e=>e.providerAlias===P&&(0,g.CP)(e,"llm")===_&&!K.some(t=>t.id===e.id));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),f&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:f}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[K.map(e=>{let t=`${P}/${e.id}`,s=Object.entries(l).find(([,e])=>e===t)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${P}/${e.id}`,alias:s,copied:r,onCopy:o,onSetAlias:t=>T(e.id,t),onDeleteAlias:()=>I(s),testStatus:p[e.id],onTest:S.length>0?()=>O(e.id):void 0,isTesting:h===e.id,isFree:e.isFree},e.id)}),L.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${P}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>R(e.id),testStatus:p[e.id],onTest:S.length>0?()=>O(e.id):void 0,isTesting:h===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>C(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(j,{isOpen:k,onSave:async e=>{await E(e),C(!1)},onClose:()=>C(!1)})]})}function N({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,a.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}v.propTypes={model:p().shape({id:p().string.isRequired}).isRequired,fullModel:p().string.isRequired,copied:p().string,onCopy:p().func.isRequired,testStatus:p().oneOf(["ok","error"]),isCustom:p().bool,isFree:p().bool,onDeleteAlias:p().func,onTest:p().func,isTesting:p().bool},j.propTypes={isOpen:p().bool.isRequired,onSave:p().func.isRequired,onClose:p().func.isRequired},w.propTypes={providerId:p().string.isRequired,kindFilter:p().string,providerAliasOverride:p().string};let k={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
2
2
  "results": [
3
3
  { "title": "...", "url": "...", "snippet": "..." }
4
4
  ]
@@ -33,7 +33,7 @@
33
33
  }`;function S({providerId:e,customAlias:t}){let s=(0,c.gC)(e),r=s?t||e:(0,c.wG)(e),o=s?[]:(0,g.KC)(e).filter(e=>"embedding"===(0,g.CP)(e)),[l,d]=(0,n.useState)(o[0]?.id??""),[m,u]=(0,n.useState)("The quick brown fox jumps over the lazy dog"),[p,x]=(0,n.useState)(""),[h,b]=(0,n.useState)(""),[f,v]=(0,n.useState)(!1),[j,w]=(0,n.useState)(""),[k,$]=(0,n.useState)(""),[P,_]=(0,n.useState)(null),[A,T]=(0,n.useState)(!1),[I,E]=(0,n.useState)(""),{copied:R,copy:O}=(0,y.C)(),{copied:M,copy:K}=(0,y.C)();(0,n.useEffect)(()=>{w(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{b((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&$(e.publicUrl)}).catch(()=>{})},[]);let L=f?k:j,B=l?`${r}/${l}`:"",U=()=>{let e={model:B,input:m.trim()},t=Number(p);return p&&Number.isFinite(t)&&t>0&&(e.dimensions=t),e},D=`curl -X POST ${L}/v1/embeddings \\
34
34
  -H "Content-Type: application/json" \\
35
35
  -H "Authorization: Bearer ${h||"YOUR_KEY"}" \\
36
- -d '${JSON.stringify(U())}'`,F=async()=>{if(!m.trim()||!B)return;T(!0),E(""),_(null);let e=Date.now();try{let t={"Content-Type":"application/json"};h&&(t.Authorization=`Bearer ${h}`);let s=await fetch("/api/v1/embeddings",{method:"POST",headers:t,body:JSON.stringify(U())}),a=Date.now()-e,r=await s.json();if(!s.ok)return void E(r?.error?.message||r?.error||`HTTP ${s.status}`);_({data:r,latencyMs:a})}catch(e){E(e.message||"Network error")}finally{T(!1)}},q=P?JSON.stringify(P.data,null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(N,{label:"Model",children:s?(0,a.jsx)("input",{value:l,onChange:e=>d(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}):(0,a.jsx)("select",{value:l,onChange:e=>d(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:o.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("input",{value:L,onChange:e=>f?$(e.target.value):w(e.target.value),className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"}),k&&(0,a.jsxs)("button",{onClick:()=>v(e=>!e),title:f?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${f?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("input",{type:"password",value:h,onChange:e=>b(e.target.value),placeholder:"sk-...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(N,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:m,onChange:e=>u(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),m&&(0,a.jsx)("button",{type:"button",onClick:()=>u(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(N,{label:"Dimensions",children:(0,a.jsx)("input",{type:"number",min:"1",value:p,onChange:e=>x(e.target.value),placeholder:"optional, e.g. 512, 1024 (leave empty for default)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>O(D),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:R?"check":"content_copy"}),R?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:F,disabled:A||!m.trim()||!B,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:A?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),A?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:D})]}),I&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:I}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",P&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",P.latencyMs,"ms"]})]}),P&&(0,a.jsxs)("button",{onClick:()=>K(q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:M?"check":"content_copy"}),M?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:(e=>{if(!e)return C;let t=JSON.parse(JSON.stringify(e));return(t.data||[]).forEach(e=>{Array.isArray(e.embedding)&&e.embedding.length>4&&(e.embedding=[...e.embedding.slice(0,4).map(e=>parseFloat(e.toFixed(6))),`... (${e.embedding.length} dims)`])}),JSON.stringify(t,null,2)})(P?.data)})]})]})]})}let $={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},nvidia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},hyperbolic:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},deepgram:{hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/deepgram/voices"},huggingface:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},cartesia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},playht:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},coqui:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},tortoise:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},inworld:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"inworld-tts-models",apiEndpoint:"/api/media-providers/tts/inworld/voices"},qwen:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},minimax:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices",defaultVoiceId:"English_expressive_narrator"},"minimax-cn":{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices?provider=minimax-cn",defaultVoiceId:"English_expressive_narrator"},gemini:{hasLanguageDropdown:!1,hasLanguageHint:!0,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"gemini-tts-models",voiceKey:"gemini-tts-voices",voicesPerModel:!0}};var P=s(24021),_=s(48605);let A=`// Audio will appear here after running.
36
+ -d '${JSON.stringify(U())}'`,F=async()=>{if(!m.trim()||!B)return;T(!0),E(""),_(null);let e=Date.now();try{let t={"Content-Type":"application/json"};h&&(t.Authorization=`Bearer ${h}`);let s=await fetch("/api/v1/embeddings",{method:"POST",headers:t,body:JSON.stringify(U())}),a=Date.now()-e,r=await s.json();if(!s.ok)return void E(r?.error?.message||r?.error||`HTTP ${s.status}`);_({data:r,latencyMs:a})}catch(e){E(e.message||"Network error")}finally{T(!1)}},q=P?JSON.stringify(P.data,null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(N,{label:"Model",children:s?(0,a.jsx)("input",{value:l,onChange:e=>d(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}):(0,a.jsx)("select",{value:l,onChange:e=>d(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:o.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("input",{value:L,onChange:e=>f?$(e.target.value):w(e.target.value),className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"}),k&&(0,a.jsxs)("button",{onClick:()=>v(e=>!e),title:f?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${f?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("input",{type:"password",value:h,onChange:e=>b(e.target.value),placeholder:"sk-...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(N,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:m,onChange:e=>u(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),m&&(0,a.jsx)("button",{type:"button",onClick:()=>u(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(N,{label:"Dimensions",children:(0,a.jsx)("input",{type:"number",min:"1",value:p,onChange:e=>x(e.target.value),placeholder:"optional, e.g. 512, 1024 (leave empty for default)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>O(D),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:R?"check":"content_copy"}),R?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:F,disabled:A||!m.trim()||!B,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:A?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),A?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:D})]}),I&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:I}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",P&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",P.latencyMs,"ms"]})]}),P&&(0,a.jsxs)("button",{onClick:()=>K(q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:M?"check":"content_copy"}),M?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:(e=>{if(!e)return C;let t=JSON.parse(JSON.stringify(e));return(t.data||[]).forEach(e=>{Array.isArray(e.embedding)&&e.embedding.length>4&&(e.embedding=[...e.embedding.slice(0,4).map(e=>parseFloat(e.toFixed(6))),`... (${e.embedding.length} dims)`])}),JSON.stringify(t,null,2)})(P?.data)})]})]})]})}let $={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},nvidia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},hyperbolic:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},deepgram:{hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/deepgram/voices"},huggingface:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},cartesia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},playht:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},coqui:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},tortoise:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},inworld:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"inworld-tts-models",apiEndpoint:"/api/media-providers/tts/inworld/voices"},qwen:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},minimax:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices",defaultVoiceId:"English_expressive_narrator"},"minimax-cn":{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices?provider=minimax-cn",defaultVoiceId:"English_expressive_narrator"},gemini:{hasLanguageDropdown:!1,hasLanguageHint:!0,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"gemini-tts-models",voiceKey:"gemini-tts-voices",voicesPerModel:!0}};var P=s(717),_=s(91781);let A=`// Audio will appear here after running.
37
37
  // Example JSON response (response_format=json):
38
38
  {
39
39
  "format": "mp3",
@@ -56,4 +56,4 @@
56
56
  -F "temperature=${C}"`:""}${p.includes("prompt")&&v?` \\
57
57
  -F "prompt=${v}"`:""}`,Z=async()=>{if(!x||!G)return;D(!0),q(""),K(null);let e=Date.now();try{let t=new FormData;t.append("file",x),t.append("model",G),p.includes("language")&&b&&t.append("language",b),p.includes("response_format")&&t.append("response_format",w),p.includes("temperature")&&C&&t.append("temperature",C),p.includes("prompt")&&v&&t.append("prompt",v);let s={};$&&(s.Authorization=`Bearer ${$}`);let a=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:s,body:t});B(Date.now()-e);let r=(a.headers.get("content-type")||"").includes("application/json")?await a.json():await a.text();if(!a.ok)return void q(r?.error?.message||r?.error||r||`HTTP ${a.status}`);K(r)}catch(e){q(e.message||"Network error")}finally{D(!1)}},Q="string"==typeof M?M:M?JSON.stringify(M,null,2):`{
58
58
  "text": "Hello world..."
59
- }`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>m(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[W,"/v1/audio/transcriptions"]}),E&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,$.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(N,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),x&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[x.name," \xb7 ",(x.size/1024).toFixed(1)," KB"]})]})}),p.includes("language")&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsx)("input",{value:b,onChange:e=>f(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),p.includes("prompt")&&(0,a.jsx)(N,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("temperature")&&(0,a.jsx)(N,{label:"Temperature",children:(0,a.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"})}),p.includes("response_format")&&(0,a.jsx)(N,{label:"Response Format",children:(0,a.jsxs)("select",{value:w,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,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>z(Y),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:J?"check":"content_copy"}),J?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:Z,disabled:U||!x||!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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:U?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),U?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:Y})]}),F&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",M&&L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),M&&(0,a.jsxs)("button",{onClick:()=>H(Q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:Q})]})]})]})}function M(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,u=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[p,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(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(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),b(!1))}).catch(()=>{e||b(!1)}),()=>{e=!0}},[t,m]),!o)return(0,r.notFound)();let v=c.Q2[t],j=m?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!h&&!p)return(0,r.notFound)();if(m&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=m?["embedding"]:j.serviceKinds??["llm"];return m||N.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(l(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${j.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${j.id}.png`,alt:j.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:j.textIcon||j.id.slice(0,2).toUpperCase(),fallbackColor:j.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:j.name}),!m&&j.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),N.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:u,children:"Delete"})]})]})]}),!m&&j.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:j.kindNotice[e]})]}),!m&&j.notice?.text&&!j.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:j.notice.text}),j.notice.apiKeyUrl&&(0,a.jsx)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!m&&j.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(f,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(w,{providerId:t,kindFilter:e,providerAliasOverride:m?p?.prefix:void 0}),!m&&(j.searchConfig||j.fetchConfig||j.ttsConfig||j.sttConfig||j.embeddingConfig||j.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?j.fetchConfig:"tts"===e?j.ttsConfig:"stt"===e?j.sttConfig:"embedding"===e?j.embeddingConfig:j.searchConfig||{mode:"chat-completions",defaultModel:j.searchViaChat?.defaultModel,pricingUrl:j.searchViaChat?.pricingUrl,freeTier:j.searchViaChat?.freeTier},provider:j,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(S,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(T,{providerId:t}),"stt"===e&&!m&&(0,a.jsx)(O,{providerId:t}),!m&&k[e]&&(0,a.jsx)(R,{providerId:t,kind:e}),m&&(0,a.jsx)(i.x0,{isOpen:g,node:p,onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},33313:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})}},e=>{e.O(0,[7848,4335,6795,505,6673,4156,2347,5158,7358],()=>e(e.s=597)),_N_E=e.O()}]);
59
+ }`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>m(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[W,"/v1/audio/transcriptions"]}),E&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,$.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(N,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),x&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[x.name," \xb7 ",(x.size/1024).toFixed(1)," KB"]})]})}),p.includes("language")&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsx)("input",{value:b,onChange:e=>f(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),p.includes("prompt")&&(0,a.jsx)(N,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("temperature")&&(0,a.jsx)(N,{label:"Temperature",children:(0,a.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"})}),p.includes("response_format")&&(0,a.jsx)(N,{label:"Response Format",children:(0,a.jsxs)("select",{value:w,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,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>z(Y),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:J?"check":"content_copy"}),J?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:Z,disabled:U||!x||!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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:U?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),U?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:Y})]}),F&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",M&&L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),M&&(0,a.jsxs)("button",{onClick:()=>H(Q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:Q})]})]})]})}function M(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,u=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[p,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(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(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),b(!1))}).catch(()=>{e||b(!1)}),()=>{e=!0}},[t,m]),!o)return(0,r.notFound)();let v=c.Q2[t],j=m?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!h&&!p)return(0,r.notFound)();if(m&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=m?["embedding"]:j.serviceKinds??["llm"];return m||N.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(l(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${j.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${j.id}.png`,alt:j.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:j.textIcon||j.id.slice(0,2).toUpperCase(),fallbackColor:j.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:j.name}),!m&&j.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),N.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:u,children:"Delete"})]})]})]}),!m&&j.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:j.kindNotice[e]})]}),!m&&j.notice?.text&&!j.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:j.notice.text}),j.notice.apiKeyUrl&&(0,a.jsx)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!m&&j.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(f,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(w,{providerId:t,kindFilter:e,providerAliasOverride:m?p?.prefix:void 0}),!m&&(j.searchConfig||j.fetchConfig||j.ttsConfig||j.sttConfig||j.embeddingConfig||j.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?j.fetchConfig:"tts"===e?j.ttsConfig:"stt"===e?j.sttConfig:"embedding"===e?j.embeddingConfig:j.searchConfig||{mode:"chat-completions",defaultModel:j.searchViaChat?.defaultModel,pricingUrl:j.searchViaChat?.pricingUrl,freeTier:j.searchViaChat?.freeTier},provider:j,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(S,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(T,{providerId:t}),"stt"===e&&!m&&(0,a.jsx)(O,{providerId:t}),!m&&k[e]&&(0,a.jsx)(R,{providerId:t,kind:e}),m&&(0,a.jsx)(i.x0,{isOpen:g,node:p,onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},59299:(e,t,s)=>{Promise.resolve().then(s.bind(s,41095))},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})}},e=>{e.O(0,[2574,3862,1051,1321,705,5497,8441,3794,7358],()=>e(e.s=59299)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>f});var i=t(95155),r=t(73321),a=t(98500),n=t.n(a),o=t(12115),l=t(35497),c=t(57250),d=t(88105);let m=new Set([]),x={image:"image-combo",tts:"tts-combo"};function h(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function p({provider:e,kind:s,connections:t,isCustom:r,onToggle:a}){let o=d.Q2[e.id],m=!!o?.noAuth,x=t.filter(s=>s.provider===e.id),u=x.filter(e=>{let s=h(e);return"active"===s||"success"===s}).length,f=x.filter(e=>{let s=h(e);return"error"===s||"expired"===s||"unavailable"===s}).length,g=x.length,j=g>0&&x.every(e=>!1===e.isActive);return(0,i.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,i.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${j?"opacity-50":""}`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,i.jsx)(c.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[r&&(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),m?(0,i.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):j?(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===g?(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,i.jsxs)(i.Fragment,{children:[u>0&&(0,i.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[u," Connected"]}),f>0&&(0,i.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[f," Error"]}),0===u&&0===f&&(0,i.jsxs)(l.Ex,{variant:"default",size:"sm",children:[g," Added"]})]})]})]})]}),g>0&&(0,i.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),a&&a(e.id,j)},children:(0,i.jsx)(l.lM,{size:"sm",checked:!j,onChange:()=>{},title:j?"Enable provider":"Disable provider"})})]})})})}function u({combos:e}){return 0===e.length?null:(0,i.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,i.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,i.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,i.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",r=d.Q2[t];return(0,i.jsx)("div",{title:r?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${r?.color??"#888"}15`},children:(0,i.jsx)(c.A,{src:`/providers/${t}.png`,alt:r?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:r?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:r?.color})},`${e}-${s}`)}),e.models.length>6&&(0,i.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,i.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function f(){let{kind:e}=(0,r.useParams)(),s=(0,r.useRouter)(),[t,a]=(0,o.useState)([]),[n,c]=(0,o.useState)([]),[h,f]=(0,o.useState)([]),[g,j]=(0,o.useState)(!1);(0,o.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&s.replace("/dashboard/media-providers/web")},[e,s]);let b=d.rj.find(s=>s.id===e),v="embedding"===e,N=m.has(e);if((0,o.useEffect)(()=>{b&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>a(e.connections||[])).catch(()=>{}),v&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>c((e.nodes||[]).filter(e=>"custom-embedding"===e.type))).catch(()=>{}),N&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>f(e.combos||[])).catch(()=>{}))},[v,N,b]),!b)return(0,r.notFound)();let y=(0,d.o5)(e),k=h.filter(s=>s.kind===e),w=n.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),C=[...y,...w],$=async(e,s)=>{let i=t.filter(s=>s.provider===e);a(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),await Promise.allSettled(i.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},E=async()=>{let t=x[e]||`${e}-combo`,i=t,r=1,a=new Set(h.map(e=>e.name));for(;a.has(i);)i=`${t}-${r++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,models:[],kind:e})});if(n.ok){let e=await n.json();s.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await n.json()).error||"Failed to create combo")};return(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(v||N)&&(0,i.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[N&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:E,children:"Create Combo"}),v&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>j(!0),children:"Add Custom Embedding"})]}),N&&k.length>0&&(0,i.jsx)(u,{combos:k}),0===C.length?(0,i.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,i.jsx)("strong",{children:b.label})," yet."]}):(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[y.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,onToggle:$},s.id)),w.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,isCustom:!0,onToggle:$},s.id))]}),v&&(0,i.jsx)(l.x0,{isOpen:g,onClose:()=>j(!1),onCreated:e=>{c(s=>[...s,e]),j(!1)}})]})}},17651:(e,s,t)=>{Promise.resolve().then(t.bind(t,16144))}},e=>{e.O(0,[2574,3862,1051,1321,705,5497,8441,3794,7358],()=>e(e.s=17651)),_N_E=e.O()}]);
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{37694:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(73365),l=s(29717),r=s(1521),i=s(99568),n=s.n(i),o=s(74156),c=s(68266),d=s(65276);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},u={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 p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[L,P]=(0,r.useState)(""),[E,z]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,s,a,l,r,n]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&I((await n.json()).aliases||{}),l.ok){let e=await l.json();z((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){i(null),f(!1);return}let o=await t.json();i(o),g(o.name),N(o.models||[]);let c=s.ok?await s.json():{};S(c.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("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)},Z=async()=>{!W(j)||j===s.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await H({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await H({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await H({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await H({models:s}))},K=async e=>{S(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})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.kind))},V=async()=>{if(T(!0),A(null),P(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=h[s.kind],a=u[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)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));P(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),c=o?.data?.[0],d=c?.b64_json?`data:image/png;base64,${c.b64_json}`:c?.url||"";A({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:d,latencyMs:i})}catch(e){P(e.message||"Network error")}T(!1)};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||d.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=ee?`curl -X POST http://localhost:20128${ee} \\
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),c=s(57250),d=s(88105);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},u={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 p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[L,P]=(0,r.useState)(""),[E,z]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,s,a,l,r,n]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&I((await n.json()).aliases||{}),l.ok){let e=await l.json();z((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){i(null),f(!1);return}let o=await t.json();i(o),g(o.name),N(o.models||[]);let c=s.ok?await s.json():{};S(c.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("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)},Z=async()=>{!W(j)||j===s.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await H({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await H({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await H({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await H({models:s}))},K=async e=>{S(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})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.kind))},V=async()=>{if(T(!0),A(null),P(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=h[s.kind],a=u[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)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));P(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),c=o?.data?.[0],d=c?.b64_json?`data:image/png;base64,${c.b64_json}`:c?.url||"";A({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:d,latencyMs:i})}catch(e){P(e.message||"Network error")}T(!1)};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||d.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=ee?`curl -X POST http://localhost:20128${ee} \\
2
2
  -H "Content-Type: application/json" \\
3
3
  -H "Authorization: Bearer ${E||"YOUR_KEY"}" \\
4
- -d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,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:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.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:v.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"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:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.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:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.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:R.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:R.audioUrl,className:"w-full"})]}),R.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:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.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:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},52709:(e,t,s)=>{Promise.resolve().then(s.bind(s,37694))}},e=>{e.O(0,[7848,4335,6795,505,6673,4156,2347,5158,7358],()=>e(e.s=52709)),_N_E=e.O()}]);
4
+ -d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,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:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.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:v.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"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:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.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:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.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:R.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:R.audioUrl,className:"w-full"})]}),R.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:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.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:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},40403:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[2574,3862,1051,1321,705,5497,8441,3794,7358],()=>e(e.s=40403)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{69707:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(88105);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({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>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.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({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.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=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}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({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.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{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)(x,{provider:e,kind:t,connections:i},e.id))})]})}function b(){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),b=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)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:x,onCreateCombo:()=>b("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:m,connections:s,combos:h,onCreateCombo:()=>b("webFetch")})]})}}},e=>{e.O(0,[2574,3862,1051,1321,705,5497,8441,3794,7358],()=>e(e.s=69707)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),i=t(12115),n=t(3534),l=t(28777),o=t(88105),r=t(43666);function d(){let[e,s]=(0,i.useState)([]),[t,d]=(0,i.useState)([]),[c,u]=(0,i.useState)({}),[h,p]=(0,i.useState)(!1),[w,f]=(0,i.useState)(null),[y,x]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{g(),v(),m(),S()},[]);let g=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},S=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();p(s.cloudEnabled||!1)}}catch{}},b=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(r.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:x}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,s])=>(0,a.jsx)(r.kn,{tool:s,isExpanded:w===e,onToggle:()=>f(w===e?null:e),serverRunning:y.running,dnsActive:y.dnsStatus?.[e]||!1,hasCachedPassword:y.hasCachedPassword||!1,needsSudoPassword:!1!==y.needsSudoPassword,isWin:!0===y.isWin,apiKeys:t,activeProviders:b(),hasActiveProviders:b().some(e=>(0,l.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:c,cloudEnabled:h,onDnsChange:e=>x(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},41621:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[2574,3862,1051,5772,1321,705,5497,6069,8441,3794,7358],()=>e(e.s=41621)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[2574,3862,1051,1321,705,5497,1393,8441,3794,7358],()=>_(_.s=51393)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var a=s(95155),r=s(12115),o=s(73321),i=s(35497),l=s(81127),n=s(21931),d=s(1620),c=s(31474),m=s(90620),x=s(93308),p=s(38202);function u(){let e=(0,o.useRouter)(),{theme:t,setTheme:s,isDark:u}=(0,d.D)(),[h,b]=(0,r.useState)("en"),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)(!1),[v,C]=(0,r.useState)({fallbackStrategy:"fill-first"}),[k,S]=(0,r.useState)(!0),[P,O]=(0,r.useState)({current:"",new:"",confirm:""}),[I,L]=(0,r.useState)({type:"",message:""}),[R,D]=(0,r.useState)(!1),[U,T]=(0,r.useState)(!1),[A,M]=(0,r.useState)({type:"",message:""}),[$,E]=(0,r.useState)({open:!1,mode:"",password:""}),F=(0,r.useRef)(null),[q,J]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[_,H]=(0,r.useState)(""),[K,Z]=(0,r.useState)({type:"",message:""}),[z,B]=(0,r.useState)(!1),[W,Q]=(0,r.useState)(!1),[G,V]=(0,r.useState)({type:"",message:""}),[Y,X]=(0,r.useState)("/api/auth/oidc/callback"),[ee,et]=(0,r.useState)(!1),es=(0,r.useRef)(null),[ea,er]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[eo,ei]=(0,r.useState)({type:"",message:""}),[el,en]=(0,r.useState)(!1),[ed,ec]=(0,r.useState)(!1);(0,r.useEffect)(()=>{b(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${x.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,x.QC)(t)}())},[g]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{C(e),J({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),H(""),(e?.authMode==="oidc"||e?.authMode==="both")&&et(!0),er({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),S(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),S(!1)})},[]),(0,r.useEffect)(()=>{X(`${window.location.origin}/api/auth/oidc/callback`)},[]);let em=async e=>{if(e.preventDefault(),!0===v.outboundProxyEnabled){en(!0),ei({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:ea.outboundProxyUrl,outboundNoProxy:ea.outboundNoProxy})}),t=await e.json();e.ok?(C(e=>({...e,...t})),ei({type:"success",message:"Proxy settings applied"})):ei({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){ei({type:"error",message:"An error occurred"})}finally{en(!1)}}},ex=async()=>{if(!0!==v.outboundProxyEnabled)return;let e=(ea.outboundProxyUrl||"").trim();if(!e)return void ei({type:"error",message:"Please enter a Proxy URL to test"});ec(!0),ei({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?ei({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):ei({type:"error",message:s?.error||"Proxy test failed"})}catch(e){ei({type:"error",message:"An error occurred"})}finally{ec(!1)}},ep=async e=>{en(!0),ei({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(C(e=>({...e,...s})),er(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),ei({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):ei({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){ei({type:"error",message:"An error occurred"})}finally{en(!1)}},eu=async e=>{if(e.preventDefault(),P.new!==P.confirm)return void L({type:"error",message:"Passwords do not match"});D(!0),L({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:P.current,newPassword:P.new})}),t=await e.json();e.ok?(L({type:"success",message:"Password updated successfully"}),O({current:"",new:"",confirm:""})):L({type:"error",message:t.error||"Failed to update password"})}catch(e){L({type:"error",message:"An error occurred"})}finally{D(!1)}},eh=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&C(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eb=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&C(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eg=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&C(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},ey=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&C(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},ef=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&C(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ej=(e,t)=>{J(s=>({...s,[e]:t}))},ew=async(e=q.authMode||"password")=>{let t=q.oidcIssuerUrl.trim(),s=q.oidcClientId.trim(),a=q.oidcScopes.trim(),r=q.oidcLoginLabel.trim(),o=_.trim();if("password"!==e&&(!t||!s||!o)&&!v.oidcConfigured)return void Z({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});B(!0),Z({type:"",message:""}),V({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(C(e=>({...e,...n})),J({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),H(""),Z({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):Z({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){Z({type:"error",message:"An error occurred"})}finally{B(!1)}},eN=async()=>{let e=q.oidcIssuerUrl.trim(),t=q.oidcClientId.trim(),s=q.oidcScopes.trim(),a=_.trim();if(!e||!t)return void V({type:"error",message:"Issuer URL and client ID are required to test the connection."});Q(!0),Z({type:"",message:""}),V({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:q.authMode||v.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:q.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void V({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;V({type:"success",message:e})}else V({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){V({type:"error",message:"An error occurred"})}finally{Q(!1)}},ev=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&C(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eC=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();C(t)}catch(e){console.error("Failed to reload settings:",e)}},ek=async e=>{T(!0),M({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`9router-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),M({type:"success",message:"Database backup downloaded"})}catch(e){M({type:"error",message:e.message||"Failed to export database"})}finally{T(!1)}},eS=async e=>{let t=F.current;if(t){T(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eC(),M({type:"success",message:"Database imported successfully"})}catch(e){M({type:"error",message:e.message||"Invalid backup file"})}finally{F.current=null,T(!1)}}},eP=async()=>{let{mode:e,password:t}=$;E({open:!1,mode:"",password:""}),"export"===e?await ek(t):"import"===e&&await eS(t)},eO=!0===v.enableObservability,eI=async()=>{N(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}N(!1),j(!1)},eL=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(e.push("/login"),e.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,c.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.9router/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(i.$n,{variant:"secondary",icon:"download",onClick:()=>E({open:!0,mode:"export",password:""}),loading:U,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(i.$n,{variant:"outline",icon:"upload",onClick:()=>es.current?.click(),disabled:U,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:es,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];es.current&&(es.current.value=""),t&&(F.current=t,M({type:"",message:""}),E({open:!0,mode:"import",password:""}))}})]}),A.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===A.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:A.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>y(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:p.h[h]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(i.lM,{checked:!0===v.requireLogin,onChange:()=>ef(!v.requireLogin),disabled:k})]}),!0===v.requireLogin&&(0,a.jsxs)("form",{onSubmit:eu,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[v.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter current password",value:P.current,onChange:e=>O({...P,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter new password",value:P.new,onChange:e=>O({...P,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Confirm new password",value:P.confirm,onChange:e=>O({...P,confirm:e.target.value}),required:!0})]})]}),I.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===I.type?"text-red-500":"text-green-500"}`,children:I.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:R,className:"w-full sm:w-auto",children:v.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>et(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===v.authMode?"OIDC active":"both"===v.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:ee?"expand_less":"expand_more"})]}),ee&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=q.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ej("authMode",e.value),className:(0,c.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:k||z,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(i.pd,{placeholder:"https://auth.example.com/application/o/9router/",value:q.oidcIssuerUrl,onChange:e=>ej("oidcIssuerUrl",e.target.value),disabled:k||z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(i.pd,{placeholder:"9router-dashboard",value:q.oidcClientId,onChange:e=>ej("oidcClientId",e.target.value),disabled:k||z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:_,onChange:e=>H(e.target.value),disabled:k||z}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(i.pd,{placeholder:"openid profile email",value:q.oidcScopes,onChange:e=>ej("oidcScopes",e.target.value),disabled:k||z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(i.pd,{placeholder:"Sign in with OIDC",value:q.oidcLoginLabel,onChange:e=>ej("oidcLoginLabel",e.target.value),disabled:k||z})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Y})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(i.$n,{type:"button",variant:"primary",loading:z,onClick:()=>ew(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(i.$n,{type:"button",variant:"outline",loading:W,onClick:eN,className:"w-full sm:w-auto",children:"Test connection"})]}),G.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===G.type?"text-red-500":"text-green-500"}`,children:G.message}),K.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===K.type?"text-red-500":"text-green-500"}`,children:K.message}),"oidc"===v.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===v.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===v.fallbackStrategy,onChange:()=>eh("round-robin"===v.fallbackStrategy?"fill-first":"round-robin"),disabled:k})]}),"round-robin"===v.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"10",value:v.stickyRoundRobinLimit||3,onChange:e=>eg(e.target.value),disabled:k,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===v.comboStrategy,onChange:()=>eb("round-robin"===v.comboStrategy?"fallback":"round-robin"),disabled:k})]}),"round-robin"===v.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"100",value:v.comboStickyRoundRobinLimit||1,onChange:e=>ey(e.target.value),disabled:k,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===v.fallbackStrategy?`Currently distributing requests across all available accounts with ${v.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===v.comboStrategy?` Combos rotate after ${v.comboStickyRoundRobinLimit||1} call${1===(v.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(i.lM,{checked:!0===v.outboundProxyEnabled,onChange:()=>ep(!0!==v.outboundProxyEnabled),disabled:k||el})]}),!0===v.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:em,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(i.pd,{placeholder:"http://127.0.0.1:7897",value:ea.outboundProxyUrl,onChange:e=>er(t=>({...t,outboundProxyUrl:e.target.value})),disabled:k||el}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(i.pd,{placeholder:"localhost,127.0.0.1",value:ea.outboundNoProxy,onChange:e=>er(t=>({...t,outboundNoProxy:e.target.value})),disabled:k||el}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(i.$n,{type:"button",variant:"secondary",loading:ed,disabled:k||el,onClick:ex,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:el,className:"w-full sm:w-auto",children:"Apply"})]})]}),eo.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===eo.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:eo.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(i.lM,{checked:eO,onChange:ev,disabled:k})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(i.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>j(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(i.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eL,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[m.vQ.name," v",m.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(n.default,{hideTrigger:!0,isOpen:g,onClose:e=>{y(!1),b(e)}}),(0,a.jsx)(l.ConfirmModal,{isOpen:f,onClose:()=>j(!1),onConfirm:eI,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:w}),(0,a.jsxs)(l.default,{isOpen:$.open,onClose:()=>E({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.$n,{variant:"ghost",onClick:()=>E({open:!1,mode:"",password:""}),disabled:U,children:"Cancel"}),(0,a.jsx)(i.$n,{variant:"primary",onClick:eP,loading:U,disabled:!$.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===$.mode?"export":"import"," the database."]}),(0,a.jsx)(i.pd,{type:"password",value:$.password,onChange:e=>E(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&$.password&&eP()},placeholder:"Current password",autoFocus:!0})]})]})}},76086:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[2574,3862,1051,1321,705,5497,8441,3794,7358],()=>e(e.s=76086)),_N_E=e.O()}]);