@rsalmn/extremerouter 0.7.7 → 0.7.9

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 (964) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +10 -7
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/required-server-files.json +1 -1
  5. package/app/.next-cli-build/routes-manifest.json +20 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  88. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  99. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  101. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  102. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  103. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  104. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
  106. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  108. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  109. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  110. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  148. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  154. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  168. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  174. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  180. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  190. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  192. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -0
  216. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -0
  217. package/app/.next-cli-build/server/app/api/oauth/1min/import/route_client-reference-manifest.js +1 -0
  218. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  225. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -0
  245. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -0
  246. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route_client-reference-manifest.js +1 -0
  247. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  248. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -0
  260. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -0
  261. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route_client-reference-manifest.js +1 -0
  262. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  305. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  307. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  311. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  313. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  315. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +3 -3
  329. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  335. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  383. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  397. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  429. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  431. package/app/.next-cli-build/server/app/callback.html +1 -1
  432. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  433. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  434. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
  436. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  437. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  440. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  444. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  445. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
  447. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  448. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  452. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  453. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/index.html +1 -1
  455. package/app/.next-cli-build/server/app/index.rsc +5 -5
  456. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  458. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
  460. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  461. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  462. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  464. package/app/.next-cli-build/server/app/landing.html +1 -1
  465. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  466. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  467. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  468. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
  469. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  470. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  471. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  472. package/app/.next-cli-build/server/app/login/page.js +2 -2
  473. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  475. package/app/.next-cli-build/server/app/login.html +1 -1
  476. package/app/.next-cli-build/server/app/login.rsc +6 -6
  477. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  478. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
  480. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  482. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  484. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/page.js +2 -2
  486. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  488. package/app/.next-cli-build/server/app-paths-manifest.json +10 -7
  489. package/app/.next-cli-build/server/chunks/1239.js +1 -0
  490. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  491. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  492. package/app/.next-cli-build/server/chunks/212.js +1 -1
  493. package/app/.next-cli-build/server/chunks/2231.js +1 -1
  494. package/app/.next-cli-build/server/chunks/{2722.js → 2342.js} +24 -24
  495. package/app/.next-cli-build/server/chunks/2701.js +1 -1
  496. package/app/.next-cli-build/server/chunks/2926.js +1 -1
  497. package/app/.next-cli-build/server/chunks/318.js +37 -35
  498. package/app/.next-cli-build/server/chunks/319.js +1 -1
  499. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  500. package/app/.next-cli-build/server/chunks/3992.js +1 -0
  501. package/app/.next-cli-build/server/chunks/4040.js +5 -3
  502. package/app/.next-cli-build/server/chunks/412.js +2 -2
  503. package/app/.next-cli-build/server/chunks/4356.js +9 -0
  504. package/app/.next-cli-build/server/chunks/4632.js +1 -1
  505. package/app/.next-cli-build/server/chunks/4741.js +4 -2
  506. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  507. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  508. package/app/.next-cli-build/server/chunks/5628.js +1 -0
  509. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  510. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  511. package/app/.next-cli-build/server/chunks/5983.js +9 -0
  512. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  513. package/app/.next-cli-build/server/chunks/615.js +1 -1
  514. package/app/.next-cli-build/server/chunks/6316.js +2 -2
  515. package/app/.next-cli-build/server/chunks/6630.js +1 -1
  516. package/app/.next-cli-build/server/chunks/7152.js +1 -1
  517. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  518. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  519. package/app/.next-cli-build/server/chunks/8895.js +2 -2
  520. package/app/.next-cli-build/server/chunks/9630.js +1 -1
  521. package/app/.next-cli-build/server/chunks/9703.js +2 -2
  522. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  523. package/app/.next-cli-build/server/middleware.js +3 -3
  524. package/app/.next-cli-build/server/pages/404.html +1 -1
  525. package/app/.next-cli-build/server/pages/500.html +1 -1
  526. package/app/.next-cli-build/static/LTz0FqDsVsVSFbsHZibmc/_buildManifest.js +1 -0
  527. package/app/.next-cli-build/static/chunks/1321-7d2ce22078e1dffb.js +1 -0
  528. package/app/.next-cli-build/static/chunks/{1636-25599a8426fd97ed.js → 1636-47ea773ffa2d3a4b.js} +1 -1
  529. package/app/.next-cli-build/static/chunks/3794-1b03b52e3112452e.js +32 -0
  530. package/app/.next-cli-build/static/chunks/5497-c5ee857b78a8cf8a.js +7 -0
  531. package/app/.next-cli-build/static/chunks/{6069-bd1f2f41043f8c30.js → 682-03720d6613bcbd0f.js} +3 -3
  532. package/app/.next-cli-build/{server/chunks/8084.js → static/chunks/8105-705e80a4c161374b.js} +1 -1
  533. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-4a622e705e5c4efc.js → page-920869c698a8b3cf.js} +1 -1
  534. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-76e413764f752c03.js → page-75247ad22e97f7cc.js} +1 -1
  535. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-d722ccf5e0fec340.js +1 -0
  536. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-afc62a0533448ca0.js +1 -0
  537. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-262aee689cd6eb34.js → page-a91bcaf7425e68a3.js} +1 -1
  538. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-18b262b802c95472.js → page-a8c4d8c681e19868.js} +1 -1
  539. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-408845bd809806a6.js +1 -0
  540. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-d077213deca8c217.js +1 -0
  541. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-e8d14560b2019a5f.js → page-b635b8b051acb5a5.js} +1 -1
  542. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-a27c538ea71ebf8a.js → page-d9958dfec1d2e28e.js} +1 -1
  543. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-5e3375dcb5344f35.js → page-a36b3b632d16f4cb.js} +1 -1
  544. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-e1875ca8be7183eb.js → page-92a0799a23d869b3.js} +1 -1
  545. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-99540bfed3193080.js +1 -0
  546. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/{page-640703af38ea9eed.js → page-262fa6911888d4f1.js} +1 -1
  547. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-f644da989b8878c3.js +1 -0
  548. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-0a50de81e7b688fc.js +1 -0
  549. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-1b18b64a9ced4e9f.js → page-aa26b25a26b5dac8.js} +1 -1
  550. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-53ab489f01e3da19.js +10 -0
  551. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-f2075be55913fe76.js → page-8965749fb7d0fac3.js} +1 -1
  552. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-e71aac08cb013b28.js → page-96d3eb0dfde0711b.js} +1 -1
  553. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-964ac16d6816983d.js → page-843c810c0818ce1b.js} +1 -1
  554. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-da7dccb599243439.js → page-bc16a0312f0a7915.js} +1 -1
  555. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-6c82876d3dc71dfb.js → page-97c920b552343488.js} +1 -1
  556. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-73e504f021474182.js → page-2592739cbb862828.js} +1 -1
  557. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-422974480d3bd378.js → page-a8af04fbd6293d2f.js} +1 -1
  558. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-6235a5ba123759b2.js → page-5433f8ac60dd59f0.js} +1 -1
  559. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-fbd9ba3da73c1af0.js → layout-df0ed16971ba7386.js} +1 -1
  560. package/app/.next-cli-build/static/chunks/app/_global-error/page-abffaa46b4637bee.js +1 -0
  561. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-abffaa46b4637bee.js +1 -0
  562. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-abffaa46b4637bee.js +1 -0
  563. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-abffaa46b4637bee.js +1 -0
  564. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-abffaa46b4637bee.js +1 -0
  565. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-abffaa46b4637bee.js +1 -0
  566. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-abffaa46b4637bee.js +1 -0
  567. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-abffaa46b4637bee.js +1 -0
  568. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-abffaa46b4637bee.js +1 -0
  569. package/app/.next-cli-build/static/chunks/app/api/cache/route-abffaa46b4637bee.js +1 -0
  570. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-abffaa46b4637bee.js +1 -0
  571. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-abffaa46b4637bee.js +1 -0
  572. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-abffaa46b4637bee.js +1 -0
  573. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-abffaa46b4637bee.js +1 -0
  574. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-abffaa46b4637bee.js +1 -0
  575. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-abffaa46b4637bee.js +1 -0
  576. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-abffaa46b4637bee.js +1 -0
  577. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-abffaa46b4637bee.js +1 -0
  578. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-abffaa46b4637bee.js +1 -0
  579. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-abffaa46b4637bee.js +1 -0
  580. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-abffaa46b4637bee.js +1 -0
  581. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-abffaa46b4637bee.js +1 -0
  582. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-abffaa46b4637bee.js +1 -0
  583. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-abffaa46b4637bee.js +1 -0
  584. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-abffaa46b4637bee.js +1 -0
  585. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-abffaa46b4637bee.js +1 -0
  586. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-abffaa46b4637bee.js +1 -0
  587. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-abffaa46b4637bee.js +1 -0
  588. package/app/.next-cli-build/static/chunks/app/api/combos/route-abffaa46b4637bee.js +1 -0
  589. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-abffaa46b4637bee.js +1 -0
  590. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-abffaa46b4637bee.js +1 -0
  591. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-abffaa46b4637bee.js +1 -0
  592. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-abffaa46b4637bee.js +1 -0
  593. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-abffaa46b4637bee.js +1 -0
  594. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-abffaa46b4637bee.js +1 -0
  595. package/app/.next-cli-build/static/chunks/app/api/health/route-abffaa46b4637bee.js +1 -0
  596. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-abffaa46b4637bee.js +1 -0
  597. package/app/.next-cli-build/static/chunks/app/api/init/route-abffaa46b4637bee.js +1 -0
  598. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-abffaa46b4637bee.js +1 -0
  599. package/app/.next-cli-build/static/chunks/app/api/keys/route-abffaa46b4637bee.js +1 -0
  600. package/app/.next-cli-build/static/chunks/app/api/locale/route-abffaa46b4637bee.js +1 -0
  601. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-abffaa46b4637bee.js +1 -0
  602. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-abffaa46b4637bee.js +1 -0
  603. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-abffaa46b4637bee.js +1 -0
  604. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-abffaa46b4637bee.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-abffaa46b4637bee.js +1 -0
  606. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-abffaa46b4637bee.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-abffaa46b4637bee.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-abffaa46b4637bee.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-abffaa46b4637bee.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-abffaa46b4637bee.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-abffaa46b4637bee.js +1 -0
  612. package/app/.next-cli-build/static/chunks/app/api/models/route-abffaa46b4637bee.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/api/models/test/route-abffaa46b4637bee.js +1 -0
  614. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-abffaa46b4637bee.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-abffaa46b4637bee.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-abffaa46b4637bee.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-abffaa46b4637bee.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-abffaa46b4637bee.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-abffaa46b4637bee.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-abffaa46b4637bee.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-abffaa46b4637bee.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-abffaa46b4637bee.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-abffaa46b4637bee.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-abffaa46b4637bee.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-abffaa46b4637bee.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-abffaa46b4637bee.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-abffaa46b4637bee.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-abffaa46b4637bee.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-abffaa46b4637bee.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-abffaa46b4637bee.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/pricing/route-abffaa46b4637bee.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-abffaa46b4637bee.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-abffaa46b4637bee.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-abffaa46b4637bee.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-abffaa46b4637bee.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-abffaa46b4637bee.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-abffaa46b4637bee.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-abffaa46b4637bee.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-abffaa46b4637bee.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-abffaa46b4637bee.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-abffaa46b4637bee.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-abffaa46b4637bee.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-abffaa46b4637bee.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-abffaa46b4637bee.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-abffaa46b4637bee.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-abffaa46b4637bee.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-abffaa46b4637bee.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-abffaa46b4637bee.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-abffaa46b4637bee.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-abffaa46b4637bee.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/providers/route-abffaa46b4637bee.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-abffaa46b4637bee.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-abffaa46b4637bee.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-abffaa46b4637bee.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-abffaa46b4637bee.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-abffaa46b4637bee.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-abffaa46b4637bee.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-abffaa46b4637bee.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-abffaa46b4637bee.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-abffaa46b4637bee.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-abffaa46b4637bee.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-abffaa46b4637bee.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-abffaa46b4637bee.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-abffaa46b4637bee.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-abffaa46b4637bee.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/settings/route-abffaa46b4637bee.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-abffaa46b4637bee.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-abffaa46b4637bee.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-abffaa46b4637bee.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/tags/route-abffaa46b4637bee.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-abffaa46b4637bee.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-abffaa46b4637bee.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-abffaa46b4637bee.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-abffaa46b4637bee.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-abffaa46b4637bee.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-abffaa46b4637bee.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-abffaa46b4637bee.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-abffaa46b4637bee.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-abffaa46b4637bee.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-abffaa46b4637bee.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-abffaa46b4637bee.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-abffaa46b4637bee.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-abffaa46b4637bee.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-abffaa46b4637bee.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-abffaa46b4637bee.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-abffaa46b4637bee.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-abffaa46b4637bee.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-abffaa46b4637bee.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-abffaa46b4637bee.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-abffaa46b4637bee.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-abffaa46b4637bee.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-abffaa46b4637bee.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-abffaa46b4637bee.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-abffaa46b4637bee.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-abffaa46b4637bee.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-abffaa46b4637bee.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-abffaa46b4637bee.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-abffaa46b4637bee.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-abffaa46b4637bee.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-abffaa46b4637bee.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-abffaa46b4637bee.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-abffaa46b4637bee.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-abffaa46b4637bee.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-abffaa46b4637bee.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-abffaa46b4637bee.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-abffaa46b4637bee.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-abffaa46b4637bee.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-abffaa46b4637bee.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-abffaa46b4637bee.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-abffaa46b4637bee.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/v1/route-abffaa46b4637bee.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-abffaa46b4637bee.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-abffaa46b4637bee.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-abffaa46b4637bee.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-abffaa46b4637bee.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/version/route-abffaa46b4637bee.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-abffaa46b4637bee.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/version/update/route-abffaa46b4637bee.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/{layout-402f477579b8a063.js → layout-16b611f4f5717ccd.js} +1 -1
  720. package/app/.next-cli-build/static/chunks/app/login/{page-f9cc5c6db5a0cf57.js → page-0831b035aa4c0f17.js} +1 -1
  721. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-abffaa46b4637bee.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/page-abffaa46b4637bee.js +1 -0
  723. package/app/.next-cli-build/static/chunks/{main-52cce31a84751ecc.js → main-28015457a328b97c.js} +1 -1
  724. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-abffaa46b4637bee.js +1 -0
  725. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-abffaa46b4637bee.js +1 -0
  726. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-abffaa46b4637bee.js +1 -0
  727. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-abffaa46b4637bee.js +1 -0
  728. package/app/.next-cli-build/static/css/d7d86034708483b4.css +1 -0
  729. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite +0 -0
  730. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
  731. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
  732. package/app/node_modules/@next/env/package.json +1 -1
  733. package/app/node_modules/nanoid/non-secure/index.cjs +2 -2
  734. package/app/node_modules/nanoid/package.json +1 -1
  735. package/app/node_modules/next/dist/build/load-jsconfig.js +40 -20
  736. package/app/node_modules/next/dist/build/next-config-ts/transpile-config.js +3 -114
  737. package/app/node_modules/next/dist/build/swc/index.js +1 -1
  738. package/app/node_modules/next/dist/build/webpack-config.js +3 -3
  739. package/app/node_modules/next/dist/cli/next-test.js +2 -1
  740. package/app/node_modules/next/dist/compiled/http-proxy/index.js +5 -5
  741. package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +11 -10
  742. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +11 -10
  743. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +11 -10
  744. package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +11 -10
  745. package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +2 -2
  746. package/app/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +9 -9
  747. package/app/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +9 -9
  748. package/app/node_modules/next/dist/lib/install-dependencies.js +1 -1
  749. package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  750. package/app/node_modules/next/dist/lib/typescript/loadTsConfig.js +181 -0
  751. package/app/node_modules/next/dist/lib/typescript/missingDependencyError.js +1 -1
  752. package/app/node_modules/next/dist/lib/typescript/runTypeCheckCli.js +53 -0
  753. package/app/node_modules/next/dist/lib/typescript/runTypeScriptCli.js +256 -0
  754. package/app/node_modules/next/dist/lib/verify-typescript-setup.js +97 -56
  755. package/app/node_modules/next/dist/server/app-render/action-handler.js +129 -34
  756. package/app/node_modules/next/dist/server/app-render/manifests-singleton.js +52 -4
  757. package/app/node_modules/next/dist/server/config-schema.js +1 -1
  758. package/app/node_modules/next/dist/server/config-shared.js +1 -2
  759. package/app/node_modules/next/dist/server/config.js +1 -1
  760. package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  761. package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  762. package/app/node_modules/next/dist/server/image-optimizer.js +8 -27
  763. package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  764. package/app/node_modules/next/dist/server/lib/incremental-cache/index.js +90 -53
  765. package/app/node_modules/next/dist/server/lib/patch-fetch.js +15 -2
  766. package/app/node_modules/next/dist/server/lib/router-utils/proxy-request.js +4 -0
  767. package/app/node_modules/next/dist/server/lib/router-utils/setup-dev-bundler.js +2 -1
  768. package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
  769. package/app/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  770. package/app/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +2 -1
  771. package/app/node_modules/next/dist/shared/lib/server-reference-info.js +12 -0
  772. package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  773. package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  774. package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
  775. package/app/node_modules/next/package.json +10 -10
  776. package/app/package.json +9 -3
  777. package/app/public/providers/agnes-api.svg +6 -0
  778. package/app/public/providers/agnes-web.svg +6 -0
  779. package/app/public/providers/stepfun.svg +54 -0
  780. package/app/public/providers/wp-studio.svg +11 -0
  781. package/app/server.js +1 -1
  782. package/app/src/lib/db/adapters/sqljsAdapter.js +4 -4
  783. package/package.json +1 -1
  784. package/app/.next-cli-build/server/chunks/1914.js +0 -1
  785. package/app/.next-cli-build/server/chunks/7674.js +0 -9
  786. package/app/.next-cli-build/server/chunks/9846.js +0 -9
  787. package/app/.next-cli-build/static/chunks/1321-6a34c5faf11383f6.js +0 -1
  788. package/app/.next-cli-build/static/chunks/3794-c66b3d8325973459.js +0 -32
  789. package/app/.next-cli-build/static/chunks/5497-ffa6b6463e401ac2.js +0 -7
  790. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-4efb04e1eca7f27c.js +0 -1
  791. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-f6cb00bfa1358617.js +0 -1
  792. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-cb5d0aca5faba3b4.js +0 -1
  793. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-406bf4ebc93eda61.js +0 -1
  794. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-325de46b5cec5533.js +0 -1
  795. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-3538bc80a52010ff.js +0 -1
  796. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-8a44865bda8d1138.js +0 -1
  797. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-cd819afe3da4581e.js +0 -10
  798. package/app/.next-cli-build/static/chunks/app/_global-error/page-200d63272da34918.js +0 -1
  799. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-200d63272da34918.js +0 -1
  800. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-200d63272da34918.js +0 -1
  801. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-200d63272da34918.js +0 -1
  802. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-200d63272da34918.js +0 -1
  803. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-200d63272da34918.js +0 -1
  804. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-200d63272da34918.js +0 -1
  805. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-200d63272da34918.js +0 -1
  806. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-200d63272da34918.js +0 -1
  807. package/app/.next-cli-build/static/chunks/app/api/cache/route-200d63272da34918.js +0 -1
  808. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-200d63272da34918.js +0 -1
  809. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-200d63272da34918.js +0 -1
  810. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-200d63272da34918.js +0 -1
  811. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-200d63272da34918.js +0 -1
  812. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-200d63272da34918.js +0 -1
  813. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-200d63272da34918.js +0 -1
  814. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-200d63272da34918.js +0 -1
  815. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-200d63272da34918.js +0 -1
  816. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-200d63272da34918.js +0 -1
  817. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-200d63272da34918.js +0 -1
  818. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-200d63272da34918.js +0 -1
  819. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-200d63272da34918.js +0 -1
  820. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-200d63272da34918.js +0 -1
  821. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-200d63272da34918.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-200d63272da34918.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-200d63272da34918.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-200d63272da34918.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-200d63272da34918.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/combos/route-200d63272da34918.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-200d63272da34918.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-200d63272da34918.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-200d63272da34918.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-200d63272da34918.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-200d63272da34918.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-200d63272da34918.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/health/route-200d63272da34918.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-200d63272da34918.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/init/route-200d63272da34918.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-200d63272da34918.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/keys/route-200d63272da34918.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/locale/route-200d63272da34918.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-200d63272da34918.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-200d63272da34918.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-200d63272da34918.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-200d63272da34918.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-200d63272da34918.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-200d63272da34918.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-200d63272da34918.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-200d63272da34918.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-200d63272da34918.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-200d63272da34918.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-200d63272da34918.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/models/route-200d63272da34918.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/models/test/route-200d63272da34918.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-200d63272da34918.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-200d63272da34918.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-200d63272da34918.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-200d63272da34918.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-200d63272da34918.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-200d63272da34918.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-200d63272da34918.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-200d63272da34918.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-200d63272da34918.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-200d63272da34918.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-200d63272da34918.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-200d63272da34918.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-200d63272da34918.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-200d63272da34918.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-200d63272da34918.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/pricing/route-200d63272da34918.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-200d63272da34918.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-200d63272da34918.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-200d63272da34918.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-200d63272da34918.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-200d63272da34918.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-200d63272da34918.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-200d63272da34918.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-200d63272da34918.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-200d63272da34918.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-200d63272da34918.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-200d63272da34918.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-200d63272da34918.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-200d63272da34918.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-200d63272da34918.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-200d63272da34918.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-200d63272da34918.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-200d63272da34918.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-200d63272da34918.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/providers/route-200d63272da34918.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-200d63272da34918.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-200d63272da34918.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-200d63272da34918.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-200d63272da34918.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-200d63272da34918.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-200d63272da34918.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-200d63272da34918.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-200d63272da34918.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-200d63272da34918.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-200d63272da34918.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-200d63272da34918.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-200d63272da34918.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-200d63272da34918.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-200d63272da34918.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/settings/route-200d63272da34918.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-200d63272da34918.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-200d63272da34918.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-200d63272da34918.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/tags/route-200d63272da34918.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-200d63272da34918.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-200d63272da34918.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-200d63272da34918.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-200d63272da34918.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-200d63272da34918.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-200d63272da34918.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-200d63272da34918.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-200d63272da34918.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-200d63272da34918.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-200d63272da34918.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-200d63272da34918.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-200d63272da34918.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-200d63272da34918.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-200d63272da34918.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-200d63272da34918.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-200d63272da34918.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-200d63272da34918.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-200d63272da34918.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-200d63272da34918.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-200d63272da34918.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-200d63272da34918.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-200d63272da34918.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-200d63272da34918.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-200d63272da34918.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-200d63272da34918.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-200d63272da34918.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-200d63272da34918.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-200d63272da34918.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-200d63272da34918.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-200d63272da34918.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-200d63272da34918.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-200d63272da34918.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-200d63272da34918.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-200d63272da34918.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-200d63272da34918.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-200d63272da34918.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-200d63272da34918.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-200d63272da34918.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-200d63272da34918.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-200d63272da34918.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/v1/route-200d63272da34918.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-200d63272da34918.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-200d63272da34918.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-200d63272da34918.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-200d63272da34918.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/version/route-200d63272da34918.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-200d63272da34918.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/version/update/route-200d63272da34918.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-200d63272da34918.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/page-200d63272da34918.js +0 -1
  956. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-200d63272da34918.js +0 -1
  957. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-200d63272da34918.js +0 -1
  958. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-200d63272da34918.js +0 -1
  959. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-200d63272da34918.js +0 -1
  960. package/app/.next-cli-build/static/css/78539cadb589145c.css +0 -1
  961. package/app/.next-cli-build/static/jvjk_lCzF7LBW1SV_GCaU/_buildManifest.js +0 -1
  962. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.4-to-0.7.5-0.7.5-20260722-212802/data.sqlite +0 -0
  963. /package/app/.next-cli-build/static/{jvjk_lCzF7LBW1SV_GCaU → LTz0FqDsVsVSFbsHZibmc}/_ssgManifest.js +0 -0
  964. /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.7.3-to-0.7.4-0.7.4-20260722-105125 → upgrade-0.7.7-to-0.7.8-0.7.8-20260727-004850}/data.sqlite +0 -0
