@rsalmn/extremerouter 0.8.2 → 0.8.4

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 (1232) hide show
  1. package/README.md +89 -89
  2. package/app/.next-cli-build/BUILD_ID +1 -1
  3. package/app/.next-cli-build/app-path-routes-manifest.json +13 -9
  4. package/app/.next-cli-build/build-manifest.json +4 -4
  5. package/app/.next-cli-build/prerender-manifest.json +3 -3
  6. package/app/.next-cli-build/react-loadable-manifest.json +1 -13
  7. package/app/.next-cli-build/required-server-files.json +23 -23
  8. package/app/.next-cli-build/routes-manifest.json +24 -0
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +3 -3
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -0
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -0
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -0
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  94. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  105. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  108. package/app/.next-cli-build/server/app/_not-found.rsc +7 -6
  109. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +7 -6
  110. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  111. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  112. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  114. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -2
  115. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/alerts/test/route_client-reference-manifest.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route_client-reference-manifest.js +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/oidc/start/route_client-reference-manifest.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/oidc/test/route_client-reference-manifest.js +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/auth/reset-password/route_client-reference-manifest.js +1 -1
  136. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  139. package/app/.next-cli-build/server/app/api/breaker/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/breaker/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/breaker/route_client-reference-manifest.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cache/route_client-reference-manifest.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  146. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route_client-reference-manifest.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  164. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  170. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route_client-reference-manifest.js +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  173. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route_client-reference-manifest.js +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  176. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route_client-reference-manifest.js +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  179. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  182. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route_client-reference-manifest.js +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  185. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route_client-reference-manifest.js +1 -1
  187. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  188. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  190. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  191. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  193. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
  196. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  199. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/combos/route_client-reference-manifest.js +1 -1
  202. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/combos/validate-roles/route_client-reference-manifest.js +1 -1
  205. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  206. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/dashboard/stream/route_client-reference-manifest.js +1 -1
  208. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/headroom/start/route_client-reference-manifest.js +1 -1
  211. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/headroom/status/route_client-reference-manifest.js +1 -1
  214. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  215. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/headroom/stop/route_client-reference-manifest.js +1 -1
  217. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/health/providers/route_client-reference-manifest.js +1 -1
  220. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/health/route_client-reference-manifest.js +1 -1
  223. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  224. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/health/stream/route_client-reference-manifest.js +1 -1
  226. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/init/route_client-reference-manifest.js +1 -1
  229. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  232. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/keys/route_client-reference-manifest.js +1 -1
  235. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/locale/route_client-reference-manifest.js +1 -1
  238. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  239. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route_client-reference-manifest.js +1 -1
  241. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  242. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route_client-reference-manifest.js +1 -1
  244. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -1
  247. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route_client-reference-manifest.js +1 -1
  250. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -1
  253. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route_client-reference-manifest.js +1 -1
  256. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route_client-reference-manifest.js +1 -1
  259. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  262. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  265. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/models/custom/route_client-reference-manifest.js +1 -1
  268. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/models/disabled/route_client-reference-manifest.js +1 -1
  271. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/models/route_client-reference-manifest.js +1 -1
  274. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/1min/import/route_client-reference-manifest.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route_client-reference-manifest.js +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  290. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route_client-reference-manifest.js +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
  301. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js +1 -0
  302. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js.nft.json +1 -0
  303. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route_client-reference-manifest.js +1 -0
  304. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js +1 -0
  305. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js.nft.json +1 -0
  306. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route_client-reference-manifest.js +1 -0
  307. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js +1 -0
  308. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js.nft.json +1 -0
  309. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route_client-reference-manifest.js +1 -0
  310. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route_client-reference-manifest.js +1 -1
  313. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  316. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  319. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route_client-reference-manifest.js +1 -1
  322. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  325. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  328. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route_client-reference-manifest.js +1 -1
  331. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route_client-reference-manifest.js +1 -1
  334. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +38 -2
  335. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route_client-reference-manifest.js +1 -1
  337. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/oauth/zed/import/route_client-reference-manifest.js +1 -1
  340. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  343. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  346. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  349. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  352. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route_client-reference-manifest.js +1 -1
  355. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route_client-reference-manifest.js +1 -1
  358. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route_client-reference-manifest.js +1 -1
  361. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route_client-reference-manifest.js +1 -1
  364. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  367. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route_client-reference-manifest.js +1 -1
  370. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route_client-reference-manifest.js +1 -1
  373. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route_client-reference-manifest.js +1 -1
  376. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  379. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  382. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  385. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route_client-reference-manifest.js +1 -1
  388. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route_client-reference-manifest.js +1 -1
  391. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route_client-reference-manifest.js +1 -1
  394. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  397. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route_client-reference-manifest.js +1 -1
  400. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/providers/route_client-reference-manifest.js +1 -1
  403. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/providers/suggested-models/route_client-reference-manifest.js +1 -1
  406. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  409. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  412. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +1 -1
  415. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +1 -1
  418. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  419. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route_client-reference-manifest.js +1 -1
  421. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  422. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route_client-reference-manifest.js +1 -1
  424. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/proxy-pools/route_client-reference-manifest.js +1 -1
  427. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  428. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route_client-reference-manifest.js +1 -1
  430. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  431. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/pxpipe/install/route_client-reference-manifest.js +1 -1
  433. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  434. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/pxpipe/status/route_client-reference-manifest.js +1 -1
  436. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  439. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  442. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  445. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/settings/route_client-reference-manifest.js +1 -1
  448. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  451. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/swarm/active/route_client-reference-manifest.js +1 -1
  454. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
  455. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/swarm/stream/route_client-reference-manifest.js +1 -1
  457. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/tags/route_client-reference-manifest.js +1 -1
  460. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  463. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  464. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  466. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  467. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  468. package/app/.next-cli-build/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  469. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  472. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  473. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  475. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  478. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  479. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  480. package/app/.next-cli-build/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  481. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  484. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  485. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  486. package/app/.next-cli-build/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  487. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route_client-reference-manifest.js +1 -1
  490. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  491. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route_client-reference-manifest.js +1 -1
  493. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route_client-reference-manifest.js +1 -1
  496. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  497. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  498. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route_client-reference-manifest.js +1 -1
  499. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  500. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route_client-reference-manifest.js +1 -1
  502. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  503. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  504. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  505. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  506. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  507. package/app/.next-cli-build/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  508. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  509. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  510. package/app/.next-cli-build/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  511. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  512. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  513. package/app/.next-cli-build/server/app/api/usage/leaderboard/route_client-reference-manifest.js +1 -1
  514. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  515. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  516. package/app/.next-cli-build/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
  517. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  518. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  519. package/app/.next-cli-build/server/app/api/usage/meta/route_client-reference-manifest.js +1 -1
  520. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  521. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  522. package/app/.next-cli-build/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  523. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  524. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  525. package/app/.next-cli-build/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  526. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  527. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  528. package/app/.next-cli-build/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  529. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  530. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/api/usage/retry-stats/route_client-reference-manifest.js +1 -1
  532. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  533. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  534. package/app/.next-cli-build/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
  535. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  536. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  537. package/app/.next-cli-build/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  538. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  539. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  540. package/app/.next-cli-build/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  541. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  542. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  543. package/app/.next-cli-build/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  544. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  545. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  546. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  547. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  548. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/api/v1/audio/voices/route_client-reference-manifest.js +1 -1
  550. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  551. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  552. package/app/.next-cli-build/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  553. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  554. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  555. package/app/.next-cli-build/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  556. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  557. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  558. package/app/.next-cli-build/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  559. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  560. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  561. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  562. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  563. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  564. package/app/.next-cli-build/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  565. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  566. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  567. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +1 -1
  568. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  569. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  570. package/app/.next-cli-build/server/app/api/v1/models/info/route_client-reference-manifest.js +1 -1
  571. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  572. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  573. package/app/.next-cli-build/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  574. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  575. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  576. package/app/.next-cli-build/server/app/api/v1/responses/compact/route_client-reference-manifest.js +1 -1
  577. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  578. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  579. package/app/.next-cli-build/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  580. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  581. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  582. package/app/.next-cli-build/server/app/api/v1/route_client-reference-manifest.js +1 -1
  583. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  584. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  585. package/app/.next-cli-build/server/app/api/v1/search/route_client-reference-manifest.js +1 -1
  586. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  587. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  588. package/app/.next-cli-build/server/app/api/v1/web/fetch/route_client-reference-manifest.js +1 -1
  589. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  590. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  591. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  592. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  593. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  594. package/app/.next-cli-build/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  595. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  596. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  597. package/app/.next-cli-build/server/app/api/version/route_client-reference-manifest.js +1 -1
  598. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  599. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  600. package/app/.next-cli-build/server/app/api/version/shutdown/route_client-reference-manifest.js +1 -1
  601. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  602. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  603. package/app/.next-cli-build/server/app/api/version/update/route_client-reference-manifest.js +1 -1
  604. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  605. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  606. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  607. package/app/.next-cli-build/server/app/callback.html +1 -1
  608. package/app/.next-cli-build/server/app/callback.rsc +8 -7
  609. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +8 -7
  610. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  612. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -2
  613. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  614. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  615. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  616. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  618. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  619. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +8 -7
  620. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +8 -7
  621. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  622. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  623. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -2
  624. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  625. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  626. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  628. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  629. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  630. package/app/.next-cli-build/server/app/index.html +1 -1
  631. package/app/.next-cli-build/server/app/index.rsc +7 -6
  632. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  633. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +7 -6
  634. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  635. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  636. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -2
  637. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  638. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  639. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  640. package/app/.next-cli-build/server/app/landing.html +1 -1
  641. package/app/.next-cli-build/server/app/landing.rsc +8 -7
  642. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +8 -7
  643. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  644. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  645. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -2
  646. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  647. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  648. package/app/.next-cli-build/server/app/login/page.js +2 -2
  649. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  650. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  651. package/app/.next-cli-build/server/app/login.html +1 -1
  652. package/app/.next-cli-build/server/app/login.rsc +8 -7
  653. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +8 -7
  654. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  655. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  656. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -2
  657. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  658. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  659. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  660. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  661. package/app/.next-cli-build/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  662. package/app/.next-cli-build/server/app/page.js +2 -2
  663. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  664. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  665. package/app/.next-cli-build/server/app-paths-manifest.json +13 -9
  666. package/app/.next-cli-build/server/chunks/1241.js +1 -1
  667. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  668. package/app/.next-cli-build/server/chunks/1429.js +1 -0
  669. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  670. package/app/.next-cli-build/server/chunks/212.js +1 -1
  671. package/app/.next-cli-build/server/chunks/2231.js +1 -1
  672. package/app/.next-cli-build/server/chunks/2409.js +1 -0
  673. package/app/.next-cli-build/server/chunks/2701.js +1 -1
  674. package/app/.next-cli-build/server/chunks/2742.js +1 -0
  675. package/app/.next-cli-build/server/chunks/319.js +3 -3
  676. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  677. package/app/.next-cli-build/server/chunks/3735.js +1 -1
  678. package/app/.next-cli-build/server/chunks/4046.js +1 -0
  679. package/app/.next-cli-build/server/chunks/412.js +2 -2
  680. package/app/.next-cli-build/server/chunks/5330.js +70 -68
  681. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  682. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  683. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  684. package/app/.next-cli-build/server/chunks/5852.js +1 -1
  685. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  686. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  687. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  688. package/app/.next-cli-build/server/chunks/{7152.js → 6482.js} +2 -2
  689. package/app/.next-cli-build/server/chunks/6560.js +1 -0
  690. package/app/.next-cli-build/server/chunks/6777.js +1 -1
  691. package/app/.next-cli-build/server/chunks/7187.js +1 -1
  692. package/app/.next-cli-build/server/chunks/7218.js +1 -0
  693. package/app/.next-cli-build/server/chunks/7410.js +1 -0
  694. package/app/.next-cli-build/server/chunks/7566.js +3 -0
  695. package/app/.next-cli-build/server/chunks/7774.js +18 -18
  696. package/app/.next-cli-build/server/chunks/7872.js +1 -1
  697. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  698. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  699. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  700. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  701. package/app/.next-cli-build/server/chunks/8802.js +2 -0
  702. package/app/.next-cli-build/server/chunks/885.js +75 -0
  703. package/app/.next-cli-build/server/chunks/8895.js +6 -6
  704. package/app/.next-cli-build/server/chunks/8955.js +16 -0
  705. package/app/.next-cli-build/server/chunks/9422.js +1 -1
  706. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  707. package/app/.next-cli-build/server/chunks/9703.js +1 -1
  708. package/app/.next-cli-build/server/chunks/9903.js +1 -1
  709. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  710. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  711. package/app/.next-cli-build/server/middleware.js +5 -5
  712. package/app/.next-cli-build/server/next-font-manifest.js +1 -1
  713. package/app/.next-cli-build/server/next-font-manifest.json +1 -1
  714. package/app/.next-cli-build/server/pages/404.html +1 -1
  715. package/app/.next-cli-build/server/pages/500.html +1 -1
  716. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  717. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  718. package/app/.next-cli-build/static/JRaGItQgERhBp83cHyRqE/_buildManifest.js +1 -0
  719. package/app/.next-cli-build/static/chunks/{1321-aa0d45362a7ebc08.js → 1321-a7bfb848c63bdbf7.js} +1 -1
  720. package/app/.next-cli-build/static/chunks/1992-7359483e85c66d42.js +1 -0
  721. package/app/.next-cli-build/static/chunks/5497-6eb58895074fec6d.js +7 -0
  722. package/app/.next-cli-build/static/chunks/705-35d16348285626c8.js +1 -0
  723. package/app/.next-cli-build/static/chunks/8105-49cec265df0de251.js +1 -0
  724. package/app/.next-cli-build/static/chunks/{8720-bbafc2ad7d186ebd.js → 8982-6d1803817450bcd4.js} +2 -2
  725. package/app/.next-cli-build/static/chunks/981-777b2911f938c030.js +3 -0
  726. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-920869c698a8b3cf.js → page-c263cd784e69e6f1.js} +1 -1
  727. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-75247ad22e97f7cc.js → page-ecd3a85a40e51c66.js} +1 -1
  728. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-3c3074cf3f61df46.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-8b043b8296199edb.js → page-f7cdc992cb310077.js} +1 -1
  730. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b4a78d784383253c.js +3 -0
  731. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-959b3ee3c662de33.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-5689c88f2746c37a.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/{page-ec1dc4e44702257d.js → page-133cf1aa2ce53c87.js} +1 -1
  734. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-b635b8b051acb5a5.js → page-7d472b122fb182f0.js} +10 -10
  735. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-83272baae17d38f1.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-a36b3b632d16f4cb.js → page-f36e5ac11783fd1e.js} +2 -2
  737. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-4069e1d40a3c70a6.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-e794909abbc7a09a.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-1d972fd3baee7474.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-2dae733c8e1582bf.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-7325c65533e4cf60.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/{page-dc8e49b1fe778d9c.js → page-e7ba910803086460.js} +1 -1
  743. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0f877a8a2550a1ea.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-2e82495d63f499e9.js → page-6b500acebeff856b.js} +2 -2
  745. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-8965749fb7d0fac3.js → page-bcf9d97ab4dc20d9.js} +1 -1
  746. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5b11b61863963cad.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-843c810c0818ce1b.js → page-58d8d0fa5523ff95.js} +1 -1
  748. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c02ccb0fd35970d1.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-97c920b552343488.js → page-a8b151d5ae9004ea.js} +1 -1
  750. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-594a59006196a03a.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-d57c129c03c9cb36.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-a8af04fbd6293d2f.js → page-61d162d7a7f88a11.js} +1 -1
  753. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-bd421513fd2dc28a.js → page-483f01fd35d212f5.js} +1 -1
  754. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-0a63db83d5e05667.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/_global-error/page-158df2528a1edacc.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/_not-found/{page-732ac0fa56005849.js → page-0161671512f52984.js} +1 -1
  757. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-158df2528a1edacc.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-158df2528a1edacc.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-158df2528a1edacc.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-158df2528a1edacc.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-158df2528a1edacc.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-158df2528a1edacc.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-158df2528a1edacc.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-158df2528a1edacc.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/breaker/route-158df2528a1edacc.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/cache/route-158df2528a1edacc.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-158df2528a1edacc.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-158df2528a1edacc.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-158df2528a1edacc.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-158df2528a1edacc.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-158df2528a1edacc.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-158df2528a1edacc.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-158df2528a1edacc.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-158df2528a1edacc.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-158df2528a1edacc.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-158df2528a1edacc.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-158df2528a1edacc.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-158df2528a1edacc.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-158df2528a1edacc.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-158df2528a1edacc.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-158df2528a1edacc.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-158df2528a1edacc.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-158df2528a1edacc.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-158df2528a1edacc.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/combos/route-158df2528a1edacc.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-158df2528a1edacc.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-158df2528a1edacc.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-158df2528a1edacc.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-158df2528a1edacc.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-158df2528a1edacc.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-158df2528a1edacc.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/health/route-158df2528a1edacc.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-158df2528a1edacc.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/init/route-158df2528a1edacc.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-158df2528a1edacc.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/keys/route-158df2528a1edacc.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/locale/route-158df2528a1edacc.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-158df2528a1edacc.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-158df2528a1edacc.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-158df2528a1edacc.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-158df2528a1edacc.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-158df2528a1edacc.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-158df2528a1edacc.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-158df2528a1edacc.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-158df2528a1edacc.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-158df2528a1edacc.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-158df2528a1edacc.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-158df2528a1edacc.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/models/route-158df2528a1edacc.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/models/test/route-158df2528a1edacc.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-158df2528a1edacc.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-158df2528a1edacc.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-158df2528a1edacc.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-158df2528a1edacc.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-158df2528a1edacc.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-158df2528a1edacc.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-158df2528a1edacc.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-158df2528a1edacc.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-158df2528a1edacc.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-158df2528a1edacc.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-158df2528a1edacc.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-158df2528a1edacc.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-158df2528a1edacc.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-158df2528a1edacc.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-158df2528a1edacc.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-158df2528a1edacc.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-158df2528a1edacc.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-158df2528a1edacc.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-158df2528a1edacc.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-158df2528a1edacc.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-158df2528a1edacc.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/pricing/route-158df2528a1edacc.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-158df2528a1edacc.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-158df2528a1edacc.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-158df2528a1edacc.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-158df2528a1edacc.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-158df2528a1edacc.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-158df2528a1edacc.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-158df2528a1edacc.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-158df2528a1edacc.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-158df2528a1edacc.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-158df2528a1edacc.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-158df2528a1edacc.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-158df2528a1edacc.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-158df2528a1edacc.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-158df2528a1edacc.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-158df2528a1edacc.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-158df2528a1edacc.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-158df2528a1edacc.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-158df2528a1edacc.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-158df2528a1edacc.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/providers/route-158df2528a1edacc.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-158df2528a1edacc.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-158df2528a1edacc.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-158df2528a1edacc.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-158df2528a1edacc.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-158df2528a1edacc.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-158df2528a1edacc.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-158df2528a1edacc.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-158df2528a1edacc.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-158df2528a1edacc.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-158df2528a1edacc.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-158df2528a1edacc.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-158df2528a1edacc.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-158df2528a1edacc.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-158df2528a1edacc.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/settings/route-158df2528a1edacc.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-158df2528a1edacc.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-158df2528a1edacc.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-158df2528a1edacc.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/tags/route-158df2528a1edacc.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-158df2528a1edacc.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-158df2528a1edacc.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-158df2528a1edacc.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-158df2528a1edacc.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-158df2528a1edacc.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-158df2528a1edacc.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-158df2528a1edacc.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-158df2528a1edacc.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-158df2528a1edacc.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-158df2528a1edacc.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-158df2528a1edacc.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-158df2528a1edacc.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-158df2528a1edacc.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-158df2528a1edacc.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-158df2528a1edacc.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-158df2528a1edacc.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-158df2528a1edacc.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-158df2528a1edacc.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-158df2528a1edacc.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-158df2528a1edacc.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-158df2528a1edacc.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-158df2528a1edacc.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-158df2528a1edacc.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-158df2528a1edacc.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-158df2528a1edacc.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-158df2528a1edacc.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-158df2528a1edacc.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-158df2528a1edacc.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-158df2528a1edacc.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-158df2528a1edacc.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-158df2528a1edacc.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-158df2528a1edacc.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-158df2528a1edacc.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-158df2528a1edacc.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-158df2528a1edacc.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-158df2528a1edacc.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-158df2528a1edacc.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-158df2528a1edacc.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-158df2528a1edacc.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-158df2528a1edacc.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/v1/route-158df2528a1edacc.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-158df2528a1edacc.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-158df2528a1edacc.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-158df2528a1edacc.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-158df2528a1edacc.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/version/route-158df2528a1edacc.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-158df2528a1edacc.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/version/update/route-158df2528a1edacc.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/callback/{page-4e8ab9d9128acffb.js → page-20e990994d8da6d3.js} +1 -1
  921. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/{page-d4eb2ba84eef2143.js → page-bb9f307074c5c23a.js} +1 -1
  922. package/app/.next-cli-build/static/chunks/app/landing/{page-ade86a48ca5749f4.js → page-468c5cb1d127c02a.js} +1 -1
  923. package/app/.next-cli-build/static/chunks/app/layout-10bff7b57a2a3c2c.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/login/page-32ab5d7c75651107.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-158df2528a1edacc.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/page-158df2528a1edacc.js +1 -0
  927. package/app/.next-cli-build/static/chunks/main-ab3c4d38db15f747.js +5 -0
  928. package/app/.next-cli-build/static/chunks/main-app-f661afc91c813cfe.js +1 -0
  929. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-158df2528a1edacc.js +1 -0
  930. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-158df2528a1edacc.js +1 -0
  931. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-8fecb2690f5e9ae2.js +1 -0
  932. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-158df2528a1edacc.js +1 -0
  933. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-158df2528a1edacc.js +1 -0
  934. package/app/.next-cli-build/static/chunks/webpack-c2bac8d80aa27536.js +1 -0
  935. package/app/.next-cli-build/static/css/d25230f8c6390408.css +1 -0
  936. package/app/custom-server.js +9 -0
  937. package/app/node_modules/nanoid/package.json +1 -1
  938. package/app/package.json +9 -6
  939. package/app/public/i18n/literals/ar.json +195 -195
  940. package/app/public/i18n/literals/bn.json +195 -195
  941. package/app/public/i18n/literals/cs.json +195 -195
  942. package/app/public/i18n/literals/da.json +195 -195
  943. package/app/public/i18n/literals/de.json +195 -195
  944. package/app/public/i18n/literals/el.json +195 -195
  945. package/app/public/i18n/literals/es.json +195 -195
  946. package/app/public/i18n/literals/fi.json +195 -195
  947. package/app/public/i18n/literals/fr.json +195 -195
  948. package/app/public/i18n/literals/he.json +195 -195
  949. package/app/public/i18n/literals/hi.json +195 -195
  950. package/app/public/i18n/literals/hu.json +195 -195
  951. package/app/public/i18n/literals/id.json +195 -195
  952. package/app/public/i18n/literals/it.json +195 -195
  953. package/app/public/i18n/literals/ja.json +195 -195
  954. package/app/public/i18n/literals/ko.json +195 -195
  955. package/app/public/i18n/literals/nl.json +195 -195
  956. package/app/public/i18n/literals/no.json +195 -195
  957. package/app/public/i18n/literals/pl.json +195 -195
  958. package/app/public/i18n/literals/pt-BR.json +195 -195
  959. package/app/public/i18n/literals/pt-PT.json +195 -195
  960. package/app/public/i18n/literals/ro.json +195 -195
  961. package/app/public/i18n/literals/ru.json +195 -195
  962. package/app/public/i18n/literals/sv.json +195 -195
  963. package/app/public/i18n/literals/th.json +195 -195
  964. package/app/public/i18n/literals/tl.json +195 -195
  965. package/app/public/i18n/literals/tr.json +195 -195
  966. package/app/public/i18n/literals/uk.json +195 -195
  967. package/app/public/i18n/literals/ur.json +195 -195
  968. package/app/public/i18n/literals/vi.json +195 -195
  969. package/app/public/i18n/literals/zh-CN.json +773 -773
  970. package/app/public/i18n/literals/zh-TW.json +195 -195
  971. package/app/public/providers/agnes-api.svg +6 -6
  972. package/app/public/providers/agnes-web.svg +6 -6
  973. package/app/public/providers/alibaba-cn.svg +11 -11
  974. package/app/public/providers/alibaba.svg +11 -11
  975. package/app/public/providers/bynara.svg +22 -22
  976. package/app/public/providers/codebuddy-intl.png +0 -0
  977. package/app/public/providers/devin.svg +5 -5
  978. package/app/public/providers/featherless.svg +8 -8
  979. package/app/public/providers/forge.svg +9 -9
  980. package/app/public/providers/freebuff-web.svg +6 -6
  981. package/app/public/providers/hcnsec.svg +10 -10
  982. package/app/public/providers/inferx.svg +8 -0
  983. package/app/public/providers/inxorastudio-web.svg +4 -4
  984. package/app/public/providers/inxorastudio.svg +4 -4
  985. package/app/public/providers/kimi-desktop.svg +9 -0
  986. package/app/public/providers/moonshot.svg +8 -8
  987. package/app/public/providers/novita.svg +6 -0
  988. package/app/public/providers/openvecta.svg +7 -7
  989. package/app/public/providers/perplexity-agent.svg +13 -13
  990. package/app/public/providers/qwen-cloud.svg +1 -1
  991. package/app/public/providers/qwencloud.svg +6 -6
  992. package/app/public/providers/stepfun.svg +53 -53
  993. package/app/public/providers/tokenrouter.svg +15 -15
  994. package/app/public/providers/workbuddy.png +0 -0
  995. package/app/public/providers/wp-studio.svg +11 -11
  996. package/app/public/providers/zed.svg +11 -11
  997. package/app/public/providers/zenmux-free.svg +9 -9
  998. package/app/server.js +1 -1
  999. package/app/src/lib/db/adapters/sqljsAdapter.js +115 -115
  1000. package/app/src/lib/db/migrate.js +286 -286
  1001. package/app/src/lib/network/pickProxyPoolId.js +38 -38
  1002. package/app/src/lib/updater/updater.js +235 -235
  1003. package/app/src/mitm/server.js +2 -2
  1004. package/cli.js +830 -830
  1005. package/package.json +66 -66
  1006. package/src/cli/api/client.js +556 -556
  1007. package/src/cli/menus/cliTools.js +618 -618
  1008. package/src/cli/terminalUI.js +121 -121
  1009. package/src/cli/tray/autostart.js +306 -306
  1010. package/src/cli/tray/tray.js +322 -322
  1011. package/src/cli/tray/tray.ps1 +130 -130
  1012. package/app/.next-cli-build/server/chunks/1051.js +0 -1
  1013. package/app/.next-cli-build/server/chunks/1216.js +0 -3
  1014. package/app/.next-cli-build/server/chunks/2926.js +0 -75
  1015. package/app/.next-cli-build/server/chunks/4502.js +0 -16
  1016. package/app/.next-cli-build/server/chunks/4632.js +0 -1
  1017. package/app/.next-cli-build/server/chunks/541.js +0 -1
  1018. package/app/.next-cli-build/server/chunks/615.js +0 -1
  1019. package/app/.next-cli-build/server/chunks/6316.js +0 -2
  1020. package/app/.next-cli-build/server/chunks/6686.js +0 -1
  1021. package/app/.next-cli-build/server/chunks/9140.js +0 -1
  1022. package/app/.next-cli-build/server/chunks/9630.js +0 -1
  1023. package/app/.next-cli-build/static/S-pbWChrUiCkwFyfx4Su3/_buildManifest.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/1696-bafe4b44a7a0439e.js +0 -3
  1025. package/app/.next-cli-build/static/chunks/1966.b8f83f7ba376c962.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/1992-b492aa3235a8c259.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/3899.3f761f7e3a944e8c.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/5497-b321fb89cc6d6e14.js +0 -7
  1029. package/app/.next-cli-build/static/chunks/705-b7d7b61f41806f0d.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/8105-204edc780a329497.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-cd77e53dbcd46b6c.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-dbf52954681b093c.js +0 -3
  1033. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-a8c4d8c681e19868.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-408845bd809806a6.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-d9958dfec1d2e28e.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-92a0799a23d869b3.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-a67cd1c5f77da355.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-262fa6911888d4f1.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-f644da989b8878c3.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-aa26b25a26b5dac8.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-96d3eb0dfde0711b.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-9a44fa1600f3ff42.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-9739651f4f19cec6.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-2f3b8761d7b32ec0.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-9144cc5f6a208199.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/_global-error/page-ab464cb25617d9dd.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-ab464cb25617d9dd.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-ab464cb25617d9dd.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-ab464cb25617d9dd.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-ab464cb25617d9dd.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-ab464cb25617d9dd.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-ab464cb25617d9dd.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-ab464cb25617d9dd.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-ab464cb25617d9dd.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/breaker/route-ab464cb25617d9dd.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/cache/route-ab464cb25617d9dd.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-ab464cb25617d9dd.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-ab464cb25617d9dd.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-ab464cb25617d9dd.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-ab464cb25617d9dd.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-ab464cb25617d9dd.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-ab464cb25617d9dd.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-ab464cb25617d9dd.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-ab464cb25617d9dd.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-ab464cb25617d9dd.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-ab464cb25617d9dd.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-ab464cb25617d9dd.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-ab464cb25617d9dd.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-ab464cb25617d9dd.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-ab464cb25617d9dd.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-ab464cb25617d9dd.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-ab464cb25617d9dd.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-ab464cb25617d9dd.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-ab464cb25617d9dd.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/combos/route-ab464cb25617d9dd.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-ab464cb25617d9dd.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-ab464cb25617d9dd.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-ab464cb25617d9dd.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-ab464cb25617d9dd.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-ab464cb25617d9dd.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-ab464cb25617d9dd.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/health/route-ab464cb25617d9dd.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-ab464cb25617d9dd.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/init/route-ab464cb25617d9dd.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-ab464cb25617d9dd.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/keys/route-ab464cb25617d9dd.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/locale/route-ab464cb25617d9dd.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-ab464cb25617d9dd.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-ab464cb25617d9dd.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-ab464cb25617d9dd.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-ab464cb25617d9dd.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-ab464cb25617d9dd.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-ab464cb25617d9dd.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-ab464cb25617d9dd.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-ab464cb25617d9dd.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-ab464cb25617d9dd.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-ab464cb25617d9dd.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-ab464cb25617d9dd.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/models/route-ab464cb25617d9dd.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/models/test/route-ab464cb25617d9dd.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-ab464cb25617d9dd.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-ab464cb25617d9dd.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-ab464cb25617d9dd.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-ab464cb25617d9dd.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-ab464cb25617d9dd.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-ab464cb25617d9dd.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-ab464cb25617d9dd.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-ab464cb25617d9dd.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-ab464cb25617d9dd.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-ab464cb25617d9dd.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-ab464cb25617d9dd.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-ab464cb25617d9dd.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-ab464cb25617d9dd.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-ab464cb25617d9dd.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-ab464cb25617d9dd.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-ab464cb25617d9dd.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-ab464cb25617d9dd.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-ab464cb25617d9dd.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/pricing/route-ab464cb25617d9dd.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-ab464cb25617d9dd.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-ab464cb25617d9dd.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-ab464cb25617d9dd.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-ab464cb25617d9dd.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-ab464cb25617d9dd.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-ab464cb25617d9dd.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-ab464cb25617d9dd.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-ab464cb25617d9dd.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-ab464cb25617d9dd.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-ab464cb25617d9dd.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-ab464cb25617d9dd.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-ab464cb25617d9dd.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-ab464cb25617d9dd.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-ab464cb25617d9dd.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-ab464cb25617d9dd.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-ab464cb25617d9dd.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-ab464cb25617d9dd.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-ab464cb25617d9dd.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-ab464cb25617d9dd.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/providers/route-ab464cb25617d9dd.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-ab464cb25617d9dd.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-ab464cb25617d9dd.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-ab464cb25617d9dd.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-ab464cb25617d9dd.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-ab464cb25617d9dd.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-ab464cb25617d9dd.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-ab464cb25617d9dd.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-ab464cb25617d9dd.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-ab464cb25617d9dd.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-ab464cb25617d9dd.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-ab464cb25617d9dd.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-ab464cb25617d9dd.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-ab464cb25617d9dd.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-ab464cb25617d9dd.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/settings/route-ab464cb25617d9dd.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-ab464cb25617d9dd.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-ab464cb25617d9dd.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-ab464cb25617d9dd.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/tags/route-ab464cb25617d9dd.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-ab464cb25617d9dd.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-ab464cb25617d9dd.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-ab464cb25617d9dd.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-ab464cb25617d9dd.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-ab464cb25617d9dd.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-ab464cb25617d9dd.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-ab464cb25617d9dd.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-ab464cb25617d9dd.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-ab464cb25617d9dd.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-ab464cb25617d9dd.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-ab464cb25617d9dd.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-ab464cb25617d9dd.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-ab464cb25617d9dd.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-ab464cb25617d9dd.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-ab464cb25617d9dd.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-ab464cb25617d9dd.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-ab464cb25617d9dd.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-ab464cb25617d9dd.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-ab464cb25617d9dd.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-ab464cb25617d9dd.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-ab464cb25617d9dd.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-ab464cb25617d9dd.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-ab464cb25617d9dd.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-ab464cb25617d9dd.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-ab464cb25617d9dd.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-ab464cb25617d9dd.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-ab464cb25617d9dd.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-ab464cb25617d9dd.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-ab464cb25617d9dd.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-ab464cb25617d9dd.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-ab464cb25617d9dd.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-ab464cb25617d9dd.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-ab464cb25617d9dd.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-ab464cb25617d9dd.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-ab464cb25617d9dd.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-ab464cb25617d9dd.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-ab464cb25617d9dd.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-ab464cb25617d9dd.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-ab464cb25617d9dd.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-ab464cb25617d9dd.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/v1/route-ab464cb25617d9dd.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-ab464cb25617d9dd.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-ab464cb25617d9dd.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-ab464cb25617d9dd.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-ab464cb25617d9dd.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/version/route-ab464cb25617d9dd.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-ab464cb25617d9dd.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/version/update/route-ab464cb25617d9dd.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/layout-16b611f4f5717ccd.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/login/page-0831b035aa4c0f17.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-ab464cb25617d9dd.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/page-ab464cb25617d9dd.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/main-28015457a328b97c.js +0 -5
  1212. package/app/.next-cli-build/static/chunks/main-app-705d8c306f358a5f.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-ab464cb25617d9dd.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-ab464cb25617d9dd.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-22e44aa316880902.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-ab464cb25617d9dd.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-ab464cb25617d9dd.js +0 -1
  1218. package/app/.next-cli-build/static/chunks/webpack-a990cabb6976f421.js +0 -1
  1219. package/app/.next-cli-build/static/css/68d66160ca549ddc.css +0 -1
  1220. package/app/cli/.build-home/AppData/Local/npm-cache/_update-notifier-last-checked +0 -0
  1221. package/app/cli/.build-home/AppData/Roaming/extremerouter/.migrated-from +0 -1
  1222. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/schema-3-to-4-0.8.0-20260802-152036/data.sqlite +0 -0
  1223. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.8-to-0.7.9-0.7.9-20260729-181011/data.sqlite +0 -0
  1224. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.9-to-0.8.0-0.8.0-20260729-213634/data.sqlite +0 -0
  1225. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.8.0-to-0.8.1-0.8.1-20260802-152517/data.sqlite +0 -0
  1226. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite +0 -0
  1227. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
  1228. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
  1229. package/app/cli/.build-home/AppData/Roaming/extremerouter/jwt-secret +0 -1
  1230. package/app/cli/.build-home/AppData/Roaming/extremerouter/machine-id +0 -1
  1231. package/app/cli/.build-home/AppData/Roaming/nextjs-nodejs/Config/config.json +0 -7
  1232. /package/app/.next-cli-build/static/{S-pbWChrUiCkwFyfx4Su3 → JRaGItQgERhBp83cHyRqE}/_ssgManifest.js +0 -0