@@ -1,4 +1,4 @@
1
1
  (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{12654:(e,t,a)=>{Promise.resolve().then(a.bind(a,22662))},22662:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>p});var s=a(95155),l=a(73321),r=a(12115);a(98500);var i=a(35497),n=a(57250),o=a(88105),d=a(8247);let c=/^[a-zA-Z0-9_.\-]+$/,m={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},x={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},h={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function u(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function p(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[a,p]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,v]=(0,r.useState)(""),[y,k]=(0,r.useState)([]),[N,S]=(0,r.useState)(!1),[$,U]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[P,L]=(0,r.useState)(""),[z,E]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,a,s,l,r,i]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(i.ok&&I((await i.json()).aliases||{}),l.ok){let e=await l.json();E((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){p(null),f(!1);return}let n=await t.json();p(n),g(n.name),k(n.models||[]);let o=a.ok?await a.json():{};S(o.comboStrategies?.[n.name]?.fallbackStrategy==="round-robin");let d=s.ok?await s.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(n.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?c.test(e)?(v(""),!0):(v("Only letters, numbers, -, _ and ."),!1):(v("Name is required"),!1),H=async t=>{let a=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!a.ok||(alert((await a.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===a.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||y.includes(t))return;let a=[...y,t];k(a),await H({models:a})},B=async e=>{let t=e?.value||e;if(!t||!y.includes(t))return;let a=y.filter(e=>e!==t);k(a),await H({models:a})},Y=async e=>{let t=y.filter((t,a)=>a!==e);k(t),await H({models:t})},G=async(e,t)=>{let a=[...y],s=e+t;s<0||s>=a.length||([a[e],a[s]]=[a[s],a[e]],k(a),await H({models:a}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).comboStrategies||{}};e?s[a.name]={fallbackStrategy:"round-robin"}:delete s[a.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})})},Q=async()=>{!confirm(`Delete combo "${a.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(u(a.kind))},V=async()=>{if(T(!0),A(null),L(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=x[a.kind],s=h[a.kind](a.name),l={"Content-Type":"application/json"};z&&(l.Authorization=`Bearer ${z}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(s)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));L(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),d=o?.data?.[0],c=d?.b64_json?`data:image/png;base64,${d.b64_json}`:d?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let a={};for(let[s,l]of Object.entries(t))a[s]="b64_json"===s&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return a}(o),null,2),imageUrl:c,latencyMs:i})}catch(e){L(e.message||"Network error")}T(!1)};if(b)return(0,s.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!a)return(0,l.notFound)();let X=m[a.kind]||o.rj.find(e=>e.id===a.kind)?.label||"Combo",ee=x[a.kind],et=a.kind&&h[a.kind]?h[a.kind](a.name):null,ea=ee?`curl -X POST http://localhost:20128${ee} \\
2
2
  -H "Content-Type: application/json" \\
3
3
  -H "Authorization: Bearer ${z||"YOUR_KEY"}" \\
4
- -d '${JSON.stringify(et)}'`:"";return u(a.kind),(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(i.zY,{title:a.name,description:`${X} Combo`,icon:"layers",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${a.kind}`},{label:`${X} Combos`,href:`/dashboard/media-providers/${a.kind}`},{label:a.name}],actions:(0,s.jsx)(i.$n,{variant:"outline",size:"sm",icon:"delete",onClick:Q,children:"Delete"})}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,s.jsx)(i.lM,{checked:N,onChange:K})]})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,s.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>U(!0),children:"Add Provider"})]}),0===y.length?(0,s.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:y.map((e,t)=>{let{providerId:a,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=o.Q2[a];return(0,s.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,s.jsx)(n.A,{src:(0,d.k)(a),alt:r?.name||a,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||a.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||a}),l&&(0,s.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,s.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,s.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:()=>G(t,1),disabled:t===y.length-1,className:`p-1 rounded ${t===y.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,s.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),a.kind&&ee&&(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,s.jsx)(i.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===y.length,children:_?"Running...":"Run"})]}),(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:ea}),P&&(0,s.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:P}),R&&(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,s.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,s.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,s.jsx)(i.rq,{isOpen:$,onClose:()=>U(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:a.kind,addedModelValues:y,closeOnSelect:!1})]})}}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=12654)),_N_E=e.O()}]);
4
+ -d '${JSON.stringify(et)}'`:"";return u(a.kind),(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(i.zY,{title:a.name,description:`${X} Combo`,icon:"layers",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${a.kind}`},{label:`${X} Combos`,href:`/dashboard/media-providers/${a.kind}`},{label:a.name}],actions:(0,s.jsx)(i.$n,{variant:"outline",size:"sm",icon:"delete",onClick:Q,children:"Delete"})}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,s.jsx)(i.lM,{checked:N,onChange:K})]})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,s.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>U(!0),children:"Add Provider"})]}),0===y.length?(0,s.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:y.map((e,t)=>{let{providerId:a,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=o.Q2[a];return(0,s.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,s.jsx)(n.A,{src:(0,d.k)(a),alt:r?.name||a,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||a.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||a}),l&&(0,s.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,s.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,s.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:()=>G(t,1),disabled:t===y.length-1,className:`p-1 rounded ${t===y.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,s.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),a.kind&&ee&&(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,s.jsx)(i.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===y.length,children:_?"Running...":"Run"})]}),(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:ea}),P&&(0,s.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:P}),R&&(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,s.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,s.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,s.jsx)(i.rq,{isOpen:$,onClose:()=>U(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:a.kind,addedModelValues:y,closeOnSelect:!1})]})}}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=12654)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>u});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),c=t(73321),o=t(35497),n=t(57250),d=t(88105),m=t(8247);function x(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function h({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,c=t.filter(s=>s.provider===e.id),p=c.filter(e=>{let s=x(e);return"active"===s||"success"===s}).length,b=c.filter(e=>{let s=x(e);return"error"===s||"expired"===s||"unavailable"===s}).length,u=c.length,f=u>0&&c.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(o.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${f?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:(0,m.k)(e.id),alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(o.Ex,{variant:"success",size:"sm",children:"Ready"}):f?(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===u?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[p>0&&(0,r.jsxs)(o.Ex,{variant:"success",size:"sm",dot:!0,children:[p," Connected"]}),b>0&&(0,r.jsxs)(o.Ex,{variant:"error",size:"sm",dot:!0,children:[b," Error"]}),0===p&&0===b&&(0,r.jsxs)(o.Ex,{variant:"default",size:"sm",children:[u," Added"]})]})})]})]})})})}function p({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(o.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:(0,m.k)(t),alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function b({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:c}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:c,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(p,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(h,{provider:e,kind:t,connections:i},e.id))})]})}function u(){let e=(0,c.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),n=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{n()},[]);let m=(0,d.o5)("webSearch"),x=(0,d.o5)("webFetch"),h=a.filter(e=>"webSearch"===e.kind),p=a.filter(e=>"webFetch"===e.kind),u=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let c=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(c.ok){let s=await c.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await c.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(o.zY,{title:"Web Fetch & Search",description:"Web search and web fetch providers",icon:"travel_explore"}),(0,r.jsx)(b,{title:"Web Search",icon:"search",kind:"webSearch",providers:m,connections:s,combos:h,onCreateCombo:()=>u("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(b,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:x,connections:s,combos:p,onCreateCombo:()=>u("webFetch")})]})}},84147:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=84147)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>u});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),c=t(73321),o=t(35497),n=t(57250),d=t(88105),m=t(8247);function x(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function h({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,c=t.filter(s=>s.provider===e.id),p=c.filter(e=>{let s=x(e);return"active"===s||"success"===s}).length,b=c.filter(e=>{let s=x(e);return"error"===s||"expired"===s||"unavailable"===s}).length,u=c.length,f=u>0&&c.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(o.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${f?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:(0,m.k)(e.id),alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(o.Ex,{variant:"success",size:"sm",children:"Ready"}):f?(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===u?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[p>0&&(0,r.jsxs)(o.Ex,{variant:"success",size:"sm",dot:!0,children:[p," Connected"]}),b>0&&(0,r.jsxs)(o.Ex,{variant:"error",size:"sm",dot:!0,children:[b," Error"]}),0===p&&0===b&&(0,r.jsxs)(o.Ex,{variant:"default",size:"sm",children:[u," Added"]})]})})]})]})})})}function p({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(o.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:(0,m.k)(t),alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function b({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:c}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:c,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(p,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(h,{provider:e,kind:t,connections:i},e.id))})]})}function u(){let e=(0,c.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),n=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{n()},[]);let m=(0,d.o5)("webSearch"),x=(0,d.o5)("webFetch"),h=a.filter(e=>"webSearch"===e.kind),p=a.filter(e=>"webFetch"===e.kind),u=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let c=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(c.ok){let s=await c.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await c.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(o.zY,{title:"Web Fetch & Search",description:"Web search and web fetch providers",icon:"travel_explore"}),(0,r.jsx)(b,{title:"Web Search",icon:"search",kind:"webSearch",providers:m,connections:s,combos:h,onCreateCombo:()=>u("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(b,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:x,connections:s,combos:p,onCreateCombo:()=>u("webFetch")})]})}},84147:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=84147)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{19924:(e,t,s)=>{Promise.resolve().then(s.bind(s,23879))},23879:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(95155),i=s(12115),n=s(3534),r=s(28777),o=s(88105),l=s(8773),c=s(54960);function d(){let[e,t]=(0,i.useState)([]),[s,d]=(0,i.useState)([]),[u,h]=(0,i.useState)({}),[p,f]=(0,i.useState)(!1),[g,w]=(0,i.useState)(null),[x,y]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{v(),m(),S(),b()},[]);let v=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let s=await e.json();t(s.connections||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let t=await e.json();d(t.keys||[])}}catch{}},S=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();h(t.aliases||{})}}catch{}},b=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let t=await e.json();f(t.cloudEnabled||!1)}}catch{}},j=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsx)(c.default,{title:"MITM Proxy",description:"Intercept selected IDE traffic through the gateway",icon:"security"}),(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-panel border border-warning/30 bg-warning/10 px-3 py-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mt-0.5 shrink-0 text-[16px] text-warning",children:"warning"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-warning",children:"MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(l.tA,{apiKeys:s,cloudEnabled:p,onStatusChange:y}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,t])=>(0,a.jsx)(l.kn,{tool:t,isExpanded:g===e,onToggle:()=>w(g===e?null:e),serverRunning:x.running,dnsActive:x.dnsStatus?.[e]||!1,hasCachedPassword:x.hasCachedPassword||!1,needsSudoPassword:!1!==x.needsSudoPassword,isWin:!0===x.isWin,apiKeys:s,activeProviders:j(),hasActiveProviders:j().some(e=>(0,r.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:u,cloudEnabled:p,onDnsChange:e=>y(t=>({...t,dnsStatus:e.dnsStatus??t.dnsStatus}))},e))})]})}}},e=>{e.O(0,[27,5772,8105,1321,705,5497,682,8441,3794,7358],()=>e(e.s=19924)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3645],{54645:(e,t,s)=>{"use strict";s.d(t,{default:()=>F});var a=s(95155),r=s(12115),l=s(35497),n=s(14051),i=s.n(n);let c=e=>{let t=Number(e||0);return t>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()},o=[{key:"rtk",label:"RTK",icon:"compress",color:"text-primary"},{key:"headroom",label:"Headroom",icon:"air",color:"text-info"},{key:"pxpipe",label:"Pxpipe",icon:"image_search",color:"text-secondary"},{key:"cache",label:"Cache",icon:"cached",color:"text-success"},{key:"caveman",label:"Caveman",icon:"short_text",color:"text-warning"},{key:"ponytail",label:"Ponytail",icon:"notes",color:"text-accent"}];function d({breakdown:e}){let t=o.map(t=>({...t,value:e?.[t.key]||0})).filter(e=>e.value>0);return 0===t.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No per-mechanism data yet."}):(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-1",children:t.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[11px] font-medium",title:`${e.label}: ${e.value.toLocaleString()} tokens saved`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[12px] ${e.color}`,children:e.icon}),(0,a.jsx)("span",{className:"text-text-muted",children:e.label}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:c(e.value)})]},e.key))})}let x=[{key:"tokensSaved",icon:"savings",color:"success",label:"Tokens Saved",sub:"All token savers",expandable:!0},{key:"requestsRouted",icon:"route",color:"primary",label:"Requests Routed",sub:"Lifetime"},{key:"cacheTokens",icon:"cached",color:"info",label:"Cache Tokens",sub:"From cache reads"}];function m({data:e}){let[t,s]=(0,r.useState)(!1);if(!e)return null;let l={tokensSaved:e.tokensSavedLifetime,requestsRouted:e.totalRequestsLifetime,cacheTokens:e.totalCachedTokens};return(0,a.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:x.map(r=>{let n=r.expandable&&t;return(0,a.jsxs)("div",{className:`flex flex-col gap-2 rounded-panel border bg-panel p-5 shadow-[var(--shadow-soft)] ${r.expandable?"cursor-pointer transition-colors hover:border-primary/30":"border-border-subtle"} ${n?"border-primary/30":"border-border-subtle"}`,onClick:r.expandable?()=>s(e=>!e):void 0,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:`flex size-10 items-center justify-center rounded-brand ring-1 ${{success:"bg-success/10 text-success ring-success/20",primary:"bg-primary/10 text-primary ring-primary/20",info:"bg-info/10 text-info ring-info/20"}[r.color]}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:r.icon})}),(0,a.jsx)("div",{className:"min-w-0 flex-1",children:(0,a.jsx)("span",{className:"text-2xl font-bold text-text-main",children:c(l[r.key])})}),r.expandable&&(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${n?"rotate-180":""}`,children:"expand_more"})]}),(0,a.jsx)("div",{className:"text-sm font-medium text-text-main",children:r.label}),(0,a.jsx)("div",{className:"text-xs text-text-muted",children:r.sub}),n&&"tokensSaved"===r.key&&(0,a.jsxs)("div",{className:"mt-2 border-t border-border-subtle pt-2",children:[(0,a.jsx)("p",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Breakdown by mechanism"}),(0,a.jsx)(d,{breakdown:e.tokensSavedByMechanism}),e.semanticCacheHits>0&&(0,a.jsxs)("p",{className:"mt-2 text-[11px] text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] align-middle text-success",children:"bolt"})," ",e.semanticCacheHits.toLocaleString()," cache hits served from Semantic Cache"]})]})]},r.key)})})}m.propTypes={data:i().object};var p=s(84588);function u(e){return 0===e?"$0.00":e>=1e3?`$${(e/1e3).toFixed(1)}K`:e>=1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}let h=[{key:"rtk",label:"RTK",icon:"compress",color:"#3B82F6"},{key:"headroom",label:"Headroom",icon:"expand_less",color:"#10B981"},{key:"pxpipe",label:"Pxpipe",icon:"image_search",color:"#8B5CF6"},{key:"cache",label:"Cache",icon:"cached",color:"#F59E0B"},{key:"caveman",label:"Caveman",icon:"short_text",color:"#EF4444"},{key:"ponytail",label:"Ponytail",icon:"code",color:"#EC4899"}];function b({data:e}){let[t,s]=(0,r.useState)(!1),l=e?.costSavedLifetime||0,n=e?.costSavedByMechanism||{},i=e?.tokensSavedLifetime||0,c=e?.totalCost||0;return(0,a.jsxs)(p.default,{padding:"md",className:"relative overflow-hidden",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-emerald-500/5 to-transparent"}),(0,a.jsxs)("div",{className:"relative flex items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"flex size-14 items-center justify-center rounded-2xl bg-emerald-500/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] text-emerald-500",children:"payments"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:"Total Dollar Savings"}),(0,a.jsx)("p",{className:"text-3xl font-bold text-emerald-500",children:u(l)}),(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:[i.toLocaleString()," tokens saved across all mechanisms"]})]})]}),(0,a.jsxs)("div",{className:"hidden flex-col items-end gap-1 sm:flex",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-surface-2 px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Without ER:"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-red-500 line-through opacity-70",children:u(c+l)})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-emerald-500/10 px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-emerald-600 dark:text-emerald-400",children:"With ER:"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-emerald-500",children:u(c)})]})]})]}),(0,a.jsxs)("button",{onClick:()=>s(e=>!e),className:"relative mt-3 flex w-full items-center justify-between rounded-lg bg-surface-2/50 px-3 py-2 text-left transition-colors hover:bg-surface-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Savings by mechanism"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted transition-transform",style:{transform:t?"rotate(180deg)":"none"},children:"expand_more"})]}),t&&(0,a.jsx)("div",{className:"relative mt-2 grid grid-cols-2 gap-2 sm:grid-cols-3",children:h.map(e=>{let t=n[e.key]||0,s=l>0?t/l*100:0;return(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border-subtle px-2.5 py-2",children:[(0,a.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-md",style:{backgroundColor:`${e.color}15`},children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:e.color},children:e.icon})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-xs font-medium text-text-primary",children:e.label}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[u(t)," ",(0,a.jsxs)("span",{className:"opacity-50",children:["(",s.toFixed(0),"%)"]})]})]})]},e.key)})})]})}var f=s(98500),y=s.n(f),g=s(57250),j=s(8247);function v(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}let N=[{value:"24h",label:"24h"},{value:"7d",label:"7d"},{value:"30d",label:"30d"}],k=[{key:"requests",label:"Requests",sortable:!0},{key:"totalTokens",label:"Tokens",sortable:!0},{key:"avgTtft",label:"TTFT",sortable:!0},{key:"p95Latency",label:"P95",sortable:!0},{key:"successRate",label:"Success",sortable:!0},{key:"cost",label:"Cost",sortable:!0}];function w(){let[e,t]=(0,r.useState)([]),[s,l]=(0,r.useState)(!0),[n,i]=(0,r.useState)("7d"),[c,o]=(0,r.useState)("requests"),[d,x]=(0,r.useState)("desc");(0,r.useEffect)(()=>{let e=!1;return l(!0),fetch(`/api/usage/leaderboard?period=${n}`).then(e=>e.json()).then(s=>{e||s.error||t(s.leaderboard||[])}).catch(()=>{}).finally(()=>{e||l(!1)}),()=>{e=!0}},[n]);let m=(0,r.useMemo)(()=>{let t=[...e];return t.sort((e,t)=>{let s=e[c]??-1,a=t[c]??-1;return"desc"===d?a-s:s-a}),t},[e,c,d]);return(0,a.jsx)(p.default,{title:"Provider Leaderboard",subtitle:"Performance ranking by requests, latency, and cost",icon:"leaderboard",padding:"none",action:(0,a.jsx)("div",{className:"flex items-center gap-1",children:N.map(e=>(0,a.jsx)("button",{onClick:()=>i(e.value),className:`rounded-md px-2 py-1 text-xs font-medium transition-colors ${n===e.value?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2"}`,children:e.label},e.value))}),children:s?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),(0,a.jsx)("span",{className:"text-sm",children:"Loading leaderboard..."})]}):0===m.length?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[40px] opacity-20",children:"leaderboard"}),(0,a.jsx)("span",{className:"text-sm",children:"No usage data for this period"})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[640px] text-left",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border bg-surface-2/50",children:[(0,a.jsx)("th",{className:"px-3 py-2 text-[10px] font-medium uppercase tracking-wide text-text-muted",children:"Provider"}),k.map(e=>(0,a.jsxs)("th",{onClick:()=>{var t;return e.sortable&&void(c===(t=e.key)?x(e=>"desc"===e?"asc":"desc"):(o(t),x("desc")))},className:`px-3 py-2 text-[10px] font-medium uppercase tracking-wide ${e.sortable?"cursor-pointer select-none hover:text-text-primary":""} ${c===e.key?"text-primary":"text-text-muted"}`,children:[e.label,c===e.key&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-0.5 inline text-[12px] align-middle",children:"desc"===d?"arrow_downward":"arrow_upward"})]},e.key))]})}),(0,a.jsx)("tbody",{children:m.map((e,t)=>{var s,r;let l=e.successRate>=95?"text-emerald-500":e.successRate>=80?"text-amber-500":"text-red-500";return(0,a.jsxs)("tr",{className:"border-b border-border-subtle transition-colors hover:bg-surface-2/30",children:[(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsxs)(y(),{href:`/dashboard/providers/${e.provider}`,className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-mono text-text-muted w-4",children:t+1}),(0,a.jsx)("div",{className:"flex size-6 shrink-0 items-center justify-center rounded",children:(0,a.jsx)(g.A,{src:(0,j.k)(e.provider),alt:e.provider,size:24,className:"object-contain rounded",fallbackText:e.provider?.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,a.jsx)("span",{className:"truncate text-xs font-medium text-text-primary",children:e.displayName})]})}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-primary",children:e.requests.toLocaleString()}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:(s=e.totalTokens)>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:String(s)}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:v(e.avgTtft)}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:v(e.p95Latency)}),(0,a.jsxs)("td",{className:`px-3 py-2.5 text-xs font-medium tabular-nums ${l}`,children:[e.successRate.toFixed(1),"%"]}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:null==(r=e.cost)||0===r?"$0.00":r<.01?`$${r.toFixed(4)}`:`$${r.toFixed(2)}`})]},e.provider)})})]})})})}let $=[{key:"rtkEnabled",name:"RTK Token Saver",icon:"compress"},{key:"headroomEnabled",name:"Headroom",icon:"cloud_compress"},{key:"pxpipeEnabled",name:"Pxpipe",icon:"image_search"},{key:"semanticCacheEnabled",name:"Semantic Cache",icon:"cached"},{key:"cavemanEnabled",name:"Caveman Mode",icon:"cottage"},{key:"ponytailEnabled",name:"Ponytail",icon:"cut"}];function S({settings:e}){return e?(0,a.jsx)("div",{className:"flex flex-wrap gap-3",children:$.map(t=>{let s=!!e[t.key];return(0,a.jsxs)("div",{className:`flex items-center gap-2 rounded-brand border px-3 py-2 transition-colors ${s?"border-success/30 bg-success/5":"border-border-subtle bg-surface-2"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${s?"text-success":"text-text-muted"}`,children:t.icon}),(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:t.name}),(0,a.jsx)(l.Ex,{variant:s?"success":"default",size:"sm",dot:!0,children:s?"Active":"Off"})]},t.key)})}):null}S.propTypes={settings:i().object};let C=e=>{let t=Number(e||0);return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()};function T({providers:e}){return e&&0!==e.length?(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:e.map(e=>{let t=e.color||"#6b7280",s=t.length>7?t:t+"15";return(0,a.jsxs)(y(),{href:`/dashboard/providers/${e.id}`,className:"group flex items-center gap-3 rounded-brand border border-border-subtle bg-panel px-3 py-2.5 shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:s},children:(0,a.jsx)(g.A,{src:(0,j.k)(e.id),alt:e.name,size:24,className:"object-contain rounded max-w-[24px] max-h-[24px]",fallbackText:(e.name||e.id).slice(0,2).toUpperCase(),fallbackColor:t})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:e.name}),(0,a.jsx)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:e.requests>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"font-medium",children:[C(e.requests)," requests"]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:[C(e.tokens)," tokens"]})]}):e.connected?(0,a.jsxs)("span",{className:"flex items-center gap-1 text-success",children:[(0,a.jsx)("span",{className:"size-1.5 rounded-full bg-success"}),"Connected"]}):(0,a.jsx)("span",{children:"No usage yet"})})]})]},e.id)})}):(0,a.jsx)(l.pp,{icon:"redeem",title:"No free providers used yet",description:"Connect a free provider (Kiro, OpenCode, etc.) and start routing requests to see usage here."})}function F(){let[e,t]=(0,r.useState)(null),[s,n]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{fetch("/api/usage/meta").then(e=>e.json()).then(e=>{e.error||t(e)}).catch(()=>{}).finally(()=>n(!1))},[]),s)?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,a.jsx)(l.Qv,{}),(0,a.jsx)(l.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,a.jsx)(m,{data:e}),(0,a.jsx)(b,{data:e}),(0,a.jsx)(l.Zp,{title:"Token Savers",subtitle:"Input compression and output optimization",icon:"savings",padding:"sm",children:(0,a.jsx)(S,{settings:e?.tokenSaverSettings})}),(0,a.jsx)(l.Zp,{title:"Free Providers Used",subtitle:"Providers with no API cost routing through your gateway",icon:"redeem",padding:"sm",children:(0,a.jsx)(T,{providers:e?.freeProviders||[]})}),(0,a.jsx)(w,{})]})}T.propTypes={providers:i().arrayOf(i().shape({id:i().string,name:i().string,icon:i().string,color:i().string,requests:i().number,tokens:i().number}))}},73411:(e,t,s)=>{Promise.resolve().then(s.bind(s,54645))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=73411)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3645],{54645:(e,t,s)=>{"use strict";s.d(t,{default:()=>F});var a=s(95155),r=s(12115),l=s(35497),n=s(14051),i=s.n(n);let c=e=>{let t=Number(e||0);return t>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()},o=[{key:"rtk",label:"RTK",icon:"compress",color:"text-primary"},{key:"headroom",label:"Headroom",icon:"air",color:"text-info"},{key:"pxpipe",label:"Pxpipe",icon:"image_search",color:"text-secondary"},{key:"cache",label:"Cache",icon:"cached",color:"text-success"},{key:"caveman",label:"Caveman",icon:"short_text",color:"text-warning"},{key:"ponytail",label:"Ponytail",icon:"notes",color:"text-accent"}];function d({breakdown:e}){let t=o.map(t=>({...t,value:e?.[t.key]||0})).filter(e=>e.value>0);return 0===t.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No per-mechanism data yet."}):(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-1",children:t.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[11px] font-medium",title:`${e.label}: ${e.value.toLocaleString()} tokens saved`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[12px] ${e.color}`,children:e.icon}),(0,a.jsx)("span",{className:"text-text-muted",children:e.label}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:c(e.value)})]},e.key))})}let x=[{key:"tokensSaved",icon:"savings",color:"success",label:"Tokens Saved",sub:"All token savers",expandable:!0},{key:"requestsRouted",icon:"route",color:"primary",label:"Requests Routed",sub:"Lifetime"},{key:"cacheTokens",icon:"cached",color:"info",label:"Cache Tokens",sub:"From cache reads"}];function m({data:e}){let[t,s]=(0,r.useState)(!1);if(!e)return null;let l={tokensSaved:e.tokensSavedLifetime,requestsRouted:e.totalRequestsLifetime,cacheTokens:e.totalCachedTokens};return(0,a.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:x.map(r=>{let n=r.expandable&&t;return(0,a.jsxs)("div",{className:`flex flex-col gap-2 rounded-panel border bg-panel p-5 shadow-[var(--shadow-soft)] ${r.expandable?"cursor-pointer transition-colors hover:border-primary/30":"border-border-subtle"} ${n?"border-primary/30":"border-border-subtle"}`,onClick:r.expandable?()=>s(e=>!e):void 0,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:`flex size-10 items-center justify-center rounded-brand ring-1 ${{success:"bg-success/10 text-success ring-success/20",primary:"bg-primary/10 text-primary ring-primary/20",info:"bg-info/10 text-info ring-info/20"}[r.color]}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:r.icon})}),(0,a.jsx)("div",{className:"min-w-0 flex-1",children:(0,a.jsx)("span",{className:"text-2xl font-bold text-text-main",children:c(l[r.key])})}),r.expandable&&(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${n?"rotate-180":""}`,children:"expand_more"})]}),(0,a.jsx)("div",{className:"text-sm font-medium text-text-main",children:r.label}),(0,a.jsx)("div",{className:"text-xs text-text-muted",children:r.sub}),n&&"tokensSaved"===r.key&&(0,a.jsxs)("div",{className:"mt-2 border-t border-border-subtle pt-2",children:[(0,a.jsx)("p",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Breakdown by mechanism"}),(0,a.jsx)(d,{breakdown:e.tokensSavedByMechanism}),e.semanticCacheHits>0&&(0,a.jsxs)("p",{className:"mt-2 text-[11px] text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] align-middle text-success",children:"bolt"})," ",e.semanticCacheHits.toLocaleString()," cache hits served from Semantic Cache"]})]})]},r.key)})})}m.propTypes={data:i().object};var p=s(84588);function u(e){return 0===e?"$0.00":e>=1e3?`$${(e/1e3).toFixed(1)}K`:e>=1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}let h=[{key:"rtk",label:"RTK",icon:"compress",color:"#3B82F6"},{key:"headroom",label:"Headroom",icon:"expand_less",color:"#10B981"},{key:"pxpipe",label:"Pxpipe",icon:"image_search",color:"#8B5CF6"},{key:"cache",label:"Cache",icon:"cached",color:"#F59E0B"},{key:"caveman",label:"Caveman",icon:"short_text",color:"#EF4444"},{key:"ponytail",label:"Ponytail",icon:"code",color:"#EC4899"}];function b({data:e}){let[t,s]=(0,r.useState)(!1),l=e?.costSavedLifetime||0,n=e?.costSavedByMechanism||{},i=e?.tokensSavedLifetime||0,c=e?.totalCost||0;return(0,a.jsxs)(p.default,{padding:"md",className:"relative overflow-hidden",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-emerald-500/5 to-transparent"}),(0,a.jsxs)("div",{className:"relative flex items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"flex size-14 items-center justify-center rounded-2xl bg-emerald-500/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] text-emerald-500",children:"payments"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:"Total Dollar Savings"}),(0,a.jsx)("p",{className:"text-3xl font-bold text-emerald-500",children:u(l)}),(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:[i.toLocaleString()," tokens saved across all mechanisms"]})]})]}),(0,a.jsxs)("div",{className:"hidden flex-col items-end gap-1 sm:flex",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-surface-2 px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Without ER:"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-red-500 line-through opacity-70",children:u(c+l)})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-emerald-500/10 px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-emerald-600 dark:text-emerald-400",children:"With ER:"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-emerald-500",children:u(c)})]})]})]}),(0,a.jsxs)("button",{onClick:()=>s(e=>!e),className:"relative mt-3 flex w-full items-center justify-between rounded-lg bg-surface-2/50 px-3 py-2 text-left transition-colors hover:bg-surface-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Savings by mechanism"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted transition-transform",style:{transform:t?"rotate(180deg)":"none"},children:"expand_more"})]}),t&&(0,a.jsx)("div",{className:"relative mt-2 grid grid-cols-2 gap-2 sm:grid-cols-3",children:h.map(e=>{let t=n[e.key]||0,s=l>0?t/l*100:0;return(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border-subtle px-2.5 py-2",children:[(0,a.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-md",style:{backgroundColor:`${e.color}15`},children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:e.color},children:e.icon})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-xs font-medium text-text-primary",children:e.label}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[u(t)," ",(0,a.jsxs)("span",{className:"opacity-50",children:["(",s.toFixed(0),"%)"]})]})]})]},e.key)})})]})}var f=s(98500),y=s.n(f),g=s(57250),j=s(8247);function v(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}let N=[{value:"24h",label:"24h"},{value:"7d",label:"7d"},{value:"30d",label:"30d"}],k=[{key:"requests",label:"Requests",sortable:!0},{key:"totalTokens",label:"Tokens",sortable:!0},{key:"avgTtft",label:"TTFT",sortable:!0},{key:"p95Latency",label:"P95",sortable:!0},{key:"successRate",label:"Success",sortable:!0},{key:"cost",label:"Cost",sortable:!0}];function w(){let[e,t]=(0,r.useState)([]),[s,l]=(0,r.useState)(!0),[n,i]=(0,r.useState)("7d"),[c,o]=(0,r.useState)("requests"),[d,x]=(0,r.useState)("desc");(0,r.useEffect)(()=>{let e=!1;return l(!0),fetch(`/api/usage/leaderboard?period=${n}`).then(e=>e.json()).then(s=>{e||s.error||t(s.leaderboard||[])}).catch(()=>{}).finally(()=>{e||l(!1)}),()=>{e=!0}},[n]);let m=(0,r.useMemo)(()=>{let t=[...e];return t.sort((e,t)=>{let s=e[c]??-1,a=t[c]??-1;return"desc"===d?a-s:s-a}),t},[e,c,d]);return(0,a.jsx)(p.default,{title:"Provider Leaderboard",subtitle:"Performance ranking by requests, latency, and cost",icon:"leaderboard",padding:"none",action:(0,a.jsx)("div",{className:"flex items-center gap-1",children:N.map(e=>(0,a.jsx)("button",{onClick:()=>i(e.value),className:`rounded-md px-2 py-1 text-xs font-medium transition-colors ${n===e.value?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2"}`,children:e.label},e.value))}),children:s?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),(0,a.jsx)("span",{className:"text-sm",children:"Loading leaderboard..."})]}):0===m.length?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[40px] opacity-20",children:"leaderboard"}),(0,a.jsx)("span",{className:"text-sm",children:"No usage data for this period"})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[640px] text-left",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border bg-surface-2/50",children:[(0,a.jsx)("th",{className:"px-3 py-2 text-[10px] font-medium uppercase tracking-wide text-text-muted",children:"Provider"}),k.map(e=>(0,a.jsxs)("th",{onClick:()=>{var t;return e.sortable&&void(c===(t=e.key)?x(e=>"desc"===e?"asc":"desc"):(o(t),x("desc")))},className:`px-3 py-2 text-[10px] font-medium uppercase tracking-wide ${e.sortable?"cursor-pointer select-none hover:text-text-primary":""} ${c===e.key?"text-primary":"text-text-muted"}`,children:[e.label,c===e.key&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-0.5 inline text-[12px] align-middle",children:"desc"===d?"arrow_downward":"arrow_upward"})]},e.key))]})}),(0,a.jsx)("tbody",{children:m.map((e,t)=>{var s,r;let l=e.successRate>=95?"text-emerald-500":e.successRate>=80?"text-amber-500":"text-red-500";return(0,a.jsxs)("tr",{className:"border-b border-border-subtle transition-colors hover:bg-surface-2/30",children:[(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsxs)(y(),{href:`/dashboard/providers/${e.provider}`,className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-mono text-text-muted w-4",children:t+1}),(0,a.jsx)("div",{className:"flex size-6 shrink-0 items-center justify-center rounded",children:(0,a.jsx)(g.A,{src:(0,j.k)(e.provider),alt:e.provider,size:24,className:"object-contain rounded",fallbackText:e.provider?.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,a.jsx)("span",{className:"truncate text-xs font-medium text-text-primary",children:e.displayName})]})}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-primary",children:e.requests.toLocaleString()}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:(s=e.totalTokens)>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:String(s)}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:v(e.avgTtft)}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:v(e.p95Latency)}),(0,a.jsxs)("td",{className:`px-3 py-2.5 text-xs font-medium tabular-nums ${l}`,children:[e.successRate.toFixed(1),"%"]}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:null==(r=e.cost)||0===r?"$0.00":r<.01?`$${r.toFixed(4)}`:`$${r.toFixed(2)}`})]},e.provider)})})]})})})}let $=[{key:"rtkEnabled",name:"RTK Token Saver",icon:"compress"},{key:"headroomEnabled",name:"Headroom",icon:"cloud_compress"},{key:"pxpipeEnabled",name:"Pxpipe",icon:"image_search"},{key:"semanticCacheEnabled",name:"Semantic Cache",icon:"cached"},{key:"cavemanEnabled",name:"Caveman Mode",icon:"cottage"},{key:"ponytailEnabled",name:"Ponytail",icon:"cut"}];function S({settings:e}){return e?(0,a.jsx)("div",{className:"flex flex-wrap gap-3",children:$.map(t=>{let s=!!e[t.key];return(0,a.jsxs)("div",{className:`flex items-center gap-2 rounded-brand border px-3 py-2 transition-colors ${s?"border-success/30 bg-success/5":"border-border-subtle bg-surface-2"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${s?"text-success":"text-text-muted"}`,children:t.icon}),(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:t.name}),(0,a.jsx)(l.Ex,{variant:s?"success":"default",size:"sm",dot:!0,children:s?"Active":"Off"})]},t.key)})}):null}S.propTypes={settings:i().object};let C=e=>{let t=Number(e||0);return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()};function T({providers:e}){return e&&0!==e.length?(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:e.map(e=>{let t=e.color||"#6b7280",s=t.length>7?t:t+"15";return(0,a.jsxs)(y(),{href:`/dashboard/providers/${e.id}`,className:"group flex items-center gap-3 rounded-brand border border-border-subtle bg-panel px-3 py-2.5 shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:s},children:(0,a.jsx)(g.A,{src:(0,j.k)(e.id),alt:e.name,size:24,className:"object-contain rounded max-w-[24px] max-h-[24px]",fallbackText:(e.name||e.id).slice(0,2).toUpperCase(),fallbackColor:t})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:e.name}),(0,a.jsx)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:e.requests>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"font-medium",children:[C(e.requests)," requests"]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:[C(e.tokens)," tokens"]})]}):e.connected?(0,a.jsxs)("span",{className:"flex items-center gap-1 text-success",children:[(0,a.jsx)("span",{className:"size-1.5 rounded-full bg-success"}),"Connected"]}):(0,a.jsx)("span",{children:"No usage yet"})})]})]},e.id)})}):(0,a.jsx)(l.pp,{icon:"redeem",title:"No free providers used yet",description:"Connect a free provider (Kiro, OpenCode, etc.) and start routing requests to see usage here."})}function F(){let[e,t]=(0,r.useState)(null),[s,n]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{fetch("/api/usage/meta").then(e=>e.json()).then(e=>{e.error||t(e)}).catch(()=>{}).finally(()=>n(!1))},[]),s)?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,a.jsx)(l.Qv,{}),(0,a.jsx)(l.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,a.jsx)(m,{data:e}),(0,a.jsx)(b,{data:e}),(0,a.jsx)(l.Zp,{title:"Token Savers",subtitle:"Input compression and output optimization",icon:"savings",padding:"sm",children:(0,a.jsx)(S,{settings:e?.tokenSaverSettings})}),(0,a.jsx)(l.Zp,{title:"Free Providers Used",subtitle:"Providers with no API cost routing through your gateway",icon:"redeem",padding:"sm",children:(0,a.jsx)(T,{providers:e?.freeProviders||[]})}),(0,a.jsx)(w,{})]})}T.propTypes={providers:i().arrayOf(i().shape({id:i().string,name:i().string,icon:i().string,color:i().string,requests:i().number,tokens:i().number}))}},73411:(e,t,s)=>{Promise.resolve().then(s.bind(s,54645))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=73411)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[27,8105,1321,705,5497,1696,8441,3794,7358],()=>_(_.s=81696)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1287],{51191:(e,t,s)=>{Promise.resolve().then(s.bind(s,65784))},65784:(e,t,s)=>{"use strict";s.d(t,{default:()=>O});var r=s(95155),a=s(12115),n=s(35497),l=s(14051),o=s.n(l),i=s(57250),c=s(8247),d=s(28777);function m({value:e,onChange:t,models:s,compact:l=!1,modelAliases:o={},activeProviders:u=[]}){let[x,p]=(0,a.useState)(!1),g="string"==typeof e?e:null==e?"":String(e),f=(()=>{if(!g)return null;let e=s?.find(e=>e.id===g);return e?.provider||g.split("/")[0]})(),h=(()=>{if(!g)return"Select a model...";if(o?.[g])return o[g];if(f){let e=(0,d.u0)(f,g);if(e&&e!==g)return e}return g})();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",onClick:()=>p(!0),className:l?"flex h-8 items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2 text-xs text-text-main hover:border-primary/40":"flex h-9 w-full items-center gap-2 rounded-lg border border-border-subtle bg-surface-2 px-3 text-sm text-text-main hover:border-primary/40",title:h,children:[f&&(0,r.jsx)(i.A,{src:(0,c.k)(f),alt:f,size:l?16:18,fallbackText:(f||"?").slice(0,2).toUpperCase()}),(0,r.jsx)("span",{className:`truncate ${e?"font-medium":"text-text-muted"}`,children:h}),(0,r.jsx)("span",{className:"material-symbols-outlined ml-auto text-[16px] text-text-muted",children:"expand_more"})]}),(0,r.jsx)(n.rq,{isOpen:x,onClose:()=>p(!1),onSelect:e=>{t("string"==typeof e?e:e?.value||e?.name||e?.id||""),p(!1)},selectedModel:g,activeProviders:u,title:"Select Model",modelAliases:o})]})}m.propTypes={value:o().string,onChange:o().func.isRequired,models:o().arrayOf(o().shape({id:o().string,provider:o().string})),compact:o().bool,modelAliases:o().object,activeProviders:o().array};var u=s(53593);let x=["low","medium","high","max"];function p({params:e,onChange:t,selectedModel:s=""}){let[n,l]=(0,a.useState)(!0),{getCaps:o}=(0,u.y)(),i=(s,r)=>t({...e,[s]:r}),c=o?.(s),d=!!c?.reasoning,m=!!(e.systemPrompt&&e.systemPrompt.trim());return(0,r.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-panel p-3",children:[(0,r.jsxs)("button",{onClick:()=>l(!n),className:"mb-3 flex w-full items-center justify-between",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"tune"}),"Parameters",m&&(0,r.jsx)("span",{className:"rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"system"})]}),(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${n?"rotate-90":""}`,children:"chevron_right"})]}),n&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"System Prompt"}),(0,r.jsx)("textarea",{value:e.systemPrompt||"",onChange:e=>i("systemPrompt",e.target.value),placeholder:"You are a helpful assistant...",rows:3,className:"custom-scrollbar w-full resize-none rounded-lg border border-border-subtle bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),d&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Thinking Level"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:x.map(t=>{let s=(e.reasoningEffort||"medium")===t;return"max"!==t||c?.thinkingMaxEffort?(0,r.jsx)("button",{onClick:()=>i("reasoningEffort",s?"":t),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${s?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:t},t):null})}),(0,r.jsx)("p",{className:"mt-1 text-[10px] text-text-muted",children:"Reasoning effort. Tap active level to clear."})]}),(0,r.jsx)(g,{label:"Temperature",value:e.temperature??.7,min:0,max:2,step:.05,onChange:e=>i("temperature",e)}),(0,r.jsx)(g,{label:"Top P",value:e.topP??1,min:0,max:1,step:.05,onChange:e=>i("topP",e)}),(0,r.jsx)(g,{label:"Frequency Penalty",value:e.frequencyPenalty??0,min:0,max:2,step:.1,onChange:e=>i("frequencyPenalty",e)}),(0,r.jsx)(g,{label:"Presence Penalty",value:e.presencePenalty??0,min:0,max:2,step:.1,onChange:e=>i("presencePenalty",e)}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Max Tokens"}),(0,r.jsx)("input",{type:"number",min:"1",max:"128000",value:e.maxTokens??4096,onChange:e=>i("maxTokens",parseInt(e.target.value)||4096),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main focus:border-primary focus:outline-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Top K"}),(0,r.jsx)("input",{type:"number",min:"1",max:"1000",placeholder:"unset",value:e.topK??"",onChange:e=>i("topK",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Seed"}),(0,r.jsx)("input",{type:"number",placeholder:"unset",value:e.seed??"",onChange:e=>i("seed",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]})]})]})}function g({label:e,value:t,min:s,max:a,step:n,onChange:l}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,r.jsx)("label",{className:"text-xs font-medium text-text-muted",children:e}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-main",children:Number(t).toFixed(2)})]}),(0,r.jsx)("input",{type:"range",min:s,max:a,step:n,value:t,onChange:e=>l(parseFloat(e.target.value)),className:"w-full accent-primary"})]})}p.propTypes={params:o().shape({systemPrompt:o().string,reasoningEffort:o().string,temperature:o().number,maxTokens:o().number,topP:o().number,frequencyPenalty:o().number,presencePenalty:o().number,topK:o().number,seed:o().number}).isRequired,onChange:o().func.isRequired,selectedModel:o().string},g.propTypes={label:o().string.isRequired,value:o().number.isRequired,min:o().number.isRequired,max:o().number.isRequired,step:o().number.isRequired,onChange:o().func.isRequired};var f=s(62630);function h(e){return null==e?"—":e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function b(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function y({stats:e,mode:t="single"}){var s;if("compare"===t)return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-primary",children:"compare_arrows"}),(0,r.jsxs)("span",{className:"font-medium text-text-main",children:[e.models||0," models compared"]})]}),(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"text-text-muted",children:["Total: ",b(e.compareLatencyMs)]})]});let a=null==(s=function(e){if(!e?.model||!e.inputTokens&&!e.outputTokens)return null;let t=e.model,s=t.indexOf("/"),r=s>0?t.slice(0,s):null,a=s>0?t.slice(s+1):t,n=(0,f.PS)(r,a);if(!n)return null;let l={prompt_tokens:e.inputTokens||0,completion_tokens:e.outputTokens||0,cached_tokens:e.cachedTokens||0,reasoning_tokens:e.reasoningTokens||0};return(0,f.uy)(l,n)}(e))||0===s?null:s<.01?`$${s.toFixed(4)}`:(0,f.BD)(s);return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-success",children:"arrow_upward"}),(0,r.jsx)("span",{className:"text-text-muted",children:"In:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:h(e.inputTokens)})]}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-info",children:"arrow_downward"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Out:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:h(e.outputTokens)})]}),(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"timer"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Latency:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:b(e.latencyMs)})]}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"payments"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Cost:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-warning",children:a})]})]}),e.model&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsx)("span",{className:"font-mono text-text-muted",children:e.model})]})]})}function j({sessions:e,currentSession:t,onNew:s,onLoad:l,onDelete:o}){let[i,c]=(0,a.useState)(""),[,d]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=setInterval(()=>d(e=>e+1),6e4);return()=>clearInterval(e)},[]);let m=(0,a.useMemo)(()=>{let t=i.trim().toLowerCase();return t?e.filter(e=>(e.title||"").toLowerCase().includes(t)):e},[e,i]);return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"History"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"add",onClick:s,title:"New chat"})]}),e.length>0&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"search"}),(0,r.jsx)("input",{value:i,onChange:e=>c(e.target.value),placeholder:"Search...",className:"w-full bg-transparent py-1 text-xs text-text-main placeholder:text-text-muted focus:outline-none"})]}),0===e.length?(0,r.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No saved conversations"}):0===m.length?(0,r.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No matches"}):(0,r.jsx)("div",{className:"custom-scrollbar flex max-h-[70vh] flex-col gap-1 overflow-y-auto",children:m.map(e=>(0,r.jsxs)("div",{className:`group flex items-center gap-2 rounded-lg px-2 py-1.5 transition-colors ${t===e.id?"bg-primary/10":"hover:bg-surface-2"}`,children:[(0,r.jsxs)("button",{onClick:()=>l(e),className:"flex min-w-0 flex-1 flex-col items-start",children:[(0,r.jsx)("span",{className:"w-full truncate text-xs font-medium text-text-main",children:e.title}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:function(e){if(!e)return"";let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);return s<24?`${s}h ago`:new Date(e).toLocaleDateString()}(e.updatedAt||e.createdAt)})]}),(0,r.jsx)("button",{onClick:()=>o(e.id),className:"rounded p-1 text-text-muted opacity-0 hover:text-danger group-hover:opacity-100",title:"Delete",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},e.id))})]})}y.propTypes={stats:o().object,mode:o().string},j.propTypes={sessions:o().array,currentSession:o().string,onNew:o().func.isRequired,onLoad:o().func.isRequired,onDelete:o().func.isRequired};var v=s(9233),N=s(91992);let w=void 0!==window.document,k=!1,C={FORBID_TAGS:["style","form","input","textarea","button","select","svg"],FORBID_ATTR:["style"],ALLOW_UNKNOWN_PROTOCOLS:!1};function S({content:e,role:t,error:s=!1}){let n=!s&&"assistant"===t,l=(0,a.useMemo)(()=>{if(!n||!e)return"";try{var t;let s=v.xI.parse(e);return t="string"==typeof s?s:String(s),"string"==typeof t&&t?w?(!k&&w&&(k=!0,N.A.addHook("afterSanitizeAttributes",e=>{for(let t of("A"===e.tagName&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer")),["src","href","xlink:href","action","formaction"])){let s=e.getAttribute(t);s&&/^\s*data:/i.test(s)&&!/^\s*data:image\/(?:png|jpe?g|gif|webp);/i.test(s)&&e.removeAttribute(t)}})),N.A.sanitize(t,C)):t:""}catch{return""}},[e,n]);return n&&l?(0,r.jsx)("div",{className:"prose-chat whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:l}}):(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e})}function T({messages:e,onSend:t,streaming:s}){let l=(0,a.useRef)(null);return((0,a.useEffect)(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[e]),0===e.length)?(0,r.jsx)("div",{className:"flex min-h-[300px] flex-1 items-center justify-center",children:(0,r.jsx)(n.pp,{icon:"science",title:"Start a conversation",description:"Pick a model above, type a message below, and press Enter. Switch to Compare mode to test multiple models side-by-side."})}):(0,r.jsx)("div",{ref:l,className:"custom-scrollbar flex max-h-[60vh] min-h-[200px] flex-1 flex-col gap-3 overflow-y-auto rounded-brand border border-border-subtle bg-panel p-4",children:e.map(e=>(0,r.jsx)(P,{msg:e},e.id))})}function P({msg:e}){let t="user"===e.role,s=e.error;return(0,r.jsx)("div",{className:`flex ${t?"justify-end":"justify-start"}`,children:(0,r.jsxs)("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${t?"bg-primary text-white":s?"bg-danger/10 text-danger border border-danger/20":"bg-surface-2 text-text-main"}`,children:[e.model&&!t&&(0,r.jsx)("div",{className:"mb-1 text-[10px] font-medium text-text-muted",children:e.model}),e.reasoning&&(0,r.jsxs)("details",{className:"mb-1.5 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap break-words text-xs italic text-text-muted",children:e.reasoning})]}),t&&e.attachments&&e.attachments.length>0&&(0,r.jsx)("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:e.attachments.map(e=>(0,r.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-20 w-20 rounded-lg border border-white/20 object-cover"},e.id))}),(0,r.jsxs)("div",{className:"break-words",children:[(0,r.jsx)(S,{content:e.content,role:e.role,error:s}),e.streaming&&(0,r.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]})]})})}async function _(e,{onChunk:t}={}){if(!e?.body?.getReader)return null;let s=e.body.getReader(),r=new TextDecoder,a="",n=null;for(;;){let{value:e,done:l}=await s.read();if(l)break;let o=(a+=r.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(a=o.pop()||"",o)){let s=e.trim();if(!s.startsWith("data:"))continue;let r=s.slice(5).trim();if(r&&"[DONE]"!==r)try{let e=function(e){let t=e?.choices?.[0],s=t?.delta||{};return{content:"string"==typeof s.content?s.content:null,reasoning:"string"==typeof s.reasoning_content?s.reasoning_content:null,toolCalls:Array.isArray(s.tool_calls)&&s.tool_calls.length>0?s.tool_calls:null,finishReason:t?.finish_reason??null,usage:e?.usage??null}}(JSON.parse(r));e.usage&&(n=e.usage),t?.(e)}catch{}}}return n}v.xI.setOptions({gfm:!0,breaks:!0,async:!1}),S.propTypes={content:o().string,role:o().string,error:o().bool},T.propTypes={messages:o().arrayOf(o().shape({id:o().string,role:o().string,content:o().string,reasoning:o().string,model:o().string,streaming:o().bool,error:o().bool,attachments:o().array})),onSend:o().func,streaming:o().bool};let A="extremerouter.playground.sessions";function R(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function E(e){try{localStorage.setItem(A,JSON.stringify(e))}catch{}}function O(){let[e,t]=(0,a.useState)(!0),[s,l]=(0,a.useState)([]),[o,i]=(0,a.useState)([]),[c,d]=(0,a.useState)({}),[u,x]=(0,a.useState)([]),[g,f]=(0,a.useState)(null),[h,b]=(0,a.useState)([]),[v,N]=(0,a.useState)({}),[w,k]=(0,a.useState)("single"),[C,P]=(0,a.useState)([""]),[O,D]=(0,a.useState)({systemPrompt:"",temperature:.7,maxTokens:4096,topP:1,frequencyPenalty:0,presencePenalty:0,topK:null,seed:null,reasoningEffort:""}),[q,z]=(0,a.useState)({}),M=(0,a.useRef)(null),I=(0,a.useRef)({}),{streamChat:L,abortAll:F,streaming:K}=function({onDelta:e,onComplete:t,onError:s}){let r=(0,a.useRef)({}),[n,l]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=r.current;return()=>{Object.values(e).forEach(e=>e?.abort?.())}},[]);let o=(0,a.useCallback)(async(a,{body:n,apiKey:o})=>{let i=new AbortController;r.current[a]=i,l(e=>e+1);try{let r={"Content-Type":"application/json",Accept:"text/event-stream"};o&&(r.Authorization=`Bearer ${o}`);let l=await fetch("/api/v1/chat/completions",{method:"POST",headers:r,body:JSON.stringify({...n,stream:!0}),signal:i.signal});if(!l.ok){let e=await l.json().catch(()=>({error:{message:`HTTP ${l.status}`}}));s(a,e.error?.message||`HTTP ${l.status}`,l.status);return}let c=await _(l,{onChunk:t=>e(a,t)});t(a,{usage:c,ok:!0})}catch(e){e?.name!=="AbortError"&&s(a,e?.message||"Network error",0)}finally{delete r.current[a],l(e=>Math.max(0,e-1))}},[e,t,s]);return{streamChat:o,abort:(0,a.useCallback)(e=>{r.current[e]?.abort?.()},[]),abortAll:(0,a.useCallback)(()=>{Object.values(r.current).forEach(e=>e?.abort?.())},[]),streaming:n>0}}({onDelta:(0,a.useCallback)((e,t)=>{let s=I.current[e];if(!s)return;let r=(e,t,s)=>s?(e||"")+s:e;"single"===s.mode?b(e=>e.map(e=>e.id!==s.assistantId?e:{...e,content:r(e.content,"content",t.content),reasoning:r(e.reasoning,"reasoning",t.reasoning)})):N(s=>{let a=s[e]||{content:"",reasoning:"",streaming:!0,error:null};return{...s,[e]:{...a,content:r(a.content,"content",t.content),reasoning:r(a.reasoning,"reasoning",t.reasoning)}}})},[]),onComplete:(0,a.useCallback)((e,{usage:t})=>{let s=I.current[e];s&&("single"===s.mode?(b(e=>e.map(e=>e.id===s.assistantId?{...e,streaming:!1}:e)),z({model:s.modelId,inputTokens:t?.prompt_tokens||0,outputTokens:t?.completion_tokens||0,latencyMs:Date.now()-s.startTime})):N(s=>({...s,[e]:{...s[e],streaming:!1,usage:t}})),delete I.current[e])},[]),onError:(0,a.useCallback)((e,t)=>{let s,r=I.current[e];if(!r)return;let a=((s=(s=(s=(s=(s="string"==typeof t?t:String(t??"")).replace(/https?:\/\/[^\s"'<>]+/g,"[url]")).replace(/(Bearer\s+)[A-Za-z0-9._\-]{16,}/gi,"$1[token]")).replace(/(signature=)[A-Za-z0-9%+/=]{16,}/gi,"$1[sig]")).replace(/\{[\s\S]{80,}\}/g,"[provider json]")).length>300&&(s=s.slice(0,297)+"..."),s.trim());"single"===r.mode?b(e=>e.map(e=>e.id===r.assistantId?{...e,content:`❌ Error: ${a}`,streaming:!1,error:!0}:e)):N(t=>({...t,[e]:{...t[e],content:`❌ ${a}`,streaming:!1,error:!0}})),delete I.current[e]},[])});(0,a.useEffect)(()=>{(async()=>{x(function(){try{let e=localStorage.getItem(A);return e?JSON.parse(e):[]}catch{return[]}}());try{let e=await fetch("/api/keys"),t=await e.json(),s=(t.keys||t||[]).find?.(e=>!1!==e.isActive);s?.key&&(M.current=s.key)}catch{}try{let[e,t,s]=await Promise.all([fetch("/api/providers"),fetch("/api/models/alias"),fetch("/api/v1/models")]),r=await e.json();i((r.connections||[]).filter(e=>!1!==e.isActive));let a=await t.json();d(a.aliases||{});let n=((await s.json()).data||[]).map(e=>({id:e.id,name:e.id,provider:e.owned_by||e.id.split("/")[0]}));l(n),n.length>0&&P([n[0].id])}catch{}t(!1)})()},[]);let B=(0,a.useCallback)(()=>{h.length>0&&g&&W(g,h),b([]),f(null),z({}),N({})},[h,g]),H=(0,a.useCallback)(e=>{h.length>0&&g&&W(g,h),b(e.messages||[]),f(e.id),e.model&&P([e.model]),e.params&&D(e.params),z({}),N({})},[h,g]),U=(0,a.useCallback)(e=>{let t=u.filter(t=>t.id!==e);x(t),E(t),g===e&&(f(null),b([]))},[u,g]),W=(0,a.useCallback)((e,t)=>{let s=u.map(s=>s.id===e?{...s,messages:t,updatedAt:Date.now()}:s);x(s),E(s)},[u]),J=(0,a.useCallback)(()=>{if(0===h.length)return;let e=g||R(),t={id:e,title:h.find(e=>"user"===e.role)?.content?.slice(0,40)||"New Chat",messages:h,model:C[0],params:O,createdAt:Date.now(),updatedAt:Date.now()},s=u.find(t=>t.id===e)?u.map(s=>s.id===e?{...s,...t}:s):[t,...u];x(s),E(s),f(e)},[h,g,u,C,O]),Y=(0,a.useCallback)((e,t=[])=>{let s=t.length>0,r={role:"user",content:s?[{type:"text",text:e},...t.map(e=>({type:"image_url",image_url:{url:e.dataUrl}}))]:e,id:R(),displayText:e,displayAttachments:s?t:void 0},a=[...h];O.systemPrompt&&a.unshift({role:"system",content:O.systemPrompt});let n=[...a.slice(-50),r],l={temperature:O.temperature,max_tokens:O.maxTokens,top_p:O.topP};return O.frequencyPenalty&&(l.frequency_penalty=O.frequencyPenalty),O.presencePenalty&&(l.presence_penalty=O.presencePenalty),O.topK&&(l.top_k=O.topK),null!=O.seed&&(l.seed=O.seed),O.reasoningEffort&&(l.reasoning_effort=O.reasoningEffort),{userMsg:r,baseMessages:n,requestParams:l}},[h,O]),Z=(0,a.useCallback)(async(e,t=[])=>{if(!e.trim()&&0===t.length||K)return;let{userMsg:s,baseMessages:r,requestParams:a}=Y(e,t),n=M.current,l=Date.now();if("single"===w){let e=C[0];if(!e)return;let t=R();b([...r.filter(e=>"system"!==e.role).map(e=>"user"===e.role?{...e,content:e.displayText??e.content,attachments:e.displayAttachments}:e),{role:"assistant",content:"",reasoning:"",id:t,model:e,streaming:!0}]),I.current.single={mode:"single",assistantId:t,modelId:e,startTime:l},await L("single",{body:{model:e,messages:r,...a},apiKey:n})}else{let e=C.filter(Boolean);if(0===e.length)return;N({}),e.forEach(e=>{I.current[e]={mode:"compare",modelId:e,startTime:l}}),await Promise.allSettled(e.map(e=>L(e,{body:{model:e,messages:r,...a},apiKey:n}))),z({compareLatencyMs:Date.now()-l,models:e.length})}},[K,w,C,Y,L]),G=(0,a.useCallback)(()=>{F(),b(e=>e.map(e=>e.streaming?{...e,streaming:!1}:e)),N(e=>{let t={};for(let[s,r]of Object.entries(e))t[s]={...r,streaming:!1};return t})},[F]);return e?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science"}),(0,r.jsx)(n.Qv,{})]}):(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,r.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science",actions:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(n.Iz,{options:[{value:"single",label:"Chat"},{value:"compare",label:"Compare"}],value:w,onChange:k,size:"sm"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:K?"stop":"save",onClick:K?G:J,disabled:!K&&0===h.length,children:K?"Stop":"Save"})]})}),(0,r.jsxs)("div",{className:"flex min-w-0 gap-4",children:[(0,r.jsx)("div",{className:"hidden w-56 shrink-0 lg:block",children:(0,r.jsx)(j,{sessions:u,currentSession:g,onNew:B,onLoad:H,onDelete:U})}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:["single"===w?(0,r.jsx)(m,{models:s,value:C[0],onChange:e=>P([e]),activeProviders:o,modelAliases:c}):(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[C.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(m,{models:s,value:e,onChange:e=>{let s=[...C];s[t]=e,P(s)},compact:!0,activeProviders:o,modelAliases:c}),C.length>2&&(0,r.jsx)("button",{onClick:()=>P(C.filter((e,s)=>s!==t)),className:"rounded-lg p-1.5 text-text-muted hover:bg-surface-2 hover:text-danger",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t)),C.length<4&&(0,r.jsxs)("button",{onClick:()=>P([...C,""]),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-3 py-1.5 text-xs text-text-muted hover:border-primary/40 hover:text-primary",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"}),"Add Model"]})]}),"single"===w?(0,r.jsx)(T,{messages:h,onSend:Z,streaming:K,stats:q}):(0,r.jsx)("div",{className:"flex min-w-0 gap-3",children:C.filter(Boolean).map(e=>{let t=v[e];return(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col rounded-brand border border-border-subtle bg-panel",children:[(0,r.jsx)("div",{className:"border-b border-border-subtle px-3 py-2",children:(0,r.jsx)("span",{className:"truncate text-xs font-medium text-text-main",children:e})}),(0,r.jsxs)("div",{className:"custom-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto p-3",children:[t?.reasoning&&(0,r.jsxs)("details",{className:"mb-2 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-xs italic text-text-muted",children:t.reasoning})]}),t?.content?(0,r.jsxs)("div",{className:`text-sm ${t.error?"text-danger":"text-text-main"}`,children:[t.error?(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:t.content}):(0,r.jsx)(S,{content:t.content,role:"assistant"}),t.streaming&&(0,r.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]}):(0,r.jsx)("p",{className:"text-sm text-text-muted",children:K?"Waiting...":"Send a message to compare"})]})]},e)})}),(0,r.jsx)($,{onSend:Z,streaming:K,onStop:G}),Object.keys(q).length>0&&(0,r.jsx)(y,{stats:q,mode:w})]}),(0,r.jsx)("div",{className:"hidden w-60 shrink-0 xl:block",children:(0,r.jsx)(p,{params:O,onChange:D,selectedModel:C[0]})})]})]})}function $({onSend:e,streaming:t,onStop:s}){let[n,l]=(0,a.useState)(""),[o,i]=(0,a.useState)([]),c=(0,a.useRef)(null),d=e=>{if(!e||!e.type.startsWith("image/")||e.size>5242880)return;let t=new FileReader;t.onload=()=>{i(s=>[...s,{id:R(),dataUrl:t.result,name:e.name}])},t.readAsDataURL(e)},m=()=>{(n.trim()||0!==o.length)&&!t&&(e(n,o),l(""),i([]),c.current&&(c.current.style.height="auto"))},u=(n.trim()||o.length>0)&&!t;return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-2",children:[o.length>0&&(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,r.jsxs)("div",{className:"group relative",children:[(0,r.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-16 w-16 rounded-lg border border-border-subtle object-cover"}),(0,r.jsx)("button",{onClick:()=>i(t=>t.filter(t=>t.id!==e.id)),className:"absolute -right-1.5 -top-1.5 flex size-5 items-center justify-center rounded-full bg-danger text-white opacity-0 transition-opacity group-hover:opacity-100",title:"Remove",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.id))}),(0,r.jsxs)("div",{className:"flex items-end gap-2",children:[(0,r.jsx)("textarea",{ref:c,value:n,onChange:e=>{l(e.target.value),e.target.style.height="auto",e.target.style.height=Math.min(e.target.scrollHeight,120)+"px"},onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let s=!1;for(let e of t)e.type.startsWith("image/")&&(s=!0,d(e.getAsFile()));s&&e.preventDefault()},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),m())},placeholder:"Send a message... (Enter to send, Shift+Enter for newline, paste images)",rows:1,className:"custom-scrollbar max-h-[120px] flex-1 resize-none bg-transparent px-2 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:outline-none"}),t?(0,r.jsx)("button",{onClick:s,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-danger/15 text-danger hover:bg-danger/25",title:"Stop",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop"})}):(0,r.jsx)("button",{onClick:m,disabled:!u,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary text-white hover:bg-primary-hover disabled:opacity-40",title:"Send",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"send"})})]})]})}}},e=>{e.O(0,[27,1992,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=51191)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),o=s(35497),i=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202);function p(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[p,u]=(0,r.useState)("en"),[h,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)({fallbackStrategy:"fill-first"}),[v,C]=(0,r.useState)(!0),[k,S]=(0,r.useState)({current:"",new:"",confirm:""}),[P,O]=(0,r.useState)({type:"",message:""}),[I,L]=(0,r.useState)(!1),[R,D]=(0,r.useState)(!1),[U,T]=(0,r.useState)({type:"",message:""}),[A,M]=(0,r.useState)({open:!1,mode:"",password:""}),$=(0,r.useRef)(null),[E,F]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[q,J]=(0,r.useState)(""),[_,H]=(0,r.useState)({type:"",message:""}),[K,Z]=(0,r.useState)(!1),[z,B]=(0,r.useState)(!1),[W,Q]=(0,r.useState)({type:"",message:""}),[Y,G]=(0,r.useState)("/api/auth/oidc/callback"),[V,X]=(0,r.useState)(!1),ee=(0,r.useRef)(null),[et,es]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ea,er]=(0,r.useState)({type:"",message:""}),[eo,ei]=(0,r.useState)(!1),[el,en]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[h]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{N(e),F({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),J(""),(e?.authMode==="oidc"||e?.authMode==="both")&&X(!0),es({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),C(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),C(!1)})},[]),(0,r.useEffect)(()=>{G(`${window.location.origin}/api/auth/oidc/callback`)},[]);let ed=async e=>{if(e.preventDefault(),!0===w.outboundProxyEnabled){ei(!0),er({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:et.outboundProxyUrl,outboundNoProxy:et.outboundNoProxy})}),t=await e.json();e.ok?(N(e=>({...e,...t})),er({type:"success",message:"Proxy settings applied"})):er({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}}},ec=async()=>{if(!0!==w.outboundProxyEnabled)return;let e=(et.outboundProxyUrl||"").trim();if(!e)return void er({type:"error",message:"Please enter a Proxy URL to test"});en(!0),er({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?er({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):er({type:"error",message:s?.error||"Proxy test failed"})}catch(e){er({type:"error",message:"An error occurred"})}finally{en(!1)}},em=async e=>{ei(!0),er({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(N(e=>({...e,...s})),es(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),er({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):er({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}},ex=async e=>{if(e.preventDefault(),k.new!==k.confirm)return void O({type:"error",message:"Passwords do not match"});L(!0),O({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:k.current,newPassword:k.new})}),t=await e.json();e.ok?(O({type:"success",message:"Password updated successfully"}),S({current:"",new:"",confirm:""})):O({type:"error",message:t.error||"Failed to update password"})}catch(e){O({type:"error",message:"An error occurred"})}finally{L(!1)}},ep=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&N(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eu=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&N(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eh=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&N(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eb=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&N(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eg=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&N(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ey=(e,t)=>{F(s=>({...s,[e]:t}))},ef=async(e=E.authMode||"password")=>{let t=E.oidcIssuerUrl.trim(),s=E.oidcClientId.trim(),a=E.oidcScopes.trim(),r=E.oidcLoginLabel.trim(),o=q.trim();if("password"!==e&&(!t||!s||!o)&&!w.oidcConfigured)return void H({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});Z(!0),H({type:"",message:""}),Q({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(N(e=>({...e,...n})),F({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),J(""),H({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):H({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{Z(!1)}},ej=async()=>{let e=E.oidcIssuerUrl.trim(),t=E.oidcClientId.trim(),s=E.oidcScopes.trim(),a=q.trim();if(!e||!t)return void Q({type:"error",message:"Issuer URL and client ID are required to test the connection."});B(!0),H({type:"",message:""}),Q({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:E.authMode||w.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:E.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void Q({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;Q({type:"success",message:e})}else Q({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){Q({type:"error",message:"An error occurred"})}finally{B(!1)}},ew=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&N(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eN=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();N(t)}catch(e){console.error("Failed to reload settings:",e)}},ev=async e=>{D(!0),T({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`extremerouter-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),T({type:"success",message:"Database backup downloaded"})}catch(e){T({type:"error",message:e.message||"Failed to export database"})}finally{D(!1)}},eC=async e=>{let t=$.current;if(t){D(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eN(),T({type:"success",message:"Database imported successfully"})}catch(e){T({type:"error",message:e.message||"Invalid backup file"})}finally{$.current=null,D(!1)}}},ek=async()=>{let{mode:e,password:t}=A;M({open:!1,mode:"",password:""}),"export"===e?await ev(t):"import"===e&&await eC(t)},eS=!0===w.enableObservability,eP=async()=>{j(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}j(!1),y(!1)},eO=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,a.jsx)(o.zY,{title:"Settings",description:"Security, routing, network, and account preferences",icon:"settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.extremerouter/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:()=>M({open:!0,mode:"export",password:""}),loading:R,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>ee.current?.click(),disabled:R,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:ee,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];ee.current&&(ee.current.value=""),t&&($.current=t,T({type:"",message:""}),M({open:!0,mode:"import",password:""}))}})]}),U.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===U.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:U.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>b(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[p]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===w.requireLogin,onChange:()=>eg(!w.requireLogin),disabled:v})]}),!0===w.requireLogin&&(0,a.jsxs)("form",{onSubmit:ex,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[w.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:k.current,onChange:e=>S({...k,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:k.new,onChange:e=>S({...k,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:k.confirm,onChange:e=>S({...k,confirm:e.target.value}),required:!0})]})]}),P.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===P.type?"text-red-500":"text-green-500"}`,children:P.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:I,className:"w-full sm:w-auto",children:w.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>X(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===w.authMode?"OIDC active":"both"===w.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:V?"expand_less":"expand_more"})]}),V&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=E.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ey("authMode",e.value),className:(0,d.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:v||K,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(o.pd,{placeholder:"https://auth.example.com/application/o/extremerouter/",value:E.oidcIssuerUrl,onChange:e=>ey("oidcIssuerUrl",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(o.pd,{placeholder:"extremerouter-dashboard",value:E.oidcClientId,onChange:e=>ey("oidcClientId",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:q,onChange:e=>J(e.target.value),disabled:v||K}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(o.pd,{placeholder:"openid profile email",value:E.oidcScopes,onChange:e=>ey("oidcScopes",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(o.pd,{placeholder:"Sign in with OIDC",value:E.oidcLoginLabel,onChange:e=>ey("oidcLoginLabel",e.target.value),disabled:v||K})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Y})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(o.$n,{type:"button",variant:"primary",loading:K,onClick:()=>ef(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(o.$n,{type:"button",variant:"outline",loading:z,onClick:ej,className:"w-full sm:w-auto",children:"Test connection"})]}),W.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===W.type?"text-red-500":"text-green-500"}`,children:W.message}),_.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===_.type?"text-red-500":"text-green-500"}`,children:_.message}),"oidc"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.fallbackStrategy,onChange:()=>ep("round-robin"===w.fallbackStrategy?"fill-first":"round-robin"),disabled:v})]}),"round-robin"===w.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:w.stickyRoundRobinLimit||3,onChange:e=>eh(e.target.value),disabled:v,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.comboStrategy,onChange:()=>eu("round-robin"===w.comboStrategy?"fallback":"round-robin"),disabled:v})]}),"round-robin"===w.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:w.comboStickyRoundRobinLimit||1,onChange:e=>eb(e.target.value),disabled:v,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===w.fallbackStrategy?`Currently distributing requests across all available accounts with ${w.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===w.comboStrategy?` Combos rotate after ${w.comboStickyRoundRobinLimit||1} call${1===(w.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===w.outboundProxyEnabled,onChange:()=>em(!0!==w.outboundProxyEnabled),disabled:v||eo})]}),!0===w.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:ed,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:et.outboundProxyUrl,onChange:e=>es(t=>({...t,outboundProxyUrl:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:et.outboundNoProxy,onChange:e=>es(t=>({...t,outboundNoProxy:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:el,disabled:v||eo,onClick:ec,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:eo,className:"w-full sm:w-auto",children:"Apply"})]})]}),ea.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ea.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:ea.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:eS,onChange:ew,disabled:v})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>y(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eO,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:h,onClose:e=>{b(!1),u(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:g,onClose:()=>y(!1),onConfirm:eP,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:f}),(0,a.jsxs)(i.default,{isOpen:A.open,onClose:()=>M({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.$n,{variant:"ghost",onClick:()=>M({open:!1,mode:"",password:""}),disabled:R,children:"Cancel"}),(0,a.jsx)(o.$n,{variant:"primary",onClick:ek,loading:R,disabled:!A.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===A.mode?"export":"import"," the database."]}),(0,a.jsx)(o.pd,{type:"password",value:A.password,onChange:e=>M(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&A.password&&ek()},placeholder:"Current password",autoFocus:!0})]})]})}},79797:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=79797)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),o=s(35497),i=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202);function p(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[p,u]=(0,r.useState)("en"),[h,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)({fallbackStrategy:"fill-first"}),[v,C]=(0,r.useState)(!0),[k,S]=(0,r.useState)({current:"",new:"",confirm:""}),[P,O]=(0,r.useState)({type:"",message:""}),[I,L]=(0,r.useState)(!1),[R,D]=(0,r.useState)(!1),[U,T]=(0,r.useState)({type:"",message:""}),[A,M]=(0,r.useState)({open:!1,mode:"",password:""}),$=(0,r.useRef)(null),[E,F]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[q,J]=(0,r.useState)(""),[_,H]=(0,r.useState)({type:"",message:""}),[K,Z]=(0,r.useState)(!1),[z,B]=(0,r.useState)(!1),[W,Q]=(0,r.useState)({type:"",message:""}),[Y,G]=(0,r.useState)("/api/auth/oidc/callback"),[V,X]=(0,r.useState)(!1),ee=(0,r.useRef)(null),[et,es]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ea,er]=(0,r.useState)({type:"",message:""}),[eo,ei]=(0,r.useState)(!1),[el,en]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[h]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{N(e),F({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),J(""),(e?.authMode==="oidc"||e?.authMode==="both")&&X(!0),es({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),C(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),C(!1)})},[]),(0,r.useEffect)(()=>{G(`${window.location.origin}/api/auth/oidc/callback`)},[]);let ed=async e=>{if(e.preventDefault(),!0===w.outboundProxyEnabled){ei(!0),er({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:et.outboundProxyUrl,outboundNoProxy:et.outboundNoProxy})}),t=await e.json();e.ok?(N(e=>({...e,...t})),er({type:"success",message:"Proxy settings applied"})):er({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}}},ec=async()=>{if(!0!==w.outboundProxyEnabled)return;let e=(et.outboundProxyUrl||"").trim();if(!e)return void er({type:"error",message:"Please enter a Proxy URL to test"});en(!0),er({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?er({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):er({type:"error",message:s?.error||"Proxy test failed"})}catch(e){er({type:"error",message:"An error occurred"})}finally{en(!1)}},em=async e=>{ei(!0),er({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(N(e=>({...e,...s})),es(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),er({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):er({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}},ex=async e=>{if(e.preventDefault(),k.new!==k.confirm)return void O({type:"error",message:"Passwords do not match"});L(!0),O({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:k.current,newPassword:k.new})}),t=await e.json();e.ok?(O({type:"success",message:"Password updated successfully"}),S({current:"",new:"",confirm:""})):O({type:"error",message:t.error||"Failed to update password"})}catch(e){O({type:"error",message:"An error occurred"})}finally{L(!1)}},ep=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&N(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eu=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&N(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eh=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&N(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eb=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&N(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eg=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&N(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ey=(e,t)=>{F(s=>({...s,[e]:t}))},ef=async(e=E.authMode||"password")=>{let t=E.oidcIssuerUrl.trim(),s=E.oidcClientId.trim(),a=E.oidcScopes.trim(),r=E.oidcLoginLabel.trim(),o=q.trim();if("password"!==e&&(!t||!s||!o)&&!w.oidcConfigured)return void H({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});Z(!0),H({type:"",message:""}),Q({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(N(e=>({...e,...n})),F({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),J(""),H({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):H({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{Z(!1)}},ej=async()=>{let e=E.oidcIssuerUrl.trim(),t=E.oidcClientId.trim(),s=E.oidcScopes.trim(),a=q.trim();if(!e||!t)return void Q({type:"error",message:"Issuer URL and client ID are required to test the connection."});B(!0),H({type:"",message:""}),Q({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:E.authMode||w.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:E.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void Q({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;Q({type:"success",message:e})}else Q({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){Q({type:"error",message:"An error occurred"})}finally{B(!1)}},ew=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&N(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eN=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();N(t)}catch(e){console.error("Failed to reload settings:",e)}},ev=async e=>{D(!0),T({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`extremerouter-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),T({type:"success",message:"Database backup downloaded"})}catch(e){T({type:"error",message:e.message||"Failed to export database"})}finally{D(!1)}},eC=async e=>{let t=$.current;if(t){D(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eN(),T({type:"success",message:"Database imported successfully"})}catch(e){T({type:"error",message:e.message||"Invalid backup file"})}finally{$.current=null,D(!1)}}},ek=async()=>{let{mode:e,password:t}=A;M({open:!1,mode:"",password:""}),"export"===e?await ev(t):"import"===e&&await eC(t)},eS=!0===w.enableObservability,eP=async()=>{j(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}j(!1),y(!1)},eO=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,a.jsx)(o.zY,{title:"Settings",description:"Security, routing, network, and account preferences",icon:"settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.extremerouter/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:()=>M({open:!0,mode:"export",password:""}),loading:R,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>ee.current?.click(),disabled:R,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:ee,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];ee.current&&(ee.current.value=""),t&&($.current=t,T({type:"",message:""}),M({open:!0,mode:"import",password:""}))}})]}),U.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===U.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:U.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>b(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[p]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===w.requireLogin,onChange:()=>eg(!w.requireLogin),disabled:v})]}),!0===w.requireLogin&&(0,a.jsxs)("form",{onSubmit:ex,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[w.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:k.current,onChange:e=>S({...k,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:k.new,onChange:e=>S({...k,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:k.confirm,onChange:e=>S({...k,confirm:e.target.value}),required:!0})]})]}),P.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===P.type?"text-red-500":"text-green-500"}`,children:P.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:I,className:"w-full sm:w-auto",children:w.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>X(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===w.authMode?"OIDC active":"both"===w.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:V?"expand_less":"expand_more"})]}),V&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=E.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ey("authMode",e.value),className:(0,d.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:v||K,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(o.pd,{placeholder:"https://auth.example.com/application/o/extremerouter/",value:E.oidcIssuerUrl,onChange:e=>ey("oidcIssuerUrl",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(o.pd,{placeholder:"extremerouter-dashboard",value:E.oidcClientId,onChange:e=>ey("oidcClientId",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:q,onChange:e=>J(e.target.value),disabled:v||K}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(o.pd,{placeholder:"openid profile email",value:E.oidcScopes,onChange:e=>ey("oidcScopes",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(o.pd,{placeholder:"Sign in with OIDC",value:E.oidcLoginLabel,onChange:e=>ey("oidcLoginLabel",e.target.value),disabled:v||K})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Y})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(o.$n,{type:"button",variant:"primary",loading:K,onClick:()=>ef(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(o.$n,{type:"button",variant:"outline",loading:z,onClick:ej,className:"w-full sm:w-auto",children:"Test connection"})]}),W.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===W.type?"text-red-500":"text-green-500"}`,children:W.message}),_.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===_.type?"text-red-500":"text-green-500"}`,children:_.message}),"oidc"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.fallbackStrategy,onChange:()=>ep("round-robin"===w.fallbackStrategy?"fill-first":"round-robin"),disabled:v})]}),"round-robin"===w.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:w.stickyRoundRobinLimit||3,onChange:e=>eh(e.target.value),disabled:v,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.comboStrategy,onChange:()=>eu("round-robin"===w.comboStrategy?"fallback":"round-robin"),disabled:v})]}),"round-robin"===w.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:w.comboStickyRoundRobinLimit||1,onChange:e=>eb(e.target.value),disabled:v,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===w.fallbackStrategy?`Currently distributing requests across all available accounts with ${w.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===w.comboStrategy?` Combos rotate after ${w.comboStickyRoundRobinLimit||1} call${1===(w.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===w.outboundProxyEnabled,onChange:()=>em(!0!==w.outboundProxyEnabled),disabled:v||eo})]}),!0===w.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:ed,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:et.outboundProxyUrl,onChange:e=>es(t=>({...t,outboundProxyUrl:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:et.outboundNoProxy,onChange:e=>es(t=>({...t,outboundNoProxy:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:el,disabled:v||eo,onClick:ec,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:eo,className:"w-full sm:w-auto",children:"Apply"})]})]}),ea.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ea.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:ea.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:eS,onChange:ew,disabled:v})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>y(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eO,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:h,onClose:e=>{b(!1),u(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:g,onClose:()=>y(!1),onConfirm:eP,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:f}),(0,a.jsxs)(i.default,{isOpen:A.open,onClose:()=>M({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.$n,{variant:"ghost",onClick:()=>M({open:!1,mode:"",password:""}),disabled:R,children:"Cancel"}),(0,a.jsx)(o.$n,{variant:"primary",onClick:ek,loading:R,disabled:!A.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===A.mode?"export":"import"," the database."]}),(0,a.jsx)(o.pd,{type:"password",value:A.password,onChange:e=>M(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&A.password&&ek()},placeholder:"Current password",autoFocus:!0})]})]})}},79797:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=79797)),_N_E=e.O()}]);