@@ -1,9 +1,9 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8720],{1934:(e,t,r)=>{"use strict";r.d(t,{v:()=>u});var n=r(12115);let a=e=>{let t,r=new Set,n=(e,n)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=n?n:"object"!=typeof a||null===a)?a:Object.assign({},t,a),r.forEach(r=>r(t,e))}},a=()=>t,i={setState:n,getState:a,getInitialState:()=>u,subscribe:e=>(r.add(e),()=>r.delete(e))},u=t=e(n,a,i);return i},i=e=>{let t=e?a(e):a,r=e=>(function(e,t=e=>e){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},u=e=>e?i(e):i},5887:()=>{},26300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({html:e,height:t=null,width:r=null,children:i,dataNtpc:u=""}){return(0,a.useEffect)(()=>{u&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${u}`}})},[u]),(0,n.jsxs)(n.Fragment,{children:[i,e?(0,n.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=r?`${r}px`:"auto"},"data-ntpc":u,dangerouslySetInnerHTML:{__html:e}}):null]})};let n=r(95155),a=r(12115)},28356:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={cancelIdleCallback:function(){return i},requestIdleCallback:function(){return a}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let a="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},i="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},30565:(e,t,r)=>{"use strict";var n;let a;Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=function(e){let{gaId:t,debugMode:r,dataLayerName:n="dataLayer",nonce:l}=e;return void 0===a&&(a=n),(0,u.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:`
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8982],{1934:(e,t,r)=>{"use strict";r.d(t,{v:()=>u});var n=r(12115);let a=e=>{let t,r=new Set,n=(e,n)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=n?n:"object"!=typeof a||null===a)?a:Object.assign({},t,a),r.forEach(r=>r(t,e))}},a=()=>t,i={setState:n,getState:a,getInitialState:()=>u,subscribe:e=>(r.add(e),()=>r.delete(e))},u=t=e(n,a,i);return i},i=e=>{let t=e?a(e):a,r=e=>(function(e,t=e=>e){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},u=e=>e?i(e):i},5887:()=>{},26300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({html:e,height:t=null,width:r=null,children:i,dataNtpc:u=""}){return(0,a.useEffect)(()=>{u&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${u}`}})},[u]),(0,n.jsxs)(n.Fragment,{children:[i,e?(0,n.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=r?`${r}px`:"auto"},"data-ntpc":u,dangerouslySetInnerHTML:{__html:e}}):null]})};let n=r(95155),a=r(12115)},28356:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={cancelIdleCallback:function(){return i},requestIdleCallback:function(){return a}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let a="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},i="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},30565:(e,t,r)=>{"use strict";var n;let a;Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=function(e){let{gaId:t,debugMode:r,dataLayerName:n="dataLayer",nonce:l}=e;return void 0===a&&(a=n),(0,u.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:`
2
2
  window['${n}'] = window['${n}'] || [];
3
3
  function gtag(){window['${n}'].push(arguments);}
4
4
  gtag('js', new Date());
5
5
 
6
- gtag('config', '${t}' ${r?",{ 'debug_mode': true }":""});`},nonce:l}),(0,i.jsx)(s.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`,nonce:l})]})},t.sendGAEvent=function(){void 0===a?console.warn("@next/third-parties: GA has not been initialized"):window[a]?window[a].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${a} does not exist`)};let i=r(95155),u=r(12115),s=(n=r(65596))&&n.__esModule?n:{default:n}},31692:(e,t,r)=>{"use strict";r.d(t,{Zr:()=>a});let n=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>n(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>n(t)(e)}}},a=(e,t)=>(r,a,i)=>{let u,s={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e,void 0),a=null!=(r=t.getItem(e))?r:null;return a instanceof Promise?a.then(n):n(a)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r,void 0)),removeItem:e=>t.removeItem(e)}}(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,o=0,c=new Set,d=new Set,f=s.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},a,i);let m=()=>{let e=s.partialize({...a()});return f.setItem(s.name,{state:e,version:s.version})},g=i.setState;i.setState=(e,t)=>(g(e,t),m());let p=e((...e)=>(r(...e),m()),a,i);i.getInitialState=()=>p;let h=()=>{var e,t;if(!f)return;let i=++o;l=!1,c.forEach(e=>{var t;return e(null!=(t=a())?t:p)});let g=(null==(t=s.onRehydrateStorage)?void 0:t.call(s,null!=(e=a())?e:p))||void 0;return n(f.getItem.bind(f))(s.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];else{if(s.migrate){let t=s.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;if(i!==o)return;let[n,l]=e;if(r(u=s.merge(l,null!=(t=a())?t:p),!0),n)return m()}).then(()=>{i===o&&(null==g||g(a(),void 0),u=a(),l=!0,d.forEach(e=>e(u)))}).catch(e=>{i===o&&(null==g||g(void 0,e))})};return i.persist={setOptions:e=>{s={...s,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},s.skipHydration||h(),u||p}},42593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={default:function(){return w},handleClientScriptLoad:function(){return _},initScriptLoader:function(){return y}};for(var a in n)Object.defineProperty(t,a,{enumerable:!0,get:n[a]});let i=r(73623),u=r(66388),s=r(95155),l=i._(r(47650)),o=u._(r(12115)),c=r(75368),d=r(3584),f=r(28356),m=r(71922),g=new Map,p=new Set,h=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:a=null,dangerouslySetInnerHTML:i,children:u="",strategy:s="afterInteractive",onError:o,stylesheets:c}=e,f=r||t;if(f&&p.has(f))return;if(g.has(t)){p.add(f),g.get(t).then(n,o);return}let m=()=>{a&&a(),p.add(f)},h=document.createElement("script"),_=new Promise((e,t)=>{h.addEventListener("load",function(t){e(),n&&n.call(this,t),m()}),h.addEventListener("error",function(e){t(e)})}).catch(function(e){o&&o(e)});i?(h.innerHTML=i.__html||"",m()):u?(h.textContent="string"==typeof u?u:Array.isArray(u)?u.join(""):"",m()):t&&(h.src=t,g.set(t,_)),(0,d.setAttributesFromProps)(h,e),"worker"===s&&h.setAttribute("type","text/partytown"),h.setAttribute("data-nscript",s),c&&(e=>{if(l.default.preinit)return e.forEach(e=>{l.default.preinit(e,{as:"style"})});{let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}})(c),document.body.appendChild(h)};function _(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>h(e))}):h(e)}function y(e){e.forEach(_),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");p.add(t)})}function v(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:a=null,strategy:i="afterInteractive",onError:u,stylesheets:d,...g}=e,{updateScripts:_,scripts:y,getIsSsr:v,appDir:w,nonce:b}=(0,o.useContext)(c.HeadManagerContext);b=g.nonce||b;let S=(0,o.useRef)(!1);(0,o.useEffect)(()=>{let e=t||r;S.current||(a&&e&&p.has(e)&&a(),S.current=!0)},[a,t,r]);let I=(0,o.useRef)(!1);if((0,o.useEffect)(()=>{if(!I.current){if("afterInteractive"===i)h(e);else"lazyOnload"===i&&("complete"===document.readyState?(0,f.requestIdleCallback)(()=>h(e)):window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>h(e))}));I.current=!0}},[e,i]),("beforeInteractive"===i||"worker"===i)&&(_?(y[i]=(y[i]||[]).concat([{id:t,src:r,onLoad:n,onReady:a,onError:u,...g,nonce:b}]),_(y)):v&&v()?p.add(t||r):v&&!v()&&h({...e,nonce:b})),w){if(d&&d.forEach(e=>{l.default.preinit(e,{as:"style"})}),"beforeInteractive"===i)if(!r)return g.dangerouslySetInnerHTML&&(g.children=g.dangerouslySetInnerHTML.__html,delete g.dangerouslySetInnerHTML),(0,s.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,m.htmlEscapeJsonString)(JSON.stringify([0,{...g,id:t}]))})`}});else return l.default.preload(r,g.integrity?{as:"script",integrity:g.integrity,nonce:b,crossOrigin:g.crossOrigin}:{as:"script",nonce:b,crossOrigin:g.crossOrigin}),(0,s.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,m.htmlEscapeJsonString)(JSON.stringify([r,{...g,id:t}]))})`}});"afterInteractive"===i&&r&&l.default.preload(r,g.integrity?{as:"script",integrity:g.integrity,nonce:b,crossOrigin:g.crossOrigin}:{as:"script",nonce:b,crossOrigin:g.crossOrigin})}return null}Object.defineProperty(v,"__nextScript",{value:!0});let w=v;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54642:e=>{var t;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="//"),(t={}).endianness=function(){return"LE"},t.hostname=function(){return"u">typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"u">typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"},e.exports=t},57688:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},65596:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a.a});var n=r(42593),a=r.n(n),i={};for(let e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i)},71922:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={ESCAPE_REGEX:function(){return i},htmlEscapeAttributeString:function(){return o},htmlEscapeJsonString:function(){return l}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let a={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},i=/[&><\u2028\u2029]/g,u={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},s=/[&"'<>]/g;function l(e){return e.replace(i,e=>a[e])}function o(e){return e.replace(s,e=>u[e])}},73321:(e,t,r)=>{"use strict";var n=r(74645);r.o(n,"notFound")&&r.d(t,{notFound:function(){return n.notFound}}),r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},90285:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.sendGTMEvent=void 0,t.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:r,dataLayerName:n="dataLayer",auth:l,preview:o,dataLayer:c,nonce:d}=e;s=n;let f=new URL(r||"https://www.googletagmanager.com/gtm.js");return t&&f.searchParams.set("id",t),"dataLayer"!==n&&f.searchParams.set("l",n),l&&f.searchParams.set("gtm_auth",l),o&&(f.searchParams.set("gtm_preview",o),f.searchParams.set("gtm_cookies_win","x")),(0,i.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:`
6
+ gtag('config', '${t}' ${r?",{ 'debug_mode': true }":""});`},nonce:l}),(0,i.jsx)(s.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`,nonce:l})]})},t.sendGAEvent=function(){void 0===a?console.warn("@next/third-parties: GA has not been initialized"):window[a]?window[a].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${a} does not exist`)};let i=r(95155),u=r(12115),s=(n=r(65596))&&n.__esModule?n:{default:n}},31692:(e,t,r)=>{"use strict";r.d(t,{Zr:()=>a});let n=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>n(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>n(t)(e)}}},a=(e,t)=>(r,a,i)=>{let u,s={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e,void 0),a=null!=(r=t.getItem(e))?r:null;return a instanceof Promise?a.then(n):n(a)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r,void 0)),removeItem:e=>t.removeItem(e)}}(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,o=0,c=new Set,d=new Set,f=s.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},a,i);let m=()=>{let e=s.partialize({...a()});return f.setItem(s.name,{state:e,version:s.version})},g=i.setState;i.setState=(e,t)=>(g(e,t),m());let p=e((...e)=>(r(...e),m()),a,i);i.getInitialState=()=>p;let h=()=>{var e,t;if(!f)return;let i=++o;l=!1,c.forEach(e=>{var t;return e(null!=(t=a())?t:p)});let g=(null==(t=s.onRehydrateStorage)?void 0:t.call(s,null!=(e=a())?e:p))||void 0;return n(f.getItem.bind(f))(s.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];else{if(s.migrate){let t=s.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;if(i!==o)return;let[n,l]=e;if(r(u=s.merge(l,null!=(t=a())?t:p),!0),n)return m()}).then(()=>{i===o&&(null==g||g(a(),void 0),u=a(),l=!0,d.forEach(e=>e(u)))}).catch(e=>{i===o&&(null==g||g(void 0,e))})};return i.persist={setOptions:e=>{s={...s,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},s.skipHydration||h(),u||p}},35154:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},42593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={default:function(){return w},handleClientScriptLoad:function(){return _},initScriptLoader:function(){return y}};for(var a in n)Object.defineProperty(t,a,{enumerable:!0,get:n[a]});let i=r(73623),u=r(66388),s=r(95155),l=i._(r(47650)),o=u._(r(12115)),c=r(75368),d=r(3584),f=r(28356),m=r(71922),g=new Map,p=new Set,h=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:a=null,dangerouslySetInnerHTML:i,children:u="",strategy:s="afterInteractive",onError:o,stylesheets:c}=e,f=r||t;if(f&&p.has(f))return;if(g.has(t)){p.add(f),g.get(t).then(n,o);return}let m=()=>{a&&a(),p.add(f)},h=document.createElement("script"),_=new Promise((e,t)=>{h.addEventListener("load",function(t){e(),n&&n.call(this,t),m()}),h.addEventListener("error",function(e){t(e)})}).catch(function(e){o&&o(e)});i?(h.innerHTML=i.__html||"",m()):u?(h.textContent="string"==typeof u?u:Array.isArray(u)?u.join(""):"",m()):t&&(h.src=t,g.set(t,_)),(0,d.setAttributesFromProps)(h,e),"worker"===s&&h.setAttribute("type","text/partytown"),h.setAttribute("data-nscript",s),c&&(e=>{if(l.default.preinit)return e.forEach(e=>{l.default.preinit(e,{as:"style"})});{let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}})(c),document.body.appendChild(h)};function _(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>h(e))}):h(e)}function y(e){e.forEach(_),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");p.add(t)})}function v(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:a=null,strategy:i="afterInteractive",onError:u,stylesheets:d,...g}=e,{updateScripts:_,scripts:y,getIsSsr:v,appDir:w,nonce:b}=(0,o.useContext)(c.HeadManagerContext);b=g.nonce||b;let S=(0,o.useRef)(!1);(0,o.useEffect)(()=>{let e=t||r;S.current||(a&&e&&p.has(e)&&a(),S.current=!0)},[a,t,r]);let I=(0,o.useRef)(!1);if((0,o.useEffect)(()=>{if(!I.current){if("afterInteractive"===i)h(e);else"lazyOnload"===i&&("complete"===document.readyState?(0,f.requestIdleCallback)(()=>h(e)):window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>h(e))}));I.current=!0}},[e,i]),("beforeInteractive"===i||"worker"===i)&&(_?(y[i]=(y[i]||[]).concat([{id:t,src:r,onLoad:n,onReady:a,onError:u,...g,nonce:b}]),_(y)):v&&v()?p.add(t||r):v&&!v()&&h({...e,nonce:b})),w){if(d&&d.forEach(e=>{l.default.preinit(e,{as:"style"})}),"beforeInteractive"===i)if(!r)return g.dangerouslySetInnerHTML&&(g.children=g.dangerouslySetInnerHTML.__html,delete g.dangerouslySetInnerHTML),(0,s.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,m.htmlEscapeJsonString)(JSON.stringify([0,{...g,id:t}]))})`}});else return l.default.preload(r,g.integrity?{as:"script",integrity:g.integrity,nonce:b,crossOrigin:g.crossOrigin}:{as:"script",nonce:b,crossOrigin:g.crossOrigin}),(0,s.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,m.htmlEscapeJsonString)(JSON.stringify([r,{...g,id:t}]))})`}});"afterInteractive"===i&&r&&l.default.preload(r,g.integrity?{as:"script",integrity:g.integrity,nonce:b,crossOrigin:g.crossOrigin}:{as:"script",nonce:b,crossOrigin:g.crossOrigin})}return null}Object.defineProperty(v,"__nextScript",{value:!0});let w=v;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54642:e=>{var t;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="//"),(t={}).endianness=function(){return"LE"},t.hostname=function(){return"u">typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"u">typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"},e.exports=t},65596:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a.a});var n=r(42593),a=r.n(n),i={};for(let e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i)},71922:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={ESCAPE_REGEX:function(){return i},htmlEscapeAttributeString:function(){return o},htmlEscapeJsonString:function(){return l}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let a={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},i=/[&><\u2028\u2029]/g,u={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},s=/[&"'<>]/g;function l(e){return e.replace(i,e=>a[e])}function o(e){return e.replace(s,e=>u[e])}},73321:(e,t,r)=>{"use strict";var n=r(74645);r.o(n,"notFound")&&r.d(t,{notFound:function(){return n.notFound}}),r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},90285:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.sendGTMEvent=void 0,t.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:r,dataLayerName:n="dataLayer",auth:l,preview:o,dataLayer:c,nonce:d}=e;s=n;let f=new URL(r||"https://www.googletagmanager.com/gtm.js");return t&&f.searchParams.set("id",t),"dataLayer"!==n&&f.searchParams.set("l",n),l&&f.searchParams.set("gtm_auth",l),o&&(f.searchParams.set("gtm_preview",o),f.searchParams.set("gtm_cookies_win","x")),(0,i.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:`
7
7
  (function(w,l){
8
8
  w[l]=w[l]||[];
9
9
  w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[981],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>r,Hx:()=>n,Iv:()=>d,Nv:()=>x,RL:()=>c,ev:()=>m,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>o});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],n=2e3,r=3e5,i=5e3,o=5,c=1e4,d=5e3,m=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],x=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},20242:(e,t,s)=>{"use strict";s.d(t,{default:()=>g});var a=s(95155),l=s(12115),n=s(14051),r=s.n(n),i=s(35497),o=s(11059),c=s(15536);async function d(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(c.Iv)})).ok}catch{return!1}}async function m(...e){let t=e.filter(Boolean).map(d);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}function x({label:e,url:t,copyId:s,copied:l,onCopy:n,badge:r,actions:o}){return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===r||"TS"===r?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:e}),(0,a.jsx)(i.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>n(t,s),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})}),o]})}function u({status:e,className:t=""}){return(0,a.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function h({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function p({message:e,action:t}){return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,a.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}function g({machineId:e}){let[t,s]=(0,l.useState)([]),[n,r]=(0,l.useState)(!0),[f,b]=(0,l.useState)(!1),[j,v]=(0,l.useState)(""),[w,k]=(0,l.useState)(null),[N,C]=(0,l.useState)(null),[S,T]=(0,l.useState)(null),[P,E]=(0,l.useState)(!1),[_,$]=(0,l.useState)(!0),[A,I]=(0,l.useState)(!0),[U,D]=(0,l.useState)(!1),[F,O]=(0,l.useState)(!0),[R,L]=(0,l.useState)(!1),[W,q]=(0,l.useState)(!1),[K,M]=(0,l.useState)(""),[z,H]=(0,l.useState)(""),[J,B]=(0,l.useState)(!1),[G,Q]=(0,l.useState)(""),[X,Y]=(0,l.useState)(null),[Z,V]=(0,l.useState)(!1),[ee,et]=(0,l.useState)(!1),[es,ea]=(0,l.useState)(!1),[el,en]=(0,l.useState)(!1),[er,ei]=(0,l.useState)(""),[eo,ec]=(0,l.useState)(!1),[ed,em]=(0,l.useState)(""),[ex,eu]=(0,l.useState)(null),[eh,ep]=(0,l.useState)(""),[eg,ey]=(0,l.useState)(""),[ef,eb]=(0,l.useState)(null),[ej,ev]=(0,l.useState)(!1),[ew,ek]=(0,l.useState)([]),[eN,eC]=(0,l.useState)(""),[eS,eT]=(0,l.useState)(!1),[eP,eE]=(0,l.useState)(!1),[e_,e$]=(0,l.useState)(!1),eA=(0,l.useRef)(null),eI=(0,l.useRef)(0),eU=(0,l.useRef)(0),eD=(0,l.useRef)(!1),eF=(0,l.useRef)(!1),eO=(0,l.useRef)(!1),eR=(0,l.useRef)(!1),[eL,eW]=(0,l.useState)(!1),[eq,eK]=(0,l.useState)(!1),[eM,ez]=(0,l.useState)(new Set),[eH,eJ]=(0,l.useState)(!1);(0,l.useEffect)(()=>{eJ(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]);let{copied:eB,copy:eG}=(0,o.C)(),eQ=!_||!A,eX=_?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,l.useEffect)(()=>{eA.current&&(eA.current.scrollTop=eA.current.scrollHeight)},[ew]),(0,l.useEffect)(()=>{e2(),eV()},[]),(0,l.useEffect)(()=>{if(!(R||es))return;let e=!R||W,t=!es||el,s=()=>{document.hidden||eZ()};if(document.addEventListener("visibilitychange",s),e&&t)return()=>document.removeEventListener("visibilitychange",s);let a=setInterval(()=>{document.hidden||eZ()},c.fl);return()=>{clearInterval(a),document.removeEventListener("visibilitychange",s)}},[R,es,W,el]),(0,l.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(R&&(K||z)){let e=await m(z,K);eD.current=e,e?(eI.current=0,q(!0),eO.current||(eO.current=!0,eW(!0))):(eI.current+=1,eI.current>=c.t6&&q(!1))}else eD.current=!1;if(es&&er){let e=await d(er);eF.current=e,e?(eU.current=0,en(!0),eR.current||(eR.current=!0,eK(!0))):(eU.current+=1,eU.current>=c.t6&&en(!1))}else eF.current=!1}};if(!(R&&(K||z)||es&&er))return;e();let t=!es||el;if((!R||W)&&t)return;let s=setInterval(e,c.RL);return()=>clearInterval(s)},[R,K,z,es,er,W,el]);let eY=(0,l.useCallback)((e,t,s,a,l,n)=>{t.current?(s.current=0,a(!0),l.current||(l.current=!0,n(!0))):(s.current+=1,s.current>=c.t6&&a(!1))},[]),eZ=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,a=t.tunnel?.tunnelUrl||"";M(a),H(t.tunnel?.publicUrl||""),L(s),eY(null,eD,eI,q,eO,eW);let l=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,n=t.tailscale?.tunnelUrl||"";ei(n),ea(l),eY(null,eF,eU,en,eR,eK)}catch{}},eV=async()=>{O(!0);try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e.ok){let t=await e.json();E(t.requireApiKey||!1),$(!1!==t.requireLogin),I(t.hasPassword||!1),D(t.tunnelDashboardAccess||!1)}if(t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,a=e.tunnel?.tunnelUrl||"";M(a),H(e.tunnel?.publicUrl||""),L(s),eY(null,eD,eI,q,eO,eW);let l=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,n=e.tailscale?.tunnelUrl||"";ei(n),ea(l),eY(null,eF,eU,en,eR,eK)}}catch(e){console.log("Error loading settings:",e)}finally{O(!1)}},e0=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:e})})).ok&&D(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},e1=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:e})})).ok&&E(e)}catch(e){console.log("Error updating requireApiKey:",e)}},e2=async()=>{try{let e=await fetch("/api/keys"),t=await e.json();e.ok&&s(t.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},e5=async(...e)=>{B(!0),Q("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),s=Date.now();for(;Date.now()-s<c.Cp;){if(await new Promise(e=>setTimeout(e,c.Hx)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return L(!0),B(!1),Q(""),!0;if((Date.now()-s)%1e4<c.Hx)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return Y({type:"error",message:"Tunnel process stopped unexpectedly."}),B(!1),Q(""),!1}}catch{}}return Y({type:"error",message:"Tunnel created but not reachable. Please try again."}),B(!1),Q(""),!1},e4=async()=>{V(!1),B(!0),Y(null),Q("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let s=await t.json();s.download?.downloading?Q(`Downloading cloudflared... ${s.download.progress}%`):e&&Q("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void Y({type:"error",message:s.error||"Failed to enable tunnel"});let a=s.tunnelUrl;if(!a)return void Y({type:"error",message:"No tunnel URL returned"});M(a),H(s.publicUrl||""),await e5(s.publicUrl,a)}catch(e){Y({type:"error",message:e.message})}finally{e=!1,B(!1),Q("")}},e3=async()=>{B(!0),Y(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(L(!1),M(""),et(!1),Y({type:"success",message:"Tunnel disabled"})):Y({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){Y({type:"error",message:e.message})}finally{B(!1)}},e8=async()=>{eb(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eb(t.installed),t}}catch{}return eb(!1),{installed:!1}},e6=async()=>{ev(!0),eu(null),ek([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eN})});eC("");let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let n=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=n.pop()||"",n)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)ek(e=>[...e.slice(-50),a.message]);else if("done"===s){eb(!0),ev(!1),eE(!1),tt();return}else"error"===s&&eu({type:"error",message:a.error||"Install failed"})}}}catch(e){eu({type:"error",message:e.message})}finally{ev(!1)}},e9=async e=>{em("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<c.Cp;){await new Promise(e=>setTimeout(e,c.Hx));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},e7=(e,t)=>{ep(e),ey(t)},te=()=>{ep(""),ey("")},tt=async()=>{eE(!1),eT(!0),ec(!0),eu(null),em("Connecting..."),te();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){ei(t.tunnelUrl||"");let e=await e9(t.tunnelUrl);ea(!0),eu(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){e7(t.authUrl,"Open Login Page"),em('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){te(),em("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){ei(t.tunnelUrl||"");let e=await e9(t.tunnelUrl);ea(!0),eu(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await ts(t.enableUrl):eu({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}te(),eu({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await ts(t.enableUrl);eu({type:"error",message:t.error||"Failed to connect"})}catch(e){eu({type:"error",message:e.message})}finally{ec(!1),eT(!1),em(""),te()}},ts=async e=>{e7(e,"Open Funnel Settings"),em('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){te(),ei(t.tunnelUrl||"");let e=await e9(t.tunnelUrl);ea(!0),eu(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){te(),eu({type:"error",message:t.error});return}}catch{}}te(),eu({type:"error",message:"Timed out waiting for Funnel to be enabled."})},ta=async()=>{ec(!0),eu(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(ea(!1),ei(""),e$(!1),eu({type:"success",message:"Tailscale disabled"})):eu({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){eu({type:"error",message:e.message})}finally{ec(!1)}},tl=async()=>{eu(null),ek([]);let e=await e8();e?.installed&&e?.hasCachedPassword?tt():eE(!0)},tn=async()=>{if(j.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:j})}),t=await e.json();e.ok&&(k(t.key),await e2(),v(""),b(!1))}catch(e){console.log("Error creating key:",e)}},tr=async e=>{C({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{C(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(s(t.filter(t=>t.id!==e)),ez(t=>{let s=new Set(t);return s.delete(e),s}))}catch(e){console.log("Error deleting key:",e)}}})},ti=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error toggling key:",e)}},[to,tc]=(0,l.useState)("/v1");return((0,l.useEffect)(()=>{tc(`${window.location.origin}/v1`)},[]),n)?(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(i.Qv,{}),(0,a.jsx)(i.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsx)(i.zY,{title:"Endpoint",description:"Gateway URL, public exposure, and API keys",icon:"api",actions:(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>b(!0),children:"New Key"})}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(x,{label:"Local",url:to,copyId:"local_url",copied:eB,onCopy:eG}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${R?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),R&&!J&&W?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${z||K}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>eG(`${z||K}/v1`,"tunnel_url"),className:"p-2 hover:hover:bg-surface-3 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===eB?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>et(!0),className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!R||J||W?J?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),G||"Creating tunnel..."]}),(0,a.jsx)("button",{onClick:()=>{B(!1),Q("")},className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):X?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-danger",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),X.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>V(!0),children:"Enable"})]}):F?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,a.jsx)("button",{onClick:()=>O(!1),className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{eQ?Y({type:"error",message:`Security required: ${eX}`}):P?V(!0):Y({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-warning",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eL?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,a.jsx)("button",{onClick:()=>et(!0),className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${es?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),es&&!eo&&el?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${er}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>eG(`${er}/v1`,"ts_url"),className:"p-2 hover:hover:bg-surface-3 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===eB?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>e$(!0),className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!es||eo||el?eo||eS?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),ed||"Connecting..."]}),eh&&(0,a.jsx)(i.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eh,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eg||"Open"}),(0,a.jsx)("button",{onClick:()=>{ec(!1),eT(!1),em(""),te()},className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ex?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-danger",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ex.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:tl,children:"Enable"})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{eQ?eu({type:"error",message:`Security required: ${eX}`}):tl()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-warning",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eq?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,a.jsx)("button",{onClick:()=>e$(!0),className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),eQ&&!R&&!es&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(p,{message:eX,action:{label:"Open settings",href:"/dashboard/profile"}})}),(R||es)&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!P&&(0,a.jsx)(p,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!_||!A)&&(0,a.jsx)(p,{message:_?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:_?"Change password":"Enable",href:"/dashboard/profile"}})]}),(R||es)&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,a.jsx)(i.lM,{checked:U,onChange:()=>e0(!U)}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,a.jsx)(h,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,a.jsxs)(i.Zp,{id:"require-api-key",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>b(!0),children:"Create Key"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,a.jsx)(i.lM,{checked:P,onChange:()=>e1(!P)})]}),eH&&!P&&(0,a.jsx)("div",{className:"mb-4 -mt-2",children:(0,a.jsx)(p,{message:"Endpoint is exposed without an API key."})}),0===t.length?(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>b(!0),children:"Create Key"})]}):(0,a.jsx)("div",{className:"flex flex-col",children:t.map(e=>{var t;return(0,a.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono",children:eM.has(e.id)?e.key:(t=e.key)&&!(t.length<=10)?t.slice(0,6)+"•".repeat(t.length-10)+t.slice(-4):t||""}),(0,a.jsx)("button",{onClick:()=>{var t;return t=e.id,void ez(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"p-1 hover:hover:bg-surface-3 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:eM.has(e.id)?"Hide key":"Show key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eM.has(e.id)?"visibility_off":"visibility"})}),(0,a.jsx)("button",{onClick:()=>eG(e.key,e.id),className:"p-1 hover:hover:bg-surface-3 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eB===e.id?"check":"content_copy"})})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,a.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[Array.isArray(e.allowedModels)&&e.allowedModels.length>0&&(0,a.jsxs)("span",{className:"hidden sm:inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold text-primary",title:`Restricted to ${e.allowedModels.length} models`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"lock"}),e.allowedModels.length]}),(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?C({title:"Pause API Key",message:`Pause API key "${e.name}"?
2
+
3
+ This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{C(null),ti(e.id,t)}}):ti(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,a.jsx)("button",{onClick:()=>T(e),className:"p-2 hover:bg-surface-2 text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:"Model access control",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tune"})}),(0,a.jsx)("button",{onClick:()=>tr(e.id),className:"p-2 hover:bg-danger/10 text-danger opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(i.aF,{isOpen:f,title:"Create API Key",onClose:()=>{b(!1),v("")},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(i.pd,{label:"Key Name",value:j,onChange:e=>v(e.target.value),placeholder:"Production Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tn,fullWidth:!0,disabled:!j.trim(),children:"Create"}),(0,a.jsx)(i.$n,{onClick:()=>{b(!1),v("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!w,title:"API Key Created",onClose:()=>k(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.pd,{value:w||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"created_key"===eB?"check":"content_copy",onClick:()=>eG(w,"created_key"),children:"created_key"===eB?"Copied!":"Copy"})]}),(0,a.jsx)(i.$n,{onClick:()=>k(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(i.aF,{isOpen:Z,title:"Enable Tunnel",onClose:()=>V(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local ExtremeRouter to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:c.oX.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e4,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(i.$n,{onClick:()=>V(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:ee,title:"Disable Tunnel",onClose:()=>!J&&et(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e3,fullWidth:!0,disabled:J,variant:"danger",children:J?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>et(!1),variant:"ghost",fullWidth:!0,disabled:J,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:eP,title:"Tailscale Funnel",onClose:()=>{ej||(eE(!1),eC(""),eu(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===ef&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===ef&&!ej&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e6,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(i.$n,{onClick:()=>eE(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ej&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),ew.length>0&&(0,a.jsx)("div",{ref:eA,className:"bg-surface-2 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:ew.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===ef&&!ej&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:()=>tt(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(i.$n,{onClick:()=>eE(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ex&&(0,a.jsx)(u,{status:ex})]})}),(0,a.jsx)(i.aF,{isOpen:e_,title:"Disable Tailscale",onClose:()=>!eo&&e$(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:ta,fullWidth:!0,disabled:eo,variant:"danger",children:eo?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>e$(!1),variant:"ghost",fullWidth:!0,disabled:eo,children:"Cancel"})]})]})}),(0,a.jsx)(y,{apiKey:S,onClose:()=>T(null),onSaved:async()=>{await e2(),T(null)}}),(0,a.jsx)(i.uo,{isOpen:!!N,onClose:()=>C(null),onConfirm:N?.onConfirm,title:N?.title||"Confirm",message:N?.message,variant:"danger"})]})}function y({apiKey:e,onClose:t,onSaved:s}){let[n,r]=(0,l.useState)(()=>Array.isArray(e?.allowedModels)?[...e.allowedModels]:[]),[o,c]=(0,l.useState)(""),[d,m]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{e&&(r(Array.isArray(e.allowedModels)?[...e.allowedModels]:[]),c(""))},[e]),!e)return null;let x=()=>{let e=o.trim();e&&(r(t=>t.includes(e)?t:[...t,e]),c(""))},u=async()=>{m(!0);try{await fetch(`/api/keys/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({allowedModels:n.length>0?n:null})}),await s()}catch(e){console.log("Failed to save model access:",e)}finally{m(!1)}};return(0,a.jsx)(i.aF,{isOpen:!!e,onClose:t,title:`Model Access — ${e.name||"Key"}`,footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.$n,{variant:"ghost",onClick:t,disabled:d,children:"Cancel"}),(0,a.jsx)(i.$n,{onClick:u,loading:d,children:"Save"})]}),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Restrict which models this API key can access. Leave empty to allow all models. Supports exact model IDs (e.g. ",(0,a.jsx)("code",{className:"font-mono text-xs",children:"glm/glm-5"}),") or provider prefixes (e.g. ",(0,a.jsx)("code",{className:"font-mono text-xs",children:"glm/"})," to allow all GLM models)."]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),x())},placeholder:"e.g. glm/glm-5 or glm/",className:"flex-1 rounded border border-border bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted/70 focus:outline-none focus:ring-2 focus:ring-primary/30"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"add",onClick:x,children:"Add"})]}),n.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-primary/30 bg-primary/5 px-2.5 py-1 text-xs font-mono text-primary",children:[e,(0,a.jsx)("button",{onClick:()=>r(t=>t.filter(t=>t!==e)),className:"text-primary/60 hover:text-danger transition-colors","aria-label":`Remove ${e}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e))}):(0,a.jsx)("div",{className:"rounded-lg border border-dashed border-border p-4 text-center text-sm text-text-muted",children:"No restrictions — this key can access all models"}),n.length>0&&(0,a.jsx)("button",{onClick:()=>r([]),className:"self-start text-xs text-danger hover:underline",children:"Clear all restrictions"})]})})}g.propTypes={machineId:r().string.isRequired}},90981:(e,t,s)=>{Promise.resolve().then(s.bind(s,20242))}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3721],{2531:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>n});var a=t(95155),l=t(12115),r=t(35497);let i=[{key:"providerDown",label:"Provider Down",desc:"Circuit breaker opens (provider repeatedly failing)",icon:"error"},{key:"rateLimited",label:"Rate Limited",desc:"Account hits 429/403 from upstream",icon:"block"},{key:"healthDegraded",label:"Health Degraded",desc:"Success rate drops below 70%",icon:"monitor_heart"},{key:"budgetExceeded",label:"Budget Exceeded",desc:"Usage quota reached",icon:"data_usage"}];function n(){let[e,s]=(0,l.useState)(null),[t,n]=(0,l.useState)(!0),[c,o]=(0,l.useState)(!1),[d,h]=(0,l.useState)(null),[x,m]=(0,l.useState)(null),u=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/settings",{cache:"no-store"});if(e.ok){let t=await e.json();s(t)}}catch{}n(!1)},[]);(0,l.useEffect)(()=>{u()},[u]),(0,l.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let b=(0,l.useRef)(null),p=(0,l.useCallback)(async(e,t,a)=>{s(s=>{let l=a?{...s,[e]:{...s?.[e]||{},[a]:t}}:{...s,[e]:t};return b.current&&clearTimeout(b.current),b.current=setTimeout(async()=>{try{let s=a?{[e]:{...l[e]||{},[a]:t}}:{[e]:t};(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).ok&&(m(a||e),setTimeout(()=>m(null),1500))}catch{}},500),l})},[]),g=async()=>{o(!0),h(null);try{let e=await fetch("/api/alerts/test",{method:"POST"}),s=await e.json();h(s.success?"sent":"failed")}catch{h("failed")}o(!1),setTimeout(()=>h(null),5e3)};if(t)return(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsx)(r.Zp,{children:(0,a.jsx)("div",{className:"h-6 w-48 animate-pulse rounded bg-sidebar"})}),(0,a.jsx)(r.Zp,{children:(0,a.jsx)("div",{className:"h-32 animate-pulse rounded bg-sidebar"})})]});let j=e?.webhookEnabled===!0,f=!!(e?.webhookDiscordUrl||e?.webhookTelegramToken||e?.webhookGenericUrl);return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,a.jsx)(r.zY,{title:"Webhook Alerts",description:"Get notified via Discord, Telegram, or generic webhook when providers fail",icon:"notifications_active",actions:(0,a.jsx)(r.$n,{size:"sm",variant:"secondary",icon:c?"progress_activity":"send",onClick:g,disabled:c||!j||!f,children:c?"Sending...":"Send Test"})}),(0,a.jsx)(r.Zp,{children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(r.lM,{checked:j,onChange:e=>p("webhookEnabled",e),label:"Enable Webhook Alerts"}),j&&(0,a.jsx)(r.Ex,{variant:"success",size:"sm",dot:!0,children:"Active"})]}),j&&!f&&(0,a.jsx)(r.Ex,{variant:"warning",size:"sm",icon:"warning",children:"No channel configured"})]})}),j&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Delivery Channels"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Configure where alerts are sent. Fill one or more."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-[#5865F2]/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[#5865F2] text-lg",children:"chat"})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(r.pd,{label:"Discord Webhook URL",type:"text",value:e?.webhookDiscordUrl||"",onChange:e=>p("webhookDiscordUrl",e.target.value),placeholder:"https://discord.com/api/webhooks/...",hint:"webhookDiscordUrl"===x?"✓ Saved":void 0})})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-[#0088cc]/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[#0088cc] text-lg",children:"send"})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-3",children:[(0,a.jsx)(r.pd,{label:"Telegram Bot Token",type:"password",value:e?.webhookTelegramToken||"",onChange:e=>p("webhookTelegramToken",e.target.value),placeholder:"123456:ABC-DEF...",hint:"webhookTelegramToken"===x?"✓ Saved":void 0}),(0,a.jsx)(r.pd,{label:"Telegram Chat ID",type:"text",value:e?.webhookTelegramChatId||"",onChange:e=>p("webhookTelegramChatId",e.target.value),placeholder:"Example -1001234567890",hint:"webhookTelegramChatId"===x?"✓ Saved":void 0})]})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-lg",children:"webhook"})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(r.pd,{label:"Generic Webhook URL",type:"text",value:e?.webhookGenericUrl||"",onChange:e=>p("webhookGenericUrl",e.target.value),placeholder:"https://your-server.com/webhook",hint:"webhookGenericUrl"===x?"✓ Saved":void 0})})]})]})]}),(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Alert Events"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Choose which events trigger an alert."})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:i.map(s=>{let t=e?.webhookAlertEvents?.[s.key]===!0;return(0,a.jsxs)("div",{className:`flex items-center justify-between rounded-lg border px-3 py-2.5 transition-colors ${t?"border-primary/30 bg-primary/[0.03]":"border-border-subtle"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${t?"text-primary":"text-text-muted"}`,children:s.icon}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:s.label}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:s.desc})]})]}),(0,a.jsx)(r.lM,{size:"sm",checked:t,onChange:e=>p("webhookAlertEvents",e,s.key)})]},s.key)})})]}),"sent"===d&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-success/20 bg-success/[0.05] px-4 py-2.5 text-sm text-success",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Test alert sent! Check your configured channels."]}),"failed"===d&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-danger/20 bg-danger/[0.05] px-4 py-2.5 text-sm text-danger",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"error"}),"Failed to send test alert. Check your channel URLs."]})]})]})}},53013:(e,s,t)=>{Promise.resolve().then(t.bind(t,2531))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=53013)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3721],{2531:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>n});var a=t(95155),l=t(12115),r=t(35497);let i=[{key:"providerDown",label:"Provider Down",desc:"Circuit breaker opens (provider repeatedly failing)",icon:"error"},{key:"rateLimited",label:"Rate Limited",desc:"Account hits 429/403 from upstream",icon:"block"},{key:"healthDegraded",label:"Health Degraded",desc:"Success rate drops below 70%",icon:"monitor_heart"},{key:"budgetExceeded",label:"Budget Exceeded",desc:"Usage quota reached",icon:"data_usage"}];function n(){let[e,s]=(0,l.useState)(null),[t,n]=(0,l.useState)(!0),[c,o]=(0,l.useState)(!1),[d,h]=(0,l.useState)(null),[x,m]=(0,l.useState)(null),u=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/settings",{cache:"no-store"});if(e.ok){let t=await e.json();s(t)}}catch{}n(!1)},[]);(0,l.useEffect)(()=>{u()},[u]),(0,l.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let b=(0,l.useRef)(null),p=(0,l.useCallback)(async(e,t,a)=>{s(s=>{let l=a?{...s,[e]:{...s?.[e]||{},[a]:t}}:{...s,[e]:t};return b.current&&clearTimeout(b.current),b.current=setTimeout(async()=>{try{let s=a?{[e]:{...l[e]||{},[a]:t}}:{[e]:t};(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).ok&&(m(a||e),setTimeout(()=>m(null),1500))}catch{}},500),l})},[]),g=async()=>{o(!0),h(null);try{let e=await fetch("/api/alerts/test",{method:"POST"}),s=await e.json();h(s.success?"sent":"failed")}catch{h("failed")}o(!1),setTimeout(()=>h(null),5e3)};if(t)return(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsx)(r.Zp,{children:(0,a.jsx)("div",{className:"h-6 w-48 animate-pulse rounded bg-sidebar"})}),(0,a.jsx)(r.Zp,{children:(0,a.jsx)("div",{className:"h-32 animate-pulse rounded bg-sidebar"})})]});let j=e?.webhookEnabled===!0,f=!!(e?.webhookDiscordUrl||e?.webhookTelegramToken||e?.webhookGenericUrl);return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,a.jsx)(r.zY,{title:"Webhook Alerts",description:"Get notified via Discord, Telegram, or generic webhook when providers fail",icon:"notifications_active",actions:(0,a.jsx)(r.$n,{size:"sm",variant:"secondary",icon:c?"progress_activity":"send",onClick:g,disabled:c||!j||!f,children:c?"Sending...":"Send Test"})}),(0,a.jsx)(r.Zp,{children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(r.lM,{checked:j,onChange:e=>p("webhookEnabled",e),label:"Enable Webhook Alerts"}),j&&(0,a.jsx)(r.Ex,{variant:"success",size:"sm",dot:!0,children:"Active"})]}),j&&!f&&(0,a.jsx)(r.Ex,{variant:"warning",size:"sm",icon:"warning",children:"No channel configured"})]})}),j&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Delivery Channels"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Configure where alerts are sent. Fill one or more."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-[#5865F2]/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[#5865F2] text-lg",children:"chat"})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(r.pd,{label:"Discord Webhook URL",type:"text",value:e?.webhookDiscordUrl||"",onChange:e=>p("webhookDiscordUrl",e.target.value),placeholder:"https://discord.com/api/webhooks/...",hint:"webhookDiscordUrl"===x?"✓ Saved":void 0})})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-[#0088cc]/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[#0088cc] text-lg",children:"send"})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-3",children:[(0,a.jsx)(r.pd,{label:"Telegram Bot Token",type:"password",value:e?.webhookTelegramToken||"",onChange:e=>p("webhookTelegramToken",e.target.value),placeholder:"123456:ABC-DEF...",hint:"webhookTelegramToken"===x?"✓ Saved":void 0}),(0,a.jsx)(r.pd,{label:"Telegram Chat ID",type:"text",value:e?.webhookTelegramChatId||"",onChange:e=>p("webhookTelegramChatId",e.target.value),placeholder:"Example -1001234567890",hint:"webhookTelegramChatId"===x?"✓ Saved":void 0})]})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-lg",children:"webhook"})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(r.pd,{label:"Generic Webhook URL",type:"text",value:e?.webhookGenericUrl||"",onChange:e=>p("webhookGenericUrl",e.target.value),placeholder:"https://your-server.com/webhook",hint:"webhookGenericUrl"===x?"✓ Saved":void 0})})]})]})]}),(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Alert Events"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Choose which events trigger an alert."})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:i.map(s=>{let t=e?.webhookAlertEvents?.[s.key]===!0;return(0,a.jsxs)("div",{className:`flex items-center justify-between rounded-lg border px-3 py-2.5 transition-colors ${t?"border-primary/30 bg-primary/[0.03]":"border-border-subtle"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${t?"text-primary":"text-text-muted"}`,children:s.icon}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:s.label}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:s.desc})]})]}),(0,a.jsx)(r.lM,{size:"sm",checked:t,onChange:e=>p("webhookAlertEvents",e,s.key)})]},s.key)})})]}),"sent"===d&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-success/20 bg-success/[0.05] px-4 py-2.5 text-sm text-success",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Test alert sent! Check your configured channels."]}),"failed"===d&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-danger/20 bg-danger/[0.05] px-4 py-2.5 text-sm text-danger",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"error"}),"Failed to send test alert. Check your channel URLs."]})]})]})}},20154:(e,s,t)=>{Promise.resolve().then(t.bind(t,2531))}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=20154)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{78487:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var a=r(95155),s=r(12115),l=r(35497),i=r(28777),n=r(88105);let d="basic-chat.sessions",o="basic-chat.activeSessionId",c="basic-chat.activeProviderId",m="basic-chat.draft";function u(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function x(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(x).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function p(e=""){let t=x(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function f(e){return await new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(String(a.result||"")),a.onerror=()=>r(a.error||Error("Failed to read file")),a.readAsDataURL(e)})}function h(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function g(){let[e,t]=(0,s.useState)([]),[r,g]=(0,s.useState)(!0),[b,v]=(0,s.useState)(""),[y,N]=(0,s.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(d),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[w,j]=(0,s.useState)(()=>globalThis.localStorage.getItem(o)||""),[S,I]=(0,s.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,s.useState)(""),[D,O]=(0,s.useState)(()=>globalThis.localStorage.getItem(m)||""),[$,C]=(0,s.useState)([]),[_,M]=(0,s.useState)(!1),[E,T]=(0,s.useState)(""),[U,R]=(0,s.useState)(""),[z,q]=(0,s.useState)(!1),[P,J]=(0,s.useState)(!1),[B,F]=(0,s.useState)(!1),K=(0,s.useRef)(null),L=(0,s.useRef)(null),W=(0,s.useRef)(!1),H=(0,s.useRef)(null),Y=(0,s.useRef)(null);(0,s.useEffect)(()=>{q(!0)},[]),(0,s.useEffect)(()=>{let e=!1;return async function(){g(!0),v("");try{let r=await fetch("/api/providers",{cache:"no-store"}),a=await r.json().catch(()=>({})),s=Array.isArray(a.connections)?a.connections.filter(e=>e?.isActive!==!1):[];if(0===s.length){e||(t([]),v("No providers connected yet."));return}let l=new Map;for(let e of s){let t=e.provider||e.id,r=h(e),a=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;l.has(t)||l.set(t,{providerId:t,providerName:r,providerType:a,connections:[],models:[]});let s=l.get(t);s.providerName=s.providerName||r,s.providerType=s.providerType||a,s.connections.push(e);let d=(0,i.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:h(e),source:"static"}:null).filter(Boolean);s.models.push(...d)}for(let e of(await Promise.all(s.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let a=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let a="string"==typeof e?e:e?.name||e?.displayName||r,s=r;return((0,n.mq)(t.provider)||(0,n.gb)(t.provider))&&!r.includes("/")&&(s=`${t.provider}/${r}`),{id:s,requestModel:s,name:a,providerId:t.provider,providerName:h(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:a}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=l.get(t);r&&r.models.push(...e.models)}let d=Array.from(l.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(d),0===d.length&&v("Providers connected but no models available."))}catch(r){e||(v(x(r?.message)||"Failed to load providers/models."),t([]))}finally{e||g(!1)}}(),()=>{e=!0}},[]),(0,s.useEffect)(()=>{let e=e=>{H.current&&!H.current.contains(e.target)&&J(!1),Y.current&&!Y.current.contains(e.target)&&F(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let G=(0,s.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),Q=(0,s.useMemo)(()=>e.find(e=>e.providerId===S)||e[0]||null,[e,S]),V=(0,s.useMemo)(()=>{if(A&&G.has(A))return G.get(A);if(w){let e=y.find(e=>e.id===w);if(e?.modelId&&G.has(e.modelId))return G.get(e.modelId)}return Q?.models?.[0]||null},[A,G,Q,y,w]),X=(0,s.useMemo)(()=>y.find(e=>e.id===w)||null,[y,w]),Z=X?.messages||[],ee=(0,s.useMemo)(()=>[...y].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[y]),et=!_&&!!V&&(D.trim().length>0||$.length>0);(0,s.useEffect)(()=>{if(z)try{globalThis.localStorage.setItem(d,JSON.stringify(y)),globalThis.localStorage.setItem(o,w),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,D)}catch{}},[z,y,w,S,D]),(0,s.useEffect)(()=>{if(!z||r||W.current||0===e.length)return;let t=e.find(e=>e.providerId===S)||e[0],a=A&&G.has(A)?G.get(A):t.models[0];if(y.length>0){let e=y.find(e=>e.id===w)||y[0],r=e?.modelId&&G.has(e.modelId)?G.get(e.modelId):a;W.current=!0,j(e.id),I(r?.providerId||t.providerId),k(r?.id||a.id);return}let s={id:u(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:a.id,modelName:a.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};W.current=!0,N([s]),j(s.id),I(t.providerId),k(a.id)},[z,r,e,G,y,w,S,A]);let er=(e,t)=>{N(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},ea=e=>e?{id:u(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,es=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let a=await Promise.all(r.map(async e=>({id:u(),name:e.name,type:e.type,size:e.size,dataUrl:await f(e)})));C(e=>[...e,...a]),e.target.value=""},el=async()=>{let e=V||Q?.models?.[0]||null;if(!e)return;let t=D.trim();if(!t&&0===$.length)return;let r=w,a=y.find(e=>e.id===r);if(!a){if(!(a=ea(e)))return;r=a.id,N(e=>[a,...e]),j(r)}let s={id:u(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},l=u(),i={id:l,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...a.messages||[],s,i];N(a=>a.map(a=>a.id===r?{...a,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===a.title?p(t):a.title}:a)),O(""),C([]),M(!0),T(l),R(""),L.current?.abort(),L.current=new AbortController;let d=n.filter(e=>"assistant"!==e.role||e.id!==l).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=x(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let a=[];for(let e of(t&&a.push({type:"text",text:t}),r))e?.dataUrl&&a.push({type:"image_url",image_url:{url:e.dataUrl}});return a.length>0?a:t}(e):e.content}));try{var o;let a,s=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:d,stream:!0}),signal:L.current.signal});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(x(e.error||e.message||`Request failed (${s.status})`))}let i=s.body?.getReader();if(!i){let e=await s.json().catch(()=>({})),t=x(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");er(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await i.read();if(t)break;let a=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=a.pop()||"",a)){let t=e.trim();if(!t.startsWith("data:"))continue;let a=t.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=JSON.parse(a),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(x).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,R(m),er(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}er(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),o=r,a=p(t),er(o,e=>({...e,title:"New chat"===e.title?a:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=x(e?.message||e);er(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),v(t||"Failed to send message.")}}finally{M(!1),T(""),R(""),L.current=null}},ei=V?`${V.name}`:"Select model",en=V?V.requestModel:"Choose from connected providers";return(0,a.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-bg text-text-main overflow-hidden",children:(0,a.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,a.jsxs)("div",{ref:H,className:"relative",children:[(0,a.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-border-subtle bg-surface-2 px-4 py-3 text-left transition hover:bg-surface-3",children:(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-text-main",children:ei}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"expand_more"})]}),(0,a.jsx)("p",{className:"truncate text-xs text-text-muted",children:en})]})}),P?(0,a.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-border-subtle bg-surface shadow-2xl shadow-black/40",children:[(0,a.jsxs)("div",{className:"border-b border-border-subtle px-4 py-3",children:[(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-text-subtle",children:"Models"}),(0,a.jsx)("p",{className:"text-sm text-text-main",children:"Only from connected providers"})]}),(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,a.jsxs)("div",{className:"mb-2 rounded-[16px] border border-border-subtle bg-surface-3 p-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-text-main",children:e.providerName}),(0,a.jsx)(l.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,a.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===A;return(0,a.jsx)("button",{type:"button",onClick:()=>(e=>{let t=G.get(e);if(!t)return;let r=y.find(e=>e.id===w);if(r&&r.messages.length>0){let e=ea(t);if(!e)return;N(t=>[e,...t]),j(e.id)}else if(r)N(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),j(r.id);else{let e=ea(t);if(!e)return;N(t=>[e,...t]),j(e.id)}I(t.providerId),k(t.id),J(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-primary/40 bg-primary/15":"border-border-subtle bg-surface-2 hover:bg-surface-3"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:e.name}),(0,a.jsx)("p",{className:"truncate text-[11px] text-text-subtle",children:e.requestModel})]}),t?(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"rounded-2xl border border-border-subtle bg-surface-2 px-4 py-3 text-sm text-text-main transition hover:bg-surface-3",children:"History"}),(0,a.jsx)(l.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!w)return;let e=y.filter(e=>e.id!==w),t=e[0]||null;N(e),t?(j(t.id),I(t.providerId),k(t.modelId)):(j(""),I(""),k(""))},disabled:!w||0===y.length,children:"Clear"})]})]}),B?(0,a.jsxs)("div",{ref:Y,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-border-subtle bg-surface p-2 shadow-2xl shadow-black/40 lg:right-6",children:[(0,a.jsx)("div",{className:"px-3 py-2",children:(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-text-subtle",children:"Recent chats"})}),(0,a.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===ee.length?(0,a.jsx)("div",{className:"rounded-[16px] border border-dashed border-border-subtle bg-surface-2 p-4 text-sm text-text-muted",children:"No conversations yet."}):ee.map(e=>{let t=e.id===w,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,a.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=y.find(e=>e.id===t))&&(j(t),I(r.providerId||S),k(r.modelId||A),F(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-primary/40 bg-primary/15":"border-border-subtle bg-surface-2 hover:bg-surface-3"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:e.title}),(0,a.jsx)("p",{className:"mt-1 truncate text-xs text-text-muted",children:x(r?.content)||"Empty chat"})]}),(0,a.jsx)("span",{className:"text-[10px] text-text-subtle shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let a=Math.round(r/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,b?(0,a.jsx)("div",{className:"mt-4 rounded-[18px] border border-danger/20 bg-danger/10 px-4 py-3 text-danger",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,a.jsx)("p",{className:"text-sm leading-6",children:b})]})}):null,(0,a.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===Z.length?(0,a.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,a.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,a.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-border-subtle bg-surface-2 text-text-main",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold text-text-main",children:"Start a conversation"}),(0,a.jsx)("p",{className:"text-sm leading-6 text-text-muted",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,a.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:Z.map(e=>{let t="user"===e.role,r="assistant"===e.role,s=r&&e.id===E&&"streaming"===e.status,l=x(e.content)||(r?U:"");return(0,a.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,a.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-surface-2 px-5 py-3.5 text-text-main":"text-text-main"}`,children:[(0,a.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,a.jsx)("span",{className:"text-xs font-semibold",children:t?"You":V?.name||"Assistant"})}),e.attachments?.length?(0,a.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,a.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-border-subtle bg-surface-3",children:(0,a.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover"})},e.id))}):null,(0,a.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[l,r&&s&&!U?(0,a.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,a.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,a.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-main max-w-[12rem] truncate",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void C(e=>e.filter(e=>e.id!==t))},className:"text-text-muted hover:text-text-main","aria-label":"Remove attachment",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,a.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,a.jsxs)("div",{className:"rounded-[26px] bg-surface-2 px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-border-subtle",children:[(0,a.jsx)("textarea",{value:D,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),et&&el())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-text-main outline-none placeholder:text-text-subtle custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>K.current?.click(),disabled:!V||r,className:"p-2 text-text-muted hover:text-text-main transition rounded-full hover:bg-surface-2",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,a.jsx)("input",{ref:K,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:es}),(0,a.jsx)("span",{className:"text-xs font-medium text-text-subtle truncate max-w-[120px]",children:V?V.name:"No model"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[_?(0,a.jsx)("button",{type:"button",onClick:()=>{L.current?.abort()},className:"p-2 text-text-main bg-surface-3 hover:bg-surface-3 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,a.jsx)("button",{onClick:el,disabled:!et,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${et?"bg-primary text-white hover:opacity-90":"bg-surface-3 text-text-subtle cursor-not-allowed"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,a.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-text-subtle",children:"Model list is filtered from connected providers."})]})]})})}}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=78487)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{86508:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var a=r(95155),s=r(12115),l=r(35497),i=r(28777),n=r(88105);let d="basic-chat.sessions",o="basic-chat.activeSessionId",c="basic-chat.activeProviderId",m="basic-chat.draft";function u(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function x(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(x).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function p(e=""){let t=x(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function f(e){return await new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(String(a.result||"")),a.onerror=()=>r(a.error||Error("Failed to read file")),a.readAsDataURL(e)})}function h(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function g(){let[e,t]=(0,s.useState)([]),[r,g]=(0,s.useState)(!0),[b,v]=(0,s.useState)(""),[y,N]=(0,s.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(d),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[w,j]=(0,s.useState)(()=>globalThis.localStorage.getItem(o)||""),[S,I]=(0,s.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,s.useState)(""),[D,O]=(0,s.useState)(()=>globalThis.localStorage.getItem(m)||""),[$,C]=(0,s.useState)([]),[_,M]=(0,s.useState)(!1),[E,T]=(0,s.useState)(""),[U,R]=(0,s.useState)(""),[z,q]=(0,s.useState)(!1),[P,J]=(0,s.useState)(!1),[B,F]=(0,s.useState)(!1),K=(0,s.useRef)(null),L=(0,s.useRef)(null),W=(0,s.useRef)(!1),H=(0,s.useRef)(null),Y=(0,s.useRef)(null);(0,s.useEffect)(()=>{q(!0)},[]),(0,s.useEffect)(()=>{let e=!1;return async function(){g(!0),v("");try{let r=await fetch("/api/providers",{cache:"no-store"}),a=await r.json().catch(()=>({})),s=Array.isArray(a.connections)?a.connections.filter(e=>e?.isActive!==!1):[];if(0===s.length){e||(t([]),v("No providers connected yet."));return}let l=new Map;for(let e of s){let t=e.provider||e.id,r=h(e),a=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;l.has(t)||l.set(t,{providerId:t,providerName:r,providerType:a,connections:[],models:[]});let s=l.get(t);s.providerName=s.providerName||r,s.providerType=s.providerType||a,s.connections.push(e);let d=(0,i.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:h(e),source:"static"}:null).filter(Boolean);s.models.push(...d)}for(let e of(await Promise.all(s.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let a=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let a="string"==typeof e?e:e?.name||e?.displayName||r,s=r;return((0,n.mq)(t.provider)||(0,n.gb)(t.provider))&&!r.includes("/")&&(s=`${t.provider}/${r}`),{id:s,requestModel:s,name:a,providerId:t.provider,providerName:h(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:a}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=l.get(t);r&&r.models.push(...e.models)}let d=Array.from(l.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(d),0===d.length&&v("Providers connected but no models available."))}catch(r){e||(v(x(r?.message)||"Failed to load providers/models."),t([]))}finally{e||g(!1)}}(),()=>{e=!0}},[]),(0,s.useEffect)(()=>{let e=e=>{H.current&&!H.current.contains(e.target)&&J(!1),Y.current&&!Y.current.contains(e.target)&&F(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let G=(0,s.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),Q=(0,s.useMemo)(()=>e.find(e=>e.providerId===S)||e[0]||null,[e,S]),V=(0,s.useMemo)(()=>{if(A&&G.has(A))return G.get(A);if(w){let e=y.find(e=>e.id===w);if(e?.modelId&&G.has(e.modelId))return G.get(e.modelId)}return Q?.models?.[0]||null},[A,G,Q,y,w]),X=(0,s.useMemo)(()=>y.find(e=>e.id===w)||null,[y,w]),Z=X?.messages||[],ee=(0,s.useMemo)(()=>[...y].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[y]),et=!_&&!!V&&(D.trim().length>0||$.length>0);(0,s.useEffect)(()=>{if(z)try{globalThis.localStorage.setItem(d,JSON.stringify(y)),globalThis.localStorage.setItem(o,w),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,D)}catch{}},[z,y,w,S,D]),(0,s.useEffect)(()=>{if(!z||r||W.current||0===e.length)return;let t=e.find(e=>e.providerId===S)||e[0],a=A&&G.has(A)?G.get(A):t.models[0];if(y.length>0){let e=y.find(e=>e.id===w)||y[0],r=e?.modelId&&G.has(e.modelId)?G.get(e.modelId):a;W.current=!0,j(e.id),I(r?.providerId||t.providerId),k(r?.id||a.id);return}let s={id:u(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:a.id,modelName:a.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};W.current=!0,N([s]),j(s.id),I(t.providerId),k(a.id)},[z,r,e,G,y,w,S,A]);let er=(e,t)=>{N(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},ea=e=>e?{id:u(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,es=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let a=await Promise.all(r.map(async e=>({id:u(),name:e.name,type:e.type,size:e.size,dataUrl:await f(e)})));C(e=>[...e,...a]),e.target.value=""},el=async()=>{let e=V||Q?.models?.[0]||null;if(!e)return;let t=D.trim();if(!t&&0===$.length)return;let r=w,a=y.find(e=>e.id===r);if(!a){if(!(a=ea(e)))return;r=a.id,N(e=>[a,...e]),j(r)}let s={id:u(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},l=u(),i={id:l,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...a.messages||[],s,i];N(a=>a.map(a=>a.id===r?{...a,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===a.title?p(t):a.title}:a)),O(""),C([]),M(!0),T(l),R(""),L.current?.abort(),L.current=new AbortController;let d=n.filter(e=>"assistant"!==e.role||e.id!==l).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=x(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let a=[];for(let e of(t&&a.push({type:"text",text:t}),r))e?.dataUrl&&a.push({type:"image_url",image_url:{url:e.dataUrl}});return a.length>0?a:t}(e):e.content}));try{var o;let a,s=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:d,stream:!0}),signal:L.current.signal});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(x(e.error||e.message||`Request failed (${s.status})`))}let i=s.body?.getReader();if(!i){let e=await s.json().catch(()=>({})),t=x(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");er(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await i.read();if(t)break;let a=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=a.pop()||"",a)){let t=e.trim();if(!t.startsWith("data:"))continue;let a=t.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=JSON.parse(a),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(x).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,R(m),er(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}er(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),o=r,a=p(t),er(o,e=>({...e,title:"New chat"===e.title?a:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=x(e?.message||e);er(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),v(t||"Failed to send message.")}}finally{M(!1),T(""),R(""),L.current=null}},ei=V?`${V.name}`:"Select model",en=V?V.requestModel:"Choose from connected providers";return(0,a.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-bg text-text-main overflow-hidden",children:(0,a.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,a.jsxs)("div",{ref:H,className:"relative",children:[(0,a.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-border-subtle bg-surface-2 px-4 py-3 text-left transition hover:bg-surface-3",children:(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-text-main",children:ei}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"expand_more"})]}),(0,a.jsx)("p",{className:"truncate text-xs text-text-muted",children:en})]})}),P?(0,a.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-border-subtle bg-surface shadow-2xl shadow-black/40",children:[(0,a.jsxs)("div",{className:"border-b border-border-subtle px-4 py-3",children:[(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-text-subtle",children:"Models"}),(0,a.jsx)("p",{className:"text-sm text-text-main",children:"Only from connected providers"})]}),(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,a.jsxs)("div",{className:"mb-2 rounded-[16px] border border-border-subtle bg-surface-3 p-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-text-main",children:e.providerName}),(0,a.jsx)(l.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,a.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===A;return(0,a.jsx)("button",{type:"button",onClick:()=>(e=>{let t=G.get(e);if(!t)return;let r=y.find(e=>e.id===w);if(r&&r.messages.length>0){let e=ea(t);if(!e)return;N(t=>[e,...t]),j(e.id)}else if(r)N(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),j(r.id);else{let e=ea(t);if(!e)return;N(t=>[e,...t]),j(e.id)}I(t.providerId),k(t.id),J(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-primary/40 bg-primary/15":"border-border-subtle bg-surface-2 hover:bg-surface-3"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:e.name}),(0,a.jsx)("p",{className:"truncate text-[11px] text-text-subtle",children:e.requestModel})]}),t?(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"rounded-2xl border border-border-subtle bg-surface-2 px-4 py-3 text-sm text-text-main transition hover:bg-surface-3",children:"History"}),(0,a.jsx)(l.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!w)return;let e=y.filter(e=>e.id!==w),t=e[0]||null;N(e),t?(j(t.id),I(t.providerId),k(t.modelId)):(j(""),I(""),k(""))},disabled:!w||0===y.length,children:"Clear"})]})]}),B?(0,a.jsxs)("div",{ref:Y,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-border-subtle bg-surface p-2 shadow-2xl shadow-black/40 lg:right-6",children:[(0,a.jsx)("div",{className:"px-3 py-2",children:(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-text-subtle",children:"Recent chats"})}),(0,a.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===ee.length?(0,a.jsx)("div",{className:"rounded-[16px] border border-dashed border-border-subtle bg-surface-2 p-4 text-sm text-text-muted",children:"No conversations yet."}):ee.map(e=>{let t=e.id===w,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,a.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=y.find(e=>e.id===t))&&(j(t),I(r.providerId||S),k(r.modelId||A),F(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-primary/40 bg-primary/15":"border-border-subtle bg-surface-2 hover:bg-surface-3"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:e.title}),(0,a.jsx)("p",{className:"mt-1 truncate text-xs text-text-muted",children:x(r?.content)||"Empty chat"})]}),(0,a.jsx)("span",{className:"text-[10px] text-text-subtle shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let a=Math.round(r/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,b?(0,a.jsx)("div",{className:"mt-4 rounded-[18px] border border-danger/20 bg-danger/10 px-4 py-3 text-danger",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,a.jsx)("p",{className:"text-sm leading-6",children:b})]})}):null,(0,a.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===Z.length?(0,a.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,a.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,a.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-border-subtle bg-surface-2 text-text-main",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold text-text-main",children:"Start a conversation"}),(0,a.jsx)("p",{className:"text-sm leading-6 text-text-muted",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,a.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:Z.map(e=>{let t="user"===e.role,r="assistant"===e.role,s=r&&e.id===E&&"streaming"===e.status,l=x(e.content)||(r?U:"");return(0,a.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,a.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-surface-2 px-5 py-3.5 text-text-main":"text-text-main"}`,children:[(0,a.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,a.jsx)("span",{className:"text-xs font-semibold",children:t?"You":V?.name||"Assistant"})}),e.attachments?.length?(0,a.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,a.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-border-subtle bg-surface-3",children:(0,a.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover"})},e.id))}):null,(0,a.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[l,r&&s&&!U?(0,a.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,a.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,a.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-main max-w-[12rem] truncate",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void C(e=>e.filter(e=>e.id!==t))},className:"text-text-muted hover:text-text-main","aria-label":"Remove attachment",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,a.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,a.jsxs)("div",{className:"rounded-[26px] bg-surface-2 px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-border-subtle",children:[(0,a.jsx)("textarea",{value:D,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),et&&el())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-text-main outline-none placeholder:text-text-subtle custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>K.current?.click(),disabled:!V||r,className:"p-2 text-text-muted hover:text-text-main transition rounded-full hover:bg-surface-2",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,a.jsx)("input",{ref:K,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:es}),(0,a.jsx)("span",{className:"text-xs font-medium text-text-subtle truncate max-w-[120px]",children:V?V.name:"No model"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[_?(0,a.jsx)("button",{type:"button",onClick:()=>{L.current?.abort()},className:"p-2 text-text-main bg-surface-3 hover:bg-surface-3 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,a.jsx)("button",{onClick:el,disabled:!et,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${et?"bg-primary text-white hover:opacity-90":"bg-surface-3 text-text-subtle cursor-not-allowed"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,a.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-text-subtle",children:"Model list is filtered from connected providers."})]})]})})}}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=86508)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{7083:(e,t,a)=>{Promise.resolve().then(a.bind(a,85309))},85309:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(95155),l=a(12115),r=a(98500),i=a.n(r),o=a(35497),c=a(3534),n=a(28777),d=a(64137);let u=a(41463).env.NEXT_PUBLIC_CLOUD_URL;function x({toolId:e,machineId:t}){let a=c.dM[e],[r,v]=(0,l.useState)([]),[m,h]=(0,l.useState)(!0),[p,b]=(0,l.useState)({}),[f,j]=(0,l.useState)(!1),[E,P]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[_,y]=(0,l.useState)(""),[S,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(t.ok){let e=await t.json();v(e.connections||[])}if(a.ok){let e=await a.json();j(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),k(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),y(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();A(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&h(!1)}})(),()=>{e=!1}},[]);let C=()=>r.filter(e=>!1!==e.isActive),U=(0,l.useCallback)((e,t,a)=>{b(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return a?(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),m?(0,s.jsx)(o.Qv,{}):(()=>{let t,l,r,i=(t=C(),l=[],r=new Set,t.forEach(e=>{let t=n.Xg[e.provider]||e.provider;(0,n.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,o={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:E&&w?w:f&&u?u:window.location.origin,apiKeys:S,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_};switch(e){case"claude":return(0,s.jsx)(d.Tk,{...o,activeProviders:C(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>U(e,t,a),hasActiveProviders:i,cloudEnabled:f});case"codex":return(0,s.jsx)(d.Ah,{...o,activeProviders:C(),cloudEnabled:f});case"opencode":return(0,s.jsx)(d.qO,{...o,activeProviders:C(),cloudEnabled:f});case"cowork":return(0,s.jsx)(d.Q6,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f,cloudUrl:u,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_});case"droid":return(0,s.jsx)(d.ZM,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"openclaw":return(0,s.jsx)(d.yZ,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"hermes":return(0,s.jsx)(d.RF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"copilot":return(0,s.jsx)(d.h1,{...o,activeProviders:C(),cloudEnabled:f});case"cline":return(0,s.jsx)(d.aG,{...o,activeProviders:C(),cloudEnabled:f});case"kilo":return(0,s.jsx)(d.c9,{...o,activeProviders:C(),cloudEnabled:f});case"kimchi":return(0,s.jsx)(d.GX,{...o});case"deepseek-tui":return(0,s.jsx)(d.lF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"jcode":return(0,s.jsx)(d.mW,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});default:return(0,s.jsx)(d.a7,{toolId:e,...o,activeProviders:C(),cloudEnabled:f,tunnelEnabled:E})}})()]}):(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[27,5772,8105,705,1321,5497,9622,8441,3794,7358],()=>e(e.s=7083)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{33899:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))},53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var t=l(95155),a=l(12115),r=l(35497),i=l(3534),n=l(64137),c=l(98500),o=l.n(c),d=l(5772);function x({toolId:e,tool:s,status:l}){let a=l?l.installed?l.hasExtremeRouter?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,t.jsx)(o(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.cls}`,children:a.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,a.useState)(!0),[c,o]=(0,a.useState)({});if((0,a.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&o(await s.json())}catch(e){console.log("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{})]});let d=Object.entries(i.dM),g=Object.entries(i.wn);return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,t.jsx)(r.zY,{title:"CLI Tools",description:"Configure developer tools to use ExtremeRouter",icon:"terminal"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3",children:d.map(([e,s])=>(0,t.jsx)(x,{toolId:e,tool:s,status:c[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3",children:g.map(([e,s])=>(0,t.jsx)(n.gY,{tool:s},e))})]})]})}}},e=>{e.O(0,[27,5772,8105,1321,705,5497,9622,8441,3794,7358],()=>e(e.s=33899)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{47748:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))},53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var t=l(95155),a=l(12115),r=l(35497),i=l(3534),n=l(64137),c=l(98500),o=l.n(c),d=l(5772);function x({toolId:e,tool:s,status:l}){let a=l?l.installed?l.hasExtremeRouter?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,t.jsx)(o(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.cls}`,children:a.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,a.useState)(!0),[c,o]=(0,a.useState)({});if((0,a.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&o(await s.json())}catch(e){console.log("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{})]});let d=Object.entries(i.dM),g=Object.entries(i.wn);return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,t.jsx)(r.zY,{title:"CLI Tools",description:"Configure developer tools to use ExtremeRouter",icon:"terminal"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3",children:d.map(([e,s])=>(0,t.jsx)(x,{toolId:e,tool:s,status:c[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3",children:g.map(([e,s])=>(0,t.jsx)(n.gY,{tool:s},e))})]})]})}}},e=>{e.O(0,[27,5772,8105,705,1321,5497,9622,8441,3794,7358],()=>e(e.s=47748)),_N_E=e.O()}]);
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{57410:(e,t,a)=>{Promise.resolve().then(a.bind(a,85330))},85330:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>R});var s=a(95155),l=a(12115),r=a(73321),n=a(35497),o=a(11059);let i=/^[a-zA-Z0-9_.\-]+$/,d=[{value:"fallback",label:"Fallback",desc:"Try models in order, next on failure",icon:"layers"},{value:"round-robin",label:"Round Robin",desc:"Rotate models across requests",icon:"cached"},{value:"fusion",label:"Fusion",desc:"Parallel panel + judge synthesis",icon:"hub"},{value:"swarm",label:"Swarm",desc:"Hierarchical Manager→Staff→Workers",icon:"account_tree"},{value:"cascade",label:"Cascade",desc:"Escalate cheap→capable on low confidence",icon:"trending_up"}],c={fallback:{icon:"layers",color:"#3B82F6",badge:"info"},"round-robin":{icon:"cached",color:"#10B981",badge:"success"},fusion:{icon:"hub",color:"#8B5CF6",badge:"primary"},swarm:{icon:"account_tree",color:"#F59E0B",badge:"warning"},cascade:{icon:"trending_up",color:"#06B6D4",badge:"cyan"}};function m(e){return c[e]||c.fallback}function x(e){let t=d.find(t=>t.value===e);return t?.label||"Fallback"}let u=[{value:"all",label:"All"},{value:"fallback",label:"Fallback"},{value:"round-robin",label:"Round Robin"},{value:"fusion",label:"Fusion"},{value:"swarm",label:"Swarm"},{value:"cascade",label:"Cascade"}],p=[{value:"name",label:"Name"},{value:"models-desc",label:"Most Models"},{value:"models-asc",label:"Fewest Models"}];function b({combos:e,comboStrategies:t,activeProviders:a,onViewCombos:l,onCreate:r}){let o=e.length,i=function(e){let t=new Set;for(let a of e)for(let e of a.models||[])t.add(e);return t.size}(e),d=function(e,t){let a={fallback:0,"round-robin":0,fusion:0,swarm:0,cascade:0},s=new Set(["fallback","round-robin","fusion","swarm","cascade"]);for(let l of e){let e=t[l.name]?.fallbackStrategy||"fallback",r=s.has(e)?e:"fallback";a[r]=(a[r]||0)+1}return a}(e,t),c=Object.values(d).filter(e=>e>0).length,u=o>0?Math.round(e.reduce((e,t)=>e+(t.models?.length||0),0)/o*10)/10:0,p=Math.max(...Object.values(d),1);return(0,s.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[{label:"Total Combos",value:o,icon:"layers",color:"#3B82F6"},{label:"Unique Models",value:i,icon:"model_training",color:"#10B981"},{label:"Strategies Used",value:c,icon:"account_tree",color:"#8B5CF6"},{label:"Avg Models/Combo",value:u,icon:"analytics",color:"#F59E0B"}].map(e=>(0,s.jsx)(n.Zp,{padding:"sm",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:e.color},children:e.icon})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-mono text-lg font-bold text-text-main",children:e.value}),(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:e.label})]})]})},e.label))}),(0,s.jsxs)(n.Zp,{children:[(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Strategy Distribution"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"How combos are distributed across routing strategies"})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(d).map(([e,t])=>{let a=m(e),l=o>0?Math.round(t/o*100):0;return(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("div",{className:"flex w-28 items-center gap-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:a.color},children:a.icon}),(0,s.jsx)("span",{className:"text-xs font-medium text-text-main",children:x(e)})]}),(0,s.jsx)("div",{className:"flex-1 overflow-hidden rounded-full bg-surface-2",children:(0,s.jsx)("div",{className:"h-2.5 rounded-full transition-all",style:{width:`${t/p*100}%`,backgroundColor:a.color}})}),(0,s.jsxs)("span",{className:"w-16 text-right font-mono text-xs text-text-muted",children:[t," (",l,"%)"]})]},e)})})]}),(0,s.jsxs)(n.Zp,{children:[(0,s.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Combo Health"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Overview of each combo's status"})]}),(0,s.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"list_alt",onClick:l,children:"View All"})]}),0===e.length?(0,s.jsxs)("div",{className:"py-6 text-center text-sm text-text-muted",children:["No combos yet. ",(0,s.jsx)("button",{onClick:r,className:"text-primary hover:underline",children:"Create one →"})]}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>{let l=t[e.name]?.fallbackStrategy||"fallback",r=m(l),o=(e.models||[]).filter(e=>{let t=e.split("/")[0];return a.some(e=>e.provider===t&&!1!==e.isActive)}).length,i=(e.models||[]).length,d=i>0?Math.round(o/i*100):0;return(0,s.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle px-3 py-2 hover:bg-sidebar/30",children:[(0,s.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded",style:{backgroundColor:`${r.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[15px]",style:{color:r.color},children:r.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("code",{className:"truncate font-mono text-xs font-medium",children:e.name}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,s.jsx)(n.Ex,{variant:r.badge,size:"sm",children:x(l)}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[i," models"]})]})]}),(0,s.jsxs)("div",{className:"hidden sm:flex items-center gap-2 shrink-0",children:[(0,s.jsx)("div",{className:"w-20 overflow-hidden rounded-full bg-surface-2",children:(0,s.jsx)("div",{className:`h-1.5 rounded-full ${d>=80?"bg-success":d>=50?"bg-warning":"bg-danger"}`,style:{width:`${d}%`}})}),(0,s.jsxs)("span",{className:"w-8 text-right font-mono text-[10px] text-text-muted",children:[o,"/",i]})]})]},e.id)})})]})]})}var h=a(88105);let g=[{value:"auto",label:"Auto (provider default)"},{value:"off",label:"Off"},{value:"effort",label:"Effort (OpenAI-style)"},{value:"extended",label:"Extended (Claude-style)"}],f=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"max",label:"Max"}],v=[{key:"manager",label:"Manager",icon:"psychology"},{key:"staff",label:"Staff",icon:"badge"},{key:"audit",label:"Audit",icon:"fact_check"},{key:"worker",label:"Worker",icon:"group"}],y=[{key:"panel",label:"Panel",icon:"dashboard"},{key:"judge",label:"Judge",icon:"gavel"}],j=e=>"unlimited"===e||e===1/0||"Infinity"===e;function N(e){let t=h.Q2[e]?.capabilities;return!t||!1!==t.toolUse&&!1!==t.fileAccess}function k(e){if(!e||"string"!=typeof e)return null;let t=e.indexOf("/");return t>=0?e.slice(0,t):e}function w(e,t){if(e){let t=k(e);return{blocked:!!t&&!N(t),provider:t}}let a=k(t&&t.length>0?t[0]:null);return{blocked:!!a&&!N(a),provider:a}}function C(e){return e.filter(e=>N(e.provider))}function S({combo:e,modelCaps:t={},activeProviders:a=[],copied:r,onCopy:o,onEdit:i,onDelete:c,strategy:u={},onSetStrategy:p}){let[b,h]=(0,l.useState)(!1),[N,k]=(0,l.useState)(!1),[M,$]=(0,l.useState)(null),F=Array.isArray(e?.models)?e.models:[],E=u.fallbackStrategy||"fallback",A=u.judgeModel||"",O="fusion"===E,T="swarm"===E,P=u.managerModel||"",z=u.staffModel||"",_=u.auditModel||"",D=m(E),R=(e=>{let t=e?.budgets?.maxEstimatedCostUsd;if(j(t))return 1/0;let a=Number(t);return Number.isFinite(a)&&a>0?a:5})(u),U=j(u?.budgets?.maxEstimatedCostUsd),B=u?.budgets?.enabled===!0,W=B&&u?.budgets?.maxEstimatedCostUsd!=null&&!U&&Number(u.budgets.maxEstimatedCostUsd)>0,J=e=>{let t=Number(e);Number.isFinite(t)&&!(t<=0)&&p({budgets:{...u.budgets||{},enabled:!0,maxEstimatedCostUsd:t}})},q=u.thinking||{},H=q.type||"auto",L="auto"!==H&&"off"!==H,[I,Z]=(0,l.useState)([]),G=e=>p({thinking:{...q,...e}}),V=(e,t)=>{let a={...q.roles||{}};null===t?delete a[e]:a[e]={...a[e]||{},...t},G({roles:a})},Q=F.map(e=>({model:e,caps:t[e]||{}})),K=Q.some(e=>{let t=e.caps.thinkingFormat;return!!e.caps.reasoning&&("openai"===t||"effort"===t||"deepseek"===t||!t)}),Y=Q.some(e=>{let t=e.caps.thinkingFormat;return!!e.caps.reasoning&&("claude-adaptive"===t||"claude"===t||"extended"===t)}),X=Q.some(e=>!!e.caps.thinkingMaxEffort),ee=Q.filter(e=>!e.caps.reasoning&&void 0!==e.caps.reasoning),et="effort"===H?Q.filter(e=>!0===e.caps.reasoning&&e.caps.thinkingFormat&&"openai"!==e.caps.thinkingFormat&&"effort"!==e.caps.thinkingFormat&&"deepseek"!==e.caps.thinkingFormat):"extended"===H?Q.filter(e=>!0===e.caps.reasoning&&e.caps.thinkingFormat&&"claude-adaptive"!==e.caps.thinkingFormat&&"claude"!==e.caps.thinkingFormat&&"extended"!==e.caps.thinkingFormat):[];return(0,s.jsxs)(n.Zp,{padding:"sm",className:"group transition-all hover:border-primary/20",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("button",{className:"flex min-w-0 flex-1 items-start gap-3 text-left sm:items-center",onClick:()=>h(!b),children:[(0,s.jsx)("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${D.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:D.color},children:D.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("code",{className:"truncate font-mono text-sm font-medium",children:e.name}),(0,s.jsx)(n.Ex,{variant:D.badge,size:"sm",children:x(E)}),L&&(0,s.jsxs)(n.Ex,{variant:"cyan",size:"sm",className:"flex items-center gap-0.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"psychology"}),"effort"===H?q.effort||"on":H]}),B&&(0,s.jsxs)(n.Ex,{variant:"warning",size:"sm",className:"flex items-center gap-0.5",title:`Max cost budget: $${R.toFixed(2)} per request`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"savings"}),"$",R.toFixed(2)]}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[F.length," models"]})]}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===F.length?(0,s.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):F.slice(0,3).map((e,a)=>(0,s.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,s.jsx)("span",{className:"truncate max-w-[120px]",children:e}),t[e]&&(0,s.jsx)(n.nh,{caps:t[e],size:11})]},a)),F.length>3&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",F.length-3," more"]})]})]}),(0,s.jsx)("span",{className:`shrink-0 text-text-muted transition-transform ${b?"rotate-180":""}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"expand_more"})})]}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,s.jsx)("div",{className:"w-full sm:w-[180px]",children:(0,s.jsx)(n.l6,{options:d,value:E,onChange:e=>p({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,s.jsxs)("button",{onClick:t=>{t.stopPropagation(),o(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r===`combo-${e.id}`?"check":"content_copy"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,s.jsxs)("button",{onClick:i,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:c,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),b&&(0,s.jsxs)("div",{className:"mt-3 border-t border-border-subtle pt-3",children:[(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsxs)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:["Models (",F.length,")"]}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:F.map((e,a)=>(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded px-2 py-1 bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-4 text-center",children:a+1}),(0,s.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:e}),t[e]&&(0,s.jsx)(n.nh,{caps:t[e],size:11})]},a))})]}),O&&(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Fusion Judge"}),(()=>{let{blocked:e,provider:t}=w(A,F);return(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("button",{onClick:()=>k(!0),className:`inline-flex max-w-full items-center gap-1 rounded border border-dashed px-2 py-1 font-mono text-xs hover:bg-primary/5 ${e?"border-red-400 text-red-500 hover:border-red-500":"border-primary/40 text-primary hover:border-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"gavel"}),(0,s.jsx)("span",{className:"truncate",children:A||`Auto — ${F[0]||"first model"}`})]}),A&&(0,s.jsx)("button",{onClick:()=>p({judgeModel:""}),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Reset to Auto",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),e&&(0,s.jsx)("p",{className:"text-[10px] text-red-500",children:A?"⚠ Web cookie providers cannot serve as Judge (no tool use / file access)":`⚠ Auto-fallback to "${t}" (first combo model) — web cookie cannot serve as Judge`})]})})()]}),T&&(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Swarm Roles"}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[[{key:"manager",label:"Manager",icon:"psychology",value:P,placeholder:`Auto — ${F[0]||"first"}`},{key:"staff",label:"Staff",icon:"badge",value:z,placeholder:"Same as Manager"},{key:"audit",label:"Audit",icon:"fact_check",value:_,placeholder:"Same as Staff"}].map(e=>{let{blocked:t,provider:a}=w(e.value,F);return(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-text-muted w-16",children:e.label}),(0,s.jsxs)("button",{onClick:()=>$(e.key),className:`inline-flex max-w-full items-center gap-1 rounded border border-dashed px-2 py-0.5 font-mono text-[11px] hover:bg-primary/5 ${t?"border-red-400 text-red-500 hover:border-red-500":"border-primary/40 text-primary hover:border-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e.icon}),(0,s.jsx)("span",{className:"truncate",children:e.value||e.placeholder})]}),e.value&&(0,s.jsx)("button",{onClick:()=>p({[`${e.key}Model`]:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:`Reset ${e.label}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]}),t&&(0,s.jsx)("p",{className:"text-[10px] text-red-500 pl-[76px]",children:e.value?`⚠ Web cookie providers cannot serve as ${e.label} (no tool use / file access)`:`⚠ Auto-fallback to "${a}" (first combo model) — web cookie cannot serve as ${e.label}`})]},e.key)}),(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted",children:[(0,s.jsx)("span",{className:"font-medium",children:"Workers"}),(0,s.jsxs)("span",{children:["= combo models (",F.length,")"]}),(0,s.jsx)("span",{className:"text-text-subtle",children:"\xb7"}),(0,s.jsx)("a",{href:"/dashboard/swarm",className:"text-primary hover:underline",children:"Telemetry →"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,s.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:u.autoScale?.enabled===!0,onChange:e=>p({autoScale:{...u.autoScale||{},enabled:e.target.checked}}),className:"rounded border-border accent-primary"}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Auto-scale"})]}),u.autoScale?.enabled&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Min:"}),(0,s.jsx)("input",{type:"number",min:1,max:u.autoScale?.maxWorkers||8,value:u.autoScale?.minWorkers??1,onChange:e=>p({autoScale:{...u.autoScale||{},minWorkers:Number(e.target.value)||1}}),className:"w-10 rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono text-center focus:outline-none focus:border-primary"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Max:"}),(0,s.jsx)("input",{type:"number",min:1,max:8,value:u.autoScale?.maxWorkers??F.length,onChange:e=>p({autoScale:{...u.autoScale||{},maxWorkers:Number(e.target.value)||1}}),className:"w-10 rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono text-center focus:outline-none focus:border-primary"})]})]})]})]})]}),(0,s.jsxs)("div",{className:"mt-3 border-t border-border-subtle pt-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Thinking"}),(0,s.jsx)("button",{onClick:()=>Z(I.length>0?[]:(O?y:T?v:[]).map(e=>e.key)),className:"text-[10px] text-primary hover:underline",children:I.length>0?"Hide roles":`Role overrides${L?" ("+Object.keys(q.roles||{}).length+")":""}`})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:"Mode:"}),(0,s.jsx)("select",{value:H,onChange:e=>G({type:e.target.value}),className:"rounded border border-border bg-background px-1.5 py-0.5 text-[11px] font-mono focus:outline-none focus:border-primary",children:g.map(e=>{let t="auto"===e.value||"off"===e.value||"effort"===e.value&&K||"extended"===e.value&&Y;return(0,s.jsxs)("option",{value:e.value,disabled:!t,className:t?"":"text-text-muted",children:[e.label,t?"":" (not supported)"]},e.value)})})]}),et.length>0&&(0,s.jsxs)("div",{className:"flex items-center gap-1 text-amber-600 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"warning"}),(0,s.jsxs)("span",{className:"text-[10px]",children:[H," not supported by ",et.map(e=>e.model.split("/").pop()).join(", ")]})]}),ee.length>0&&"auto"!==H&&"off"!==H&&(0,s.jsxs)("div",{className:"flex items-center gap-1 text-amber-600 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"warning"}),(0,s.jsxs)("span",{className:"text-[10px]",children:["Thinking capability unknown for ",ee.map(e=>e.model.split("/").pop()).join(", ")]})]}),"effort"===H&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:"Effort:"}),(0,s.jsx)("select",{value:q.effort||"high",onChange:e=>G({effort:e.target.value}),className:"rounded border border-border bg-background px-1.5 py-0.5 text-[11px] font-mono focus:outline-none focus:border-primary",children:f.map(e=>{let t="max"!==e.value||X;return(0,s.jsxs)("option",{value:e.value,disabled:!t,className:t?"":"text-text-muted",children:[e.label,t?"":" (not supported)"]},e.value)})})]}),"extended"===H&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:"Budget:"}),(0,s.jsx)("input",{type:"number",min:1024,max:128e3,step:1024,value:q.budgetTokens||4096,onChange:e=>G({budgetTokens:Number(e.target.value)||4096}),className:"w-20 rounded border border-border bg-background px-1.5 py-0.5 text-[11px] font-mono focus:outline-none focus:border-primary"})]})]}),I.length>0&&L&&(0,s.jsxs)("div",{className:"mt-2 flex flex-col gap-1.5 pl-1",children:[(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:"Per-role overrides (leave as parent to inherit global)"}),(O?y:T?v:[]).map(e=>{let t,a=(t=e.key,q?.roles?.[t]);return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px] text-text-muted",children:e.icon}),(0,s.jsx)("span",{className:"text-[11px] font-medium text-text-muted w-12",children:e.label}),(0,s.jsxs)("select",{value:a?.type||"inherit",onChange:t=>V(e.key,"inherit"===t.target.value?null:{type:t.target.value}),className:"rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"inherit",children:"Inherit"}),(0,s.jsx)("option",{value:"off",children:"Off"}),(0,s.jsxs)("option",{value:"effort",disabled:!K,className:K?"":"text-text-muted",children:["Effort",K?"":" (not supported)"]}),(0,s.jsxs)("option",{value:"extended",disabled:!Y,className:Y?"":"text-text-muted",children:["Extended",Y?"":" (not supported)"]})]}),a?.type==="effort"&&(0,s.jsx)("select",{value:a.effort||"high",onChange:t=>V(e.key,{type:"effort",effort:t.target.value}),className:"rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono focus:outline-none focus:border-primary",children:f.map(e=>{let t="max"!==e.value||X;return(0,s.jsxs)("option",{value:e.value,disabled:!t,className:t?"":"text-text-muted",children:[e.label,t?"":" (not supported)"]},e.value)})}),a?.type==="extended"&&(0,s.jsx)("input",{type:"number",min:1024,max:128e3,step:1024,value:a.budgetTokens||4096,onChange:t=>V(e.key,{type:"extended",budgetTokens:Number(t.target.value)||4096}),className:"w-16 rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono focus:outline-none focus:border-primary"}),a&&(0,s.jsx)("button",{onClick:()=>V(e.key,null),className:"p-0.5 rounded text-text-muted hover:text-red-500",title:"Reset to inherit",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.key)})]})]}),(0,s.jsxs)("div",{className:"text-xs text-text-muted bg-black/[0.02] dark:bg-white/[0.02] rounded px-2 py-1.5",children:[(0,s.jsxs)("span",{className:"font-medium",children:[x(E),":"]})," ",d.find(e=>e.value===E)?.desc]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-x-3 gap-y-2 rounded-lg border border-warning/20 bg-warning/[0.04] px-3 py-2",children:[(0,s.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:B,onChange:e=>{var t;return t=e.target.checked,void p({budgets:{...u.budgets||{},enabled:t}})},className:"rounded border accent-primary","aria-label":"Enable cost budget limit"}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-warning",children:"savings"}),(0,s.jsx)("span",{className:"text-[11px] font-semibold text-text-main",children:"Budget Limit"})]}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:B?"enabled":"off (no limit)"}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-[12px] font-medium text-text-muted",children:"$"}),(0,s.jsx)("input",{type:"number",min:.01,step:.5,value:U?"":R,onChange:e=>J(e.target.value),disabled:!B||U,"aria-label":"Max cost budget in USD per request",className:"w-20 rounded border border-border bg-background px-1.5 py-0.5 text-[11px] font-mono text-right focus:outline-none focus:border-primary disabled:opacity-60"}),(0,s.jsx)("button",{type:"button",onClick:U?()=>J(5):()=>{p({budgets:{...u.budgets||{},enabled:!0,maxEstimatedCostUsd:"unlimited"}})},disabled:!B,className:`rounded border px-2 py-0.5 text-[11px] font-medium ${U?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:text-text-main"} disabled:opacity-40 disabled:cursor-not-allowed`,children:U?"Unlimited":"∞"})]}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"per request"}),(0,s.jsx)("span",{className:`text-[10px] ${W||U?"text-primary":"text-text-muted"}`,children:U?"Unlimited":W?`Custom $${Number(R).toFixed(2)}`:"Default $5.00"})]})]}),(0,s.jsx)(n.rq,{isOpen:N,onClose:()=>k(!1),onSelect:e=>{p({judgeModel:e?.value||""}),k(!1)},activeProviders:C(a),title:"Select Judge Model",addedModelValues:A?[A]:[],closeOnSelect:!0}),M&&(0,s.jsx)(n.rq,{isOpen:!0,onClose:()=>$(null),onSelect:e=>{p({[`${M}Model`]:e?.value||""}),$(null)},activeProviders:C(a),title:`Select ${"manager"===M?"Manager":"staff"===M?"Staff":"Audit"} Model`,addedModelValues:"manager"===M?P?[P]:[]:"staff"===M?z?[z]:[]:_?[_]:[],closeOnSelect:!0})]})}function M({combos:e,modelCaps:t,activeProviders:a,comboStrategies:r,copied:o,copy:i,onEdit:d,onDelete:c,onSetStrategy:m,onCreate:x}){let[b,h]=(0,l.useState)(""),[g,f]=(0,l.useState)("all"),[v,y]=(0,l.useState)("name"),j=(0,l.useMemo)(()=>{var t;let a;return t=function(e,t,a,s){let l=e;if("all"!==a&&(l=l.filter(e=>(s[e.name]?.fallbackStrategy||"fallback")===a)),t.trim()){let e=t.trim().toLowerCase();l=l.filter(t=>t.name.toLowerCase().includes(e)||(t.models||[]).some(t=>t.toLowerCase().includes(e)))}return l}(e,b,g,r),a=[...t],"models-desc"===v?a.sort((e,t)=>(t.models?.length||0)-(e.models?.length||0)):"models-asc"===v?a.sort((e,t)=>(e.models?.length||0)-(t.models?.length||0)):a.sort((e,t)=>e.name.localeCompare(t.name)),a},[e,b,g,v,r]);return 0===e.length?(0,s.jsx)(n.pp,{icon:"layers",title:"No combos yet",description:"Create model combos with fallback, round-robin, fusion, or swarm strategies",actionText:"Create Combo",onAction:x}):(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)(n.pd,{placeholder:"Search combos or models...",value:b,onChange:e=>h(e.target.value),className:"sm:max-w-xs"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:u.map(e=>(0,s.jsx)("button",{onClick:()=>f(e.value),className:`rounded-full px-2.5 py-1 text-xs font-medium transition-colors ${g===e.value?"bg-primary/15 text-primary ring-1 ring-primary/20":"bg-surface-2 text-text-muted hover:text-text-main"}`,children:e.label},e.value))}),(0,s.jsx)("select",{value:v,onChange:e=>y(e.target.value),className:"appearance-none rounded-lg border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",children:p.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:j.length===e.length?`${e.length} combo${1!==e.length?"s":""}`:`${j.length} of ${e.length} combos`}),0===j.length?(0,s.jsx)(n.Zp,{children:(0,s.jsxs)("div",{className:"py-8 text-center text-sm text-text-muted",children:['No combos match "',b,'" ',"all"!==g&&`with ${g} strategy`]})}):(0,s.jsx)("div",{className:"flex flex-col gap-3",children:j.map(e=>(0,s.jsx)(S,{combo:e,modelCaps:t,activeProviders:a,copied:o,onCopy:i,onEdit:()=>d(e),onDelete:()=>c(e.id),strategy:r[e.name]||{},onSetStrategy:t=>m(e.name,t)},e.id))})]})}let $=[{id:"always-on",name:"Always-On (5-Layer Fallback)",description:"Zero-downtime coding with 5 layers of fallback. Mix of subscription, cheap, and free tiers — if any model fails, the next picks up automatically.",icon:"shield",category:"reliability",strategy:"fallback",models:["claude-opus-4-7","gpt-5.4","glm-5.1","MiniMax-M2.7","claude-sonnet-4.5"],preferredProviders:{"claude-opus-4-7":"cc","gpt-5.4":"cx","glm-5.1":"glm","MiniMax-M2.7":"minimax","claude-sonnet-4.5":"kr"}},{id:"max-reasoning-swarm",name:"Max Reasoning Swarm",description:"Deep multi-agent analysis for complex coding tasks. Manager decomposes the problem, workers solve subtasks in parallel, audit reviews the result. Manager thinks at max effort.",icon:"psychology",category:"reasoning",strategy:"swarm",models:["claude-opus-4-7","gpt-5.4","glm-5.1","claude-sonnet-4.5"],preferredProviders:{"claude-opus-4-7":"cc","gpt-5.4":"cx","glm-5.1":"glm","claude-sonnet-4.5":"kr"},strategyConfig:{fallbackStrategy:"swarm",managerModel:"claude-opus-4-7",auditModel:"claude-sonnet-4.5",thinking:{type:"effort",effort:"high",roles:{manager:{type:"effort",effort:"max"},worker:{type:"effort",effort:"medium"},audit:{type:"effort",effort:"high"}}},autoScale:{enabled:!0,minWorkers:2,maxWorkers:4}}},{id:"flash-fusion",name:"Flash Fusion",description:"Two fast models answer in parallel, a judge picks the best result. Low latency with a quality check — great for everyday coding questions.",icon:"bolt",category:"balanced",strategy:"fusion",models:["gpt-5.4","MiniMax-M2.7"],preferredProviders:{"gpt-5.4":"cx","MiniMax-M2.7":"minimax"},strategyConfig:{fallbackStrategy:"fusion",thinking:{type:"effort",effort:"medium"}}},{id:"penny-pincher",name:"Penny-Pincher",description:"Ultra-low-cost daily driver built from cheap and free tiers. Thinking disabled to keep tokens minimal. Use for simple tasks where cost matters most.",icon:"savings",category:"budget",strategy:"fallback",models:["MiniMax-M2.7","glm-5.1","gpt-5.4"],preferredProviders:{"MiniMax-M2.7":"minimax","glm-5.1":"glm","gpt-5.4":"kr"},strategyConfig:{fallbackStrategy:"fallback",thinking:{type:"off"}}},{id:"bug-hunter",name:"Bug Hunter",description:"Three models independently diagnose the same bug, a strong judge picks the most likely root cause. High-precision debugging with thinking on.",icon:"bug_report",category:"debugging",strategy:"fusion",models:["gpt-5.4","glm-5.1","MiniMax-M2.7"],preferredProviders:{"gpt-5.4":"cx","glm-5.1":"glm","MiniMax-M2.7":"minimax"},strategyConfig:{fallbackStrategy:"fusion",thinking:{type:"effort",effort:"high"}}}];function F({combos:e,connections:t,modelIndex:a={},onApply:r}){let[o,i]=(0,l.useState)(null),d=new Set(t?.filter(e=>!1!==e.isActive).map(e=>e.provider)||[]),c=new Set((e||[]).map(e=>e.name)),u=e=>(e.models||[]).map(t=>{let s=t.indexOf("/"),l=s>0,r=l?t.slice(s+1):t,n=(l?t.slice(0,s):"")||(e.preferredProviders||{})[r]||"",o=n?(0,h.rs)(n):"",i=(a[r]||[]).map(e=>(0,h.rs)(e)).filter(e=>d.has(e));if(o&&i.includes(o)){let e=(0,h.wG)(o);return{ref:t,modelName:r,provider:o,providerAlias:e,full:`${e}/${r}`,available:!0}}if(i.length>0){let e=(0,h.wG)(i[0]);return{ref:t,modelName:r,provider:i[0],providerAlias:e,full:`${e}/${r}`,available:!0,resolvedFrom:n}}return{ref:t,modelName:r,provider:o||n,full:l?t:r,available:!1}}),p=async e=>{i(e.id);try{let t=u(e),a=t.filter(e=>e.available).map(e=>e.full),s=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,models:a,kind:null})});if(!s.ok){let e=await s.json();alert(e.error||"Failed to create combo from template");return}let l=await fetch("/api/settings").then(e=>e.json()).catch(()=>({})),n=e.strategyConfig?{...e.strategyConfig}:{fallbackStrategy:e.strategy},o=Object.fromEntries(t.map(e=>[e.modelName,e.full]));for(let e of["managerModel","staffModel","auditModel","judgeModel"]){let t=n[e];if(!t)continue;let a=t.indexOf("/"),s=a>0?t.slice(a+1):t;o[s]&&(n[e]=o[s])}let i={...l?.comboStrategies||{},[e.name]:n},d=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:i})});if(!d.ok){let e=await d.json().catch(()=>({}));alert(e.error||"Failed to apply template strategy");return}r&&r()}catch(e){alert("Failed to apply template: "+(e?.message||String(e)))}finally{i(null)}};return 0===$.length?(0,s.jsx)(n.pp,{icon:"dashboard_customize",title:"No templates available",description:"Combo templates will appear here when added."}):(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"mb-1",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Combo Templates"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"One-click prebuilt combos. Provider availability is checked automatically."})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:$.map(e=>{let t=u(e),a=t.filter(e=>e.available).length,l=t.length,r=c.has(e.name),i=m(e.strategy),d=a===l;return(0,s.jsxs)(n.Zp,{padding:"sm",className:"flex flex-col gap-3 hover:border-primary/20 transition-all",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${i.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:i.color},children:e.icon||i.icon})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-text-main",children:e.name}),(0,s.jsx)(n.Ex,{variant:i.badge,size:"sm",children:x(e.strategy)})]})]}),r&&(0,s.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:"Created"})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted leading-relaxed",children:e.description}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[t.slice(0,4).map((e,t)=>(0,s.jsxs)("code",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 font-mono text-[10px] ${e.available?"bg-black/5 text-text-muted dark:bg-white/5":"bg-red-500/10 text-red-500"}`,title:e.available?`Resolved to ${e.provider}`:`No connected provider has ${e.modelName}`,children:[(0,s.jsx)("span",{className:e.available?"text-success":"text-red-500",children:e.available?"✓":"✗"}),(0,s.jsx)("span",{className:"truncate max-w-[110px]",children:e.modelName}),e.available&&(0,s.jsx)("span",{className:"rounded bg-black/10 px-0.5 text-[9px] dark:bg-white/10",children:e.provider})]},t)),t.length>4&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",t.length-4," more"]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>{let t=e.resolvedFrom?(0,h.rs)(e.resolvedFrom):"",a=e.available?`${e.provider}${e.resolvedFrom&&t!==e.provider?` (via ${e.resolvedFrom})`:""}`:`${e.provider||"?"} (missing)`,l=e.available;return(0,s.jsxs)("span",{className:`inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-[10px] font-medium ${l?"bg-success/10 text-success":"bg-surface-2 text-text-muted"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:l?"check_circle":"radio_button_unchecked"}),a]},e.ref)})}),(0,s.jsx)("div",{className:"mt-auto pt-1",children:(0,s.jsx)(n.$n,{size:"sm",fullWidth:!0,variant:r?"secondary":"primary",icon:o===e.id?"progress_activity":"add",disabled:r||o===e.id||!d,onClick:()=>p(e),children:o===e.id?"Creating...":r?"Already Created":d?"Apply Template":`Apply (${a}/${l} ready)`})})]},e.id)})})]})}var E=a(44923),A=a(87256),O=a(5020),T=a(39768);function P({id:e,index:t,model:a,isFirst:r,isLast:o,modelCaps:i,onEdit:d,onMoveUp:c,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:p,setNodeRef:b,transform:h,isDragging:g}=(0,A.gl)({id:e}),f={transform:T.Ks.Transform.toString(h),opacity:g?.5:1,zIndex:g?999:void 0},[v,y]=(0,l.useState)(!1),[j,N]=(0,l.useState)(a),k=()=>{let e=j.trim();e&&e!==a?d(e):N(a),y(!1)};return(0,s.jsxs)("div",{ref:b,style:f,className:`group flex min-w-0 items-center gap-2 rounded-lg border px-2.5 py-1.5 transition-all ${g?"border-primary/40 bg-panel shadow-md ring-1 ring-primary/20":"border-transparent bg-panel hover:border-border-subtle"}`,children:[(0,s.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center rounded bg-primary/10 text-[10px] font-bold text-primary",children:t+1}),(0,s.jsx)("button",{...u,...p,type:"button",className:"cursor-grab touch-none shrink-0 p-0.5 rounded text-text-muted/50 hover:text-text-main active:cursor-grabbing",title:"Drag to reorder",children:(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,s.jsx)("circle",{cx:"9",cy:"4",r:"1.5"}),(0,s.jsx)("circle",{cx:"15",cy:"4",r:"1.5"}),(0,s.jsx)("circle",{cx:"9",cy:"12",r:"1.5"}),(0,s.jsx)("circle",{cx:"15",cy:"12",r:"1.5"}),(0,s.jsx)("circle",{cx:"9",cy:"20",r:"1.5"}),(0,s.jsx)("circle",{cx:"15",cy:"20",r:"1.5"})]})}),v?(0,s.jsx)("input",{autoFocus:!0,value:j,onChange:e=>N(e.target.value),onBlur:k,onKeyDown:e=>{"Enter"===e.key&&k(),"Escape"===e.key&&(N(a),y(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-panel px-1.5 py-0.5 font-mono text-xs text-text-main outline-none"}):(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 cursor-text rounded px-1 py-0.5 hover:bg-black/[0.03] dark:hover:bg-white/[0.03]",onClick:()=>y(!0),title:"Click to edit",children:[(0,s.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:a}),i?.[a]&&(0,s.jsx)(n.nh,{caps:i[a],size:11})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,s.jsx)("button",{onClick:c,disabled:r,className:`rounded p-1 transition-colors ${r?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:m,disabled:o,className:`rounded p-1 transition-colors ${o?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_downward"})})]}),(0,s.jsx)("button",{onClick:x,className:"shrink-0 rounded p-1 text-text-muted opacity-0 transition-all hover:bg-danger/10 hover:text-danger group-hover:opacity-100",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}function z({isOpen:e,combo:t,onClose:a,onSave:r,activeProviders:o,modelCaps:c={},kindFilter:m=null}){let[x,u]=(0,l.useState)(t?.name||""),[p,b]=(0,l.useState)(t?.models||[]),[h,g]=(0,l.useState)(!1),[f,v]=(0,l.useState)(!1),[y,j]=(0,l.useState)(""),[N,k]=(0,l.useState)({}),[w,C]=(0,l.useState)(e);(0,l.useEffect)(()=>{e&&!w&&(u(t?.name||""),b(Array.isArray(t?.models)?[...t.models]:[]),j(""),g(!1)),C(e)},[e,w,t]);let S=(0,E.FR)((0,E.MS)(E.AN,{activationConstraint:{distance:5}}),(0,E.MS)(E.uN,{coordinateGetter:A.JR})),M=p.map((e,t)=>({uid:`item-${t}`,model:e}));(0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let e=await fetch("/api/models/alias");if(!t&&e.ok){let t=await e.json();k(t.aliases||{})}}catch{}})(),()=>{t=!0}},[e]);let $=e=>e.trim()?i.test(e)?(j(""),!0):(j("Only letters, numbers, -, _ and . allowed"),!1):(j("Name is required"),!1),F=async()=>{$(x)&&(v(!0),await r({name:x.trim(),models:p}),v(!1))},T=!!t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.aF,{isOpen:e,onClose:a,title:T?"Edit Combo":"Create Combo",size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.pd,{label:"Combo Name",value:x,onChange:e=>{let t=e.target.value;u(t),t?$(t):j("")},placeholder:"my-combo",error:y}),(0,s.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:"Use this name as the model in your client:"}),x.trim()&&(0,s.jsx)("code",{className:"rounded bg-primary/10 px-1.5 py-0.5 font-mono text-[10px] text-primary",children:x.trim()})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Models"}),p.length>0&&(0,s.jsxs)(n.Ex,{variant:"info",size:"sm",children:[p.length," model",1!==p.length?"s":""]})]}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Drag to reorder priority"})]}),0===p.length?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 border border-dashed border-border rounded-lg bg-surface-2/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-2xl mb-2",children:"layers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mb-3",children:"Add models to build your combo"}),(0,s.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>g(!0),children:"Add First Model"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(E.Mp,{sensors:S,collisionDetection:E.fp,onDragEnd:e=>{let{active:t,over:a}=e;if(a&&t.id!==a.id){let e=M.findIndex(e=>e.uid===t.id),s=M.findIndex(e=>e.uid===a.id);-1!==e&&-1!==s&&b(t=>(0,A.be)(t,e,s))}},modifiers:[O.FN,O.gj],children:(0,s.jsx)(A.gB,{items:M.map(e=>e.uid),strategy:A._G,children:(0,s.jsx)("div",{className:"flex max-h-[45vh] min-w-0 flex-col gap-1 overflow-y-auto rounded-lg bg-surface-2/30 p-1.5",children:M.map(({uid:e,model:t},a)=>(0,s.jsx)(P,{id:e,index:a,model:t,modelCaps:c,isFirst:0===a,isLast:a===M.length-1,onEdit:e=>{let t=[...p];t[a]=e,b(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...p];[t[e-1],t[e]]=[t[e],t[e-1]],b(t)})(a),onMoveDown:()=>(e=>{if(e===p.length-1)return;let t=[...p];[t[e],t[e+1]]=[t[e+1],t[e]],b(t)})(a),onRemove:()=>{b(e=>e.filter((e,t)=>t!==a))}},e))})})}),(0,s.jsxs)("button",{onClick:()=>g(!0),className:"w-full mt-2 py-2 border border-dashed border-primary/30 rounded-lg text-xs text-primary font-medium hover:border-primary hover:bg-primary/5 transition-colors flex items-center justify-center gap-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]})]}),p.length>=2&&(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"lightbulb"}),(0,s.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Strategy Tips"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2",children:d.map(e=>(0,s.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px] mt-0.5 text-primary/60",children:e.icon}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-medium text-text-main",children:e.label})," — ",e.desc]})]},e.value))}),(0,s.jsx)("p",{className:"mt-1.5 text-[10px] text-text-muted",children:"Set strategy after creating the combo from the Combos tab."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,s.jsx)(n.$n,{onClick:a,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(n.$n,{onClick:F,fullWidth:!0,size:"sm",icon:T?"save":"add",disabled:!x.trim()||!!y||f,children:f?"Saving...":T?"Save Changes":"Create Combo"})]})]})}),(0,s.jsx)(n.rq,{isOpen:h,onClose:()=>g(!1),onSelect:e=>{b(t=>t.includes(e.value)?t:[...t,e.value])},onDeselect:e=>{b(t=>t.filter(t=>t!==e.value))},activeProviders:o,modelAliases:N,title:"Add Model to Combo",kindFilter:m,addedModelValues:p,closeOnSelect:!1})]})}let _=[{value:"overview",label:"Overview"},{value:"combos",label:"Combos"},{value:"templates",label:"Templates"}];function D(){let e=(0,r.useRouter)(),t=(0,r.useSearchParams)().get("tab")||"overview",[a,i]=(0,l.useState)([]),[d,c]=(0,l.useState)(!0),[m,x]=(0,l.useState)(!1),[u,p]=(0,l.useState)(null),[h,g]=(0,l.useState)([]),[f,v]=(0,l.useState)({}),[y,j]=(0,l.useState)({}),[N,k]=(0,l.useState)({}),[w,C]=(0,l.useState)(null),{copied:S,copy:$}=(0,o.C)(),E=(0,l.useCallback)(async()=>{try{let[e,t,a,s]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings"),fetch("/api/models")]),l=await e.json(),r=await t.json(),n=a.ok?await a.json():{};if(e.ok&&i((l.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),t.ok&&g(r.connections||[]),s.ok){let e=await s.json(),t={},a={};for(let s of e.models||[]){s.caps&&(t[s.fullModel]=s.caps);let e=(s.fullModel||"").split("/").slice(1).join("/");e&&s.provider&&(a[e]||(a[e]=[]),a[e].includes(s.provider)||a[e].push(s.provider))}j(t),k(a)}v(n.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{c(!1)}},[]);(0,l.useEffect)(()=>{E()},[E]);let A=t=>e.push(`/dashboard/combos?tab=${t}`),O=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await E(),x(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},T=async(e,t)=>{try{let a=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(a.ok)await E(),p(null);else{let e=await a.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},P=async(e,t)=>{try{let s=f[e]||{},l={...s,...t},r=l.fallbackStrategy,n=new Set(["fallbackStrategy","thinking","autoScale","budgets",...{fusion:["judgeModel","fusionTuning"],swarm:["managerModel","staffModel","auditModel","workerCount","swarmTuning","enableTelemetry"],cascade:["cascade"],fallback:[],"round-robin":[]}[r]||[]]),o={};for(let[e,t]of Object.entries(l))n.has(e)&&(o[e]=t);let i=Object.keys(s).some(e=>"fallbackStrategy"!==e&&null!=s[e]&&""!==s[e]),d=Object.keys(o).some(e=>"fallbackStrategy"!==e),c="fallback"===o.fallbackStrategy&&i&&!d;if(!c&&("swarm"===o.fallbackStrategy||"fusion"===o.fallbackStrategy)){let t=a.find(t=>t.name===e),s=t?.models||[];try{let e=await fetch("/api/combos/validate-roles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({strategy:o.fallbackStrategy,managerModel:o.managerModel,staffModel:o.staffModel,auditModel:o.auditModel,judgeModel:o.judgeModel,panel:s})});if(e.ok){let t=await e.json();if(!t.valid&&Array.isArray(t.violations)&&t.violations.length>0){let e=t.violations.map(e=>`${e.role}: ${e.reason}`).join("\n");alert(`Cannot save strategy — invalid role models:
2
+
3
+ ${e}`);return}}}catch{}}await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:{[e]:c?null:o}})}),v(t=>{let a={...t};return c?delete a[e]:a[e]=o,a})}catch(e){console.log("Error updating combo strategy:",e)}};return d?(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(n.Qv,{}),(0,s.jsx)(n.Qv,{})]}):(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,s.jsx)(n.zY,{title:"Combos",description:"Group models under one name, then pick a strategy per combo",icon:"layers",actions:(0,s.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>x(!0),className:"whitespace-nowrap",children:"Create Combo"})}),(0,s.jsx)(n.Iz,{options:_,value:t,onChange:A}),"overview"===t&&(0,s.jsx)(b,{combos:a,comboStrategies:f,activeProviders:h,onViewCombos:()=>A("combos"),onCreate:()=>x(!0)}),"combos"===t&&(0,s.jsx)(M,{combos:a,modelCaps:y,activeProviders:h,comboStrategies:f,copied:S,copy:$,onEdit:p,onDelete:e=>{C({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{C(null);try{let t=await fetch(`/api/combos/${e}`,{method:"DELETE"});if(t.ok)i(t=>t.filter(t=>t.id!==e));else{let e=await t.json().catch(()=>({}));alert(e.error||`Failed to delete combo (${t.status})`)}}catch(e){console.log("Error deleting combo:",e),alert("Failed to delete combo — network error")}}})},onSetStrategy:P,onCreate:()=>x(!0)}),"templates"===t&&(0,s.jsx)(F,{combos:a,connections:h,modelIndex:N,onApply:E}),(0,s.jsx)(z,{isOpen:m,onClose:()=>x(!1),onSave:O,activeProviders:h,modelCaps:y},"create"),(0,s.jsx)(z,{isOpen:!!u,combo:u,onClose:()=>p(null),onSave:e=>T(u.id,e),activeProviders:h,modelCaps:y},u?.id||"new"),(0,s.jsx)(n.uo,{isOpen:!!w,onClose:()=>C(null),onConfirm:w?.onConfirm,title:w?.title||"Confirm",message:w?.message,variant:"danger"})]})}function R(){return(0,s.jsx)(l.Suspense,{fallback:(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"}),(0,s.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"})]}),children:(0,s.jsx)(D,{})})}}},e=>{e.O(0,[27,7055,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=57410)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{237:(e,s,t)=>{Promise.resolve().then(t.bind(t,44493))},44493:(e,s,t)=>{"use strict";t.d(s,{default:()=>o});var l=t(95155),n=t(12115),r=t(35497),a=t(90620);let c={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function o(){let[e,s]=(0,n.useState)([]),[t,o]=(0,n.useState)(!1),i=(0,n.useRef)(null),d=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};return(0,n.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>o(!0),e.onmessage=e=>{let t=JSON.parse(e.data);"init"===t.type?s(t.logs.slice(-a.UY.maxLines)):"line"===t.type?s(e=>{let s=[...e,t.line];return s.length>a.UY.maxLines?s.slice(-a.UY.maxLines):s}):"lines"===t.type?s(e=>{let s=[...e,...t.lines];return s.length>a.UY.maxLines?s.slice(-a.UY.maxLines):s}):"clear"===t.type&&s([])},e.onerror=()=>o(!1),()=>e.close()},[]),(0,n.useEffect)(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(r.zY,{title:"Console",description:"Live server logs",icon:"monitor",actions:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("span",{className:`flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium ${t?"bg-success/12 text-success":"bg-danger/12 text-danger"}`,children:[(0,l.jsx)("span",{className:`size-1.5 rounded-full ${t?"bg-success":"bg-danger"}`}),t?"Live":"Disconnected"]}),(0,l.jsx)(r.$n,{size:"sm",variant:"outline",icon:"delete",onClick:d,children:"Clear"})]})}),(0,l.jsx)(r.Zp,{padding:"none",children:(0,l.jsx)("div",{ref:i,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto",children:0===e.length?(0,l.jsx)("span",{className:"text-text-muted",children:"No console logs yet."}):(0,l.jsx)("div",{className:"space-y-0.5",children:e.map((e,s)=>{let t,n;return(0,l.jsx)("div",{children:(n=c[(t=e.match(/\[(\w+)\]/g))?t[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,l.jsx)("span",{className:n,children:e}))},s)})})})})]})}}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=237)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[27,8105,705,1321,5497,981,8441,3794,7358],()=>_(_.s=90981)),_N_E=_.O()}]);