polyrouter 1.0.5 → 1.0.7

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 (1094) hide show
  1. package/README.md +70 -84
  2. package/app/.next-cli-build/BUILD_ID +1 -1
  3. package/app/.next-cli-build/app-path-routes-manifest.json +15 -14
  4. package/app/.next-cli-build/build-manifest.json +2 -2
  5. package/app/.next-cli-build/prerender-manifest.json +3 -3
  6. package/app/.next-cli-build/routes-manifest.json +6 -0
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +4 -4
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page.js +2 -2
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  80. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  91. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  94. package/app/.next-cli-build/server/app/_not-found.rsc +20 -19
  95. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +20 -19
  96. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +9 -8
  98. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
  101. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/setup-password/route.js +1 -0
  114. package/app/.next-cli-build/server/app/api/auth/setup-password/route.js.nft.json +1 -0
  115. package/app/.next-cli-build/server/app/api/auth/setup-password/route_client-reference-manifest.js +1 -0
  116. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +9 -9
  119. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  121. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  125. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  127. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +4 -4
  139. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +6 -6
  143. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  145. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +3 -3
  181. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +4 -4
  183. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  213. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  265. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  267. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  271. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  273. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  275. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  277. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  279. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  281. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  283. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  285. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  287. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/realtime/authorize/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/realtime/authorize/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  305. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  327. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  347. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  401. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  403. package/app/.next-cli-build/server/app/callback.html +1 -1
  404. package/app/.next-cli-build/server/app/callback.rsc +24 -23
  405. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +24 -23
  406. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +9 -8
  408. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
  409. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  410. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +22 -21
  413. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  414. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  415. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  416. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  417. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +22 -21
  418. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +9 -8
  420. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
  421. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  422. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +23 -22
  423. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  424. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  427. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +23 -22
  428. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +9 -8
  430. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
  431. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/combos.rsc +25 -24
  433. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  434. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  436. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  437. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +25 -24
  438. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +9 -8
  440. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
  441. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +23 -22
  443. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  444. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  447. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +23 -22
  448. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +9 -8
  450. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
  451. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  452. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +25 -24
  453. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  454. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  456. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  458. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +25 -24
  459. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +9 -8
  461. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
  462. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +22 -21
  464. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  465. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  467. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  468. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +22 -21
  469. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +9 -8
  471. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
  472. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/profile.rsc +25 -24
  474. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  475. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  478. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +25 -24
  479. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +9 -8
  481. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
  482. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +25 -24
  484. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  485. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +25 -24
  490. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +9 -8
  492. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
  493. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/providers.rsc +25 -24
  495. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  496. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +25 -24
  500. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +9 -8
  502. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
  503. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +25 -24
  505. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +25 -24
  510. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +9 -8
  512. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +3 -3
  513. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +22 -21
  515. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  519. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +22 -21
  520. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +9 -8
  522. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +3 -3
  523. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  524. package/app/.next-cli-build/server/app/dashboard/quota.rsc +23 -22
  525. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  526. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +23 -22
  530. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +9 -8
  532. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
  533. package/app/.next-cli-build/server/app/dashboard/realtime.html +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/realtime.rsc +22 -21
  535. package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk/dashboard/realtime/__PAGE__.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk/dashboard/realtime.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/dashboard/realtime.segments/_full.segment.rsc +22 -21
  540. package/app/.next-cli-build/server/app/dashboard/realtime.segments/_head.segment.rsc +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/realtime.segments/_index.segment.rsc +9 -8
  542. package/app/.next-cli-build/server/app/dashboard/realtime.segments/_tree.segment.rsc +3 -3
  543. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  544. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  546. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  547. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +24 -23
  548. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +24 -23
  549. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  550. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +9 -8
  551. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
  552. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  553. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  556. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  557. package/app/.next-cli-build/server/app/dashboard/skills.rsc +25 -24
  558. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  559. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  560. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  562. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +25 -24
  563. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +9 -8
  565. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
  566. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  567. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +22 -21
  568. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  569. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  570. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  571. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  572. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +22 -21
  573. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  574. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +9 -8
  575. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +3 -3
  576. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/translator.rsc +25 -24
  578. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  579. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  581. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  582. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +25 -24
  583. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  584. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +9 -8
  585. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
  586. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/usage.rsc +25 -24
  588. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  589. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  591. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  592. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +25 -24
  593. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  594. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +9 -8
  595. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
  596. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  597. package/app/.next-cli-build/server/app/dashboard.rsc +23 -22
  598. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  599. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  600. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  601. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +23 -22
  602. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  603. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +9 -8
  604. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
  605. package/app/.next-cli-build/server/app/index.html +1 -1
  606. package/app/.next-cli-build/server/app/index.rsc +19 -18
  607. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  608. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +19 -18
  609. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  610. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +9 -8
  611. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
  612. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  613. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  614. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  615. package/app/.next-cli-build/server/app/landing.html +1 -1
  616. package/app/.next-cli-build/server/app/landing.rsc +24 -23
  617. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +24 -23
  618. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  619. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +9 -8
  620. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
  621. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  622. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  623. package/app/.next-cli-build/server/app/login/page.js +2 -2
  624. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  625. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  626. package/app/.next-cli-build/server/app/login.html +1 -1
  627. package/app/.next-cli-build/server/app/login.rsc +24 -23
  628. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +24 -23
  629. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  630. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +9 -8
  631. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
  632. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  633. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  634. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  635. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  636. package/app/.next-cli-build/server/app/page.js +2 -2
  637. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  638. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  639. package/app/.next-cli-build/server/app-paths-manifest.json +15 -14
  640. package/app/.next-cli-build/server/chunks/1455.js +1 -0
  641. package/app/.next-cli-build/server/chunks/1605.js +1 -0
  642. package/app/.next-cli-build/server/chunks/1829.js +1 -1
  643. package/app/.next-cli-build/server/chunks/2065.js +1 -0
  644. package/app/.next-cli-build/server/chunks/2112.js +1 -1
  645. package/app/.next-cli-build/server/chunks/2194.js +1 -1
  646. package/app/.next-cli-build/server/chunks/238.js +1 -1
  647. package/app/.next-cli-build/server/chunks/2620.js +1 -1
  648. package/app/.next-cli-build/server/chunks/318.js +2 -2
  649. package/app/.next-cli-build/server/chunks/3239.js +9 -0
  650. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  651. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  652. package/app/.next-cli-build/server/chunks/3726.js +1 -1
  653. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  654. package/app/.next-cli-build/server/chunks/412.js +2 -2
  655. package/app/.next-cli-build/server/chunks/4123.js +3 -3
  656. package/app/.next-cli-build/server/chunks/4293.js +1 -0
  657. package/app/.next-cli-build/server/chunks/4433.js +1 -0
  658. package/app/.next-cli-build/server/chunks/{4884.js → 4491.js} +8 -3
  659. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  660. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  661. package/app/.next-cli-build/server/chunks/4946.js +9 -0
  662. package/app/.next-cli-build/server/chunks/5033.js +1 -0
  663. package/app/.next-cli-build/server/chunks/507.js +2 -2
  664. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  665. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  666. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  667. package/app/.next-cli-build/server/chunks/6805.js +3 -3
  668. package/app/.next-cli-build/server/chunks/6877.js +1 -1
  669. package/app/.next-cli-build/server/chunks/6922.js +1 -0
  670. package/app/.next-cli-build/server/chunks/698.js +2 -2
  671. package/app/.next-cli-build/server/chunks/7807.js +1 -1
  672. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  673. package/app/.next-cli-build/server/chunks/8038.js +19 -19
  674. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  675. package/app/.next-cli-build/server/chunks/8185.js +1 -0
  676. package/app/.next-cli-build/server/chunks/8251.js +2 -2
  677. package/app/.next-cli-build/server/chunks/827.js +1 -1
  678. package/app/.next-cli-build/server/chunks/8363.js +1 -0
  679. package/app/.next-cli-build/server/chunks/8520.js +2 -2
  680. package/app/.next-cli-build/server/chunks/869.js +1 -1
  681. package/app/.next-cli-build/server/chunks/8895.js +1 -1
  682. package/app/.next-cli-build/server/chunks/8910.js +1 -1
  683. package/app/.next-cli-build/server/chunks/915.js +6 -6
  684. package/app/.next-cli-build/server/chunks/{3850.js → 9336.js} +1 -1
  685. package/app/.next-cli-build/server/chunks/9660.js +1 -1
  686. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  687. package/app/.next-cli-build/server/middleware.js +6 -6
  688. package/app/.next-cli-build/server/pages/404.html +1 -1
  689. package/app/.next-cli-build/server/pages/500.html +1 -1
  690. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  691. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  692. package/app/.next-cli-build/static/chunks/{1321-874aad1cb7882601.js → 1321-ee3f98a273573f07.js} +1 -1
  693. package/app/.next-cli-build/static/chunks/4024-823f5cdd3f7f04cc.js +1 -0
  694. package/app/.next-cli-build/static/chunks/5116-57607d97ad30f27c.js +70 -0
  695. package/app/.next-cli-build/static/chunks/{533-74450af7ce8a32b6.js → 533-34fc7f5a3c79da82.js} +1 -1
  696. package/app/.next-cli-build/static/chunks/{5497-78a8a8716352195f.js → 5497-84dfd144b30eda56.js} +1 -1
  697. package/app/.next-cli-build/static/chunks/9da6db1e-abf82355a5ee5150.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-3b24dec9f1a5c678.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-63a707f86838189f.js → page-c737bc25a827d251.js} +1 -1
  700. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-52f8e9cf6aa8554b.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/realtime/{page-81a6d2a3fffb86dc.js → page-f4b382f06f0f8eb6.js} +1 -1
  702. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-07a0044d9e135cb8.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-ec365dbdc0860d04.js → page-d488121dc0c130ad.js} +1 -1
  704. package/app/.next-cli-build/static/chunks/app/_global-error/page-a1ad2a6494b449e0.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-a1ad2a6494b449e0.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-a1ad2a6494b449e0.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-a1ad2a6494b449e0.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-a1ad2a6494b449e0.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-a1ad2a6494b449e0.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-a1ad2a6494b449e0.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/auth/setup-password/route-a1ad2a6494b449e0.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-a1ad2a6494b449e0.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-a1ad2a6494b449e0.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-a1ad2a6494b449e0.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-a1ad2a6494b449e0.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-a1ad2a6494b449e0.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-a1ad2a6494b449e0.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-a1ad2a6494b449e0.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-a1ad2a6494b449e0.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-a1ad2a6494b449e0.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-a1ad2a6494b449e0.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-a1ad2a6494b449e0.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-a1ad2a6494b449e0.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-a1ad2a6494b449e0.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-a1ad2a6494b449e0.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-a1ad2a6494b449e0.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-a1ad2a6494b449e0.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-a1ad2a6494b449e0.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-a1ad2a6494b449e0.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-a1ad2a6494b449e0.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-a1ad2a6494b449e0.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/combos/route-a1ad2a6494b449e0.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-a1ad2a6494b449e0.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-a1ad2a6494b449e0.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-a1ad2a6494b449e0.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-a1ad2a6494b449e0.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-a1ad2a6494b449e0.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-a1ad2a6494b449e0.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/health/route-a1ad2a6494b449e0.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/init/route-a1ad2a6494b449e0.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-a1ad2a6494b449e0.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/keys/route-a1ad2a6494b449e0.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/locale/route-a1ad2a6494b449e0.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-a1ad2a6494b449e0.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-a1ad2a6494b449e0.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-a1ad2a6494b449e0.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-a1ad2a6494b449e0.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-a1ad2a6494b449e0.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-a1ad2a6494b449e0.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-a1ad2a6494b449e0.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-a1ad2a6494b449e0.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-a1ad2a6494b449e0.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-a1ad2a6494b449e0.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-a1ad2a6494b449e0.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/models/route-a1ad2a6494b449e0.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/models/test/route-a1ad2a6494b449e0.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-a1ad2a6494b449e0.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-a1ad2a6494b449e0.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-a1ad2a6494b449e0.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-a1ad2a6494b449e0.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-a1ad2a6494b449e0.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-a1ad2a6494b449e0.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-a1ad2a6494b449e0.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-a1ad2a6494b449e0.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-a1ad2a6494b449e0.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-a1ad2a6494b449e0.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-a1ad2a6494b449e0.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-a1ad2a6494b449e0.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-a1ad2a6494b449e0.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/pricing/route-a1ad2a6494b449e0.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-a1ad2a6494b449e0.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-a1ad2a6494b449e0.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-a1ad2a6494b449e0.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-a1ad2a6494b449e0.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-a1ad2a6494b449e0.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-a1ad2a6494b449e0.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-a1ad2a6494b449e0.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-a1ad2a6494b449e0.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-a1ad2a6494b449e0.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/providers/route-a1ad2a6494b449e0.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-a1ad2a6494b449e0.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-a1ad2a6494b449e0.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-a1ad2a6494b449e0.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-a1ad2a6494b449e0.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-a1ad2a6494b449e0.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-a1ad2a6494b449e0.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-a1ad2a6494b449e0.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-a1ad2a6494b449e0.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-a1ad2a6494b449e0.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-a1ad2a6494b449e0.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-a1ad2a6494b449e0.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-a1ad2a6494b449e0.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-a1ad2a6494b449e0.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-a1ad2a6494b449e0.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-a1ad2a6494b449e0.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-a1ad2a6494b449e0.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-a1ad2a6494b449e0.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/realtime/authorize/route-a1ad2a6494b449e0.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-a1ad2a6494b449e0.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-a1ad2a6494b449e0.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-a1ad2a6494b449e0.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/settings/route-a1ad2a6494b449e0.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-a1ad2a6494b449e0.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/tags/route-a1ad2a6494b449e0.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-a1ad2a6494b449e0.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-a1ad2a6494b449e0.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-a1ad2a6494b449e0.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-a1ad2a6494b449e0.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-a1ad2a6494b449e0.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-a1ad2a6494b449e0.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-a1ad2a6494b449e0.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-a1ad2a6494b449e0.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-a1ad2a6494b449e0.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-a1ad2a6494b449e0.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-a1ad2a6494b449e0.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-a1ad2a6494b449e0.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-a1ad2a6494b449e0.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-a1ad2a6494b449e0.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-a1ad2a6494b449e0.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-a1ad2a6494b449e0.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-a1ad2a6494b449e0.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-a1ad2a6494b449e0.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-a1ad2a6494b449e0.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-a1ad2a6494b449e0.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-a1ad2a6494b449e0.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-a1ad2a6494b449e0.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-a1ad2a6494b449e0.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-a1ad2a6494b449e0.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-a1ad2a6494b449e0.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-a1ad2a6494b449e0.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-a1ad2a6494b449e0.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-a1ad2a6494b449e0.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-a1ad2a6494b449e0.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-a1ad2a6494b449e0.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-a1ad2a6494b449e0.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-a1ad2a6494b449e0.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-a1ad2a6494b449e0.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-a1ad2a6494b449e0.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-a1ad2a6494b449e0.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-a1ad2a6494b449e0.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-a1ad2a6494b449e0.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/v1/route-a1ad2a6494b449e0.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-a1ad2a6494b449e0.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-a1ad2a6494b449e0.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-a1ad2a6494b449e0.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-a1ad2a6494b449e0.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-a1ad2a6494b449e0.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-a1ad2a6494b449e0.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-a1ad2a6494b449e0.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-a1ad2a6494b449e0.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/version/route-a1ad2a6494b449e0.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-a1ad2a6494b449e0.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/version/update/route-a1ad2a6494b449e0.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/landing/page-1f76869d947f63aa.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/layout-c029c07aec92583d.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/login/page-61bdc6ffbffa18d7.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-a1ad2a6494b449e0.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/page-a1ad2a6494b449e0.js +1 -0
  859. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-a1ad2a6494b449e0.js +1 -0
  860. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-a1ad2a6494b449e0.js +1 -0
  861. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-a1ad2a6494b449e0.js +1 -0
  862. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-a1ad2a6494b449e0.js +1 -0
  863. package/app/.next-cli-build/static/css/ada9b169590290e6.css +1 -0
  864. package/app/.next-cli-build/static/css/b71ca13188930393.css +1 -0
  865. package/app/.next-cli-build/static/j9NY-4IuO21Wl7djjsl7y/_buildManifest.js +1 -0
  866. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  867. package/app/node_modules/baseline-browser-mapping/package.json +1 -1
  868. package/app/package.json +11 -9
  869. package/app/public/i18n/literals/ar.json +4 -4
  870. package/app/public/i18n/literals/bn.json +4 -4
  871. package/app/public/i18n/literals/cs.json +4 -4
  872. package/app/public/i18n/literals/da.json +4 -4
  873. package/app/public/i18n/literals/de.json +4 -4
  874. package/app/public/i18n/literals/el.json +4 -4
  875. package/app/public/i18n/literals/es.json +4 -4
  876. package/app/public/i18n/literals/fa.json +33 -33
  877. package/app/public/i18n/literals/fi.json +4 -4
  878. package/app/public/i18n/literals/fr.json +4 -4
  879. package/app/public/i18n/literals/he.json +4 -4
  880. package/app/public/i18n/literals/hi.json +4 -4
  881. package/app/public/i18n/literals/hu.json +4 -4
  882. package/app/public/i18n/literals/id.json +4 -4
  883. package/app/public/i18n/literals/it.json +4 -4
  884. package/app/public/i18n/literals/ja.json +4 -4
  885. package/app/public/i18n/literals/km.json +33 -33
  886. package/app/public/i18n/literals/ko.json +4 -4
  887. package/app/public/i18n/literals/nl.json +4 -4
  888. package/app/public/i18n/literals/no.json +4 -4
  889. package/app/public/i18n/literals/pl.json +4 -4
  890. package/app/public/i18n/literals/pt-BR.json +4 -4
  891. package/app/public/i18n/literals/pt-PT.json +4 -4
  892. package/app/public/i18n/literals/ro.json +4 -4
  893. package/app/public/i18n/literals/ru.json +4 -4
  894. package/app/public/i18n/literals/sv.json +4 -4
  895. package/app/public/i18n/literals/th.json +33 -33
  896. package/app/public/i18n/literals/tl.json +4 -4
  897. package/app/public/i18n/literals/tr.json +4 -4
  898. package/app/public/i18n/literals/uk.json +4 -4
  899. package/app/public/i18n/literals/ur.json +4 -4
  900. package/app/public/i18n/literals/vi.json +4 -4
  901. package/app/public/i18n/literals/zh-CN.json +33 -33
  902. package/app/public/i18n/literals/zh-TW.json +4 -4
  903. package/app/src/lib/updater/updater.js +3 -3
  904. package/app/src/mitm/server.js +3 -3
  905. package/app/src/realtime/protocol.js +1 -1
  906. package/app/src/shared/services/installationTelemetry.js +156 -0
  907. package/cli.js +16 -16
  908. package/hooks/postinstall.js +5 -5
  909. package/hooks/sqliteRuntime.js +4 -4
  910. package/hooks/trayRuntime.js +6 -6
  911. package/package.json +14 -8
  912. package/src/cli/api/client.js +6 -3
  913. package/src/cli/commands/xaiVideo.js +7 -7
  914. package/src/cli/menus/cliTools.js +16 -16
  915. package/src/cli/terminalUI.js +2 -2
  916. package/src/cli/tray/autostart.js +9 -9
  917. package/src/cli/tray/tray.js +5 -5
  918. package/src/cli/tray/tray.ps1 +1 -1
  919. package/app/.next-cli-build/server/chunks/3350.js +0 -1
  920. package/app/.next-cli-build/server/chunks/4055.js +0 -9
  921. package/app/.next-cli-build/server/chunks/4223.js +0 -11
  922. package/app/.next-cli-build/server/chunks/4306.js +0 -1
  923. package/app/.next-cli-build/server/chunks/5217.js +0 -9
  924. package/app/.next-cli-build/server/chunks/6832.js +0 -1
  925. package/app/.next-cli-build/server/chunks/6935.js +0 -1
  926. package/app/.next-cli-build/server/chunks/8658.js +0 -1
  927. package/app/.next-cli-build/server/chunks/8971.js +0 -1
  928. package/app/.next-cli-build/static/2HBi62dJo0vhfF1vhuTk4/_buildManifest.js +0 -1
  929. package/app/.next-cli-build/static/chunks/3122-7d92444836703c7a.js +0 -11
  930. package/app/.next-cli-build/static/chunks/5116-8422f68a0c01ef77.js +0 -70
  931. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-4c5a22762fe663b8.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-f8b4e4dc27c90c0c.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-d73bd129f40d6396.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/_global-error/page-421648f433e539cc.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-421648f433e539cc.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-421648f433e539cc.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-421648f433e539cc.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-421648f433e539cc.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-421648f433e539cc.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-421648f433e539cc.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-421648f433e539cc.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-421648f433e539cc.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-421648f433e539cc.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-421648f433e539cc.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-421648f433e539cc.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-421648f433e539cc.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-421648f433e539cc.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-421648f433e539cc.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-421648f433e539cc.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-421648f433e539cc.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-421648f433e539cc.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-421648f433e539cc.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-421648f433e539cc.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-421648f433e539cc.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-421648f433e539cc.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-421648f433e539cc.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-421648f433e539cc.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-421648f433e539cc.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-421648f433e539cc.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-421648f433e539cc.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/combos/route-421648f433e539cc.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-421648f433e539cc.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-421648f433e539cc.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-421648f433e539cc.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-421648f433e539cc.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-421648f433e539cc.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-421648f433e539cc.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/health/route-421648f433e539cc.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/init/route-421648f433e539cc.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-421648f433e539cc.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/keys/route-421648f433e539cc.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/locale/route-421648f433e539cc.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-421648f433e539cc.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-421648f433e539cc.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-421648f433e539cc.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-421648f433e539cc.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-421648f433e539cc.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-421648f433e539cc.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-421648f433e539cc.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-421648f433e539cc.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-421648f433e539cc.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-421648f433e539cc.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-421648f433e539cc.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/models/route-421648f433e539cc.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/models/test/route-421648f433e539cc.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-421648f433e539cc.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-421648f433e539cc.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-421648f433e539cc.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-421648f433e539cc.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-421648f433e539cc.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-421648f433e539cc.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-421648f433e539cc.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-421648f433e539cc.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-421648f433e539cc.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-421648f433e539cc.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-421648f433e539cc.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-421648f433e539cc.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-421648f433e539cc.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/pricing/route-421648f433e539cc.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-421648f433e539cc.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-421648f433e539cc.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-421648f433e539cc.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-421648f433e539cc.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-421648f433e539cc.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-421648f433e539cc.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-421648f433e539cc.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-421648f433e539cc.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-421648f433e539cc.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/providers/route-421648f433e539cc.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-421648f433e539cc.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-421648f433e539cc.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-421648f433e539cc.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-421648f433e539cc.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-421648f433e539cc.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-421648f433e539cc.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-421648f433e539cc.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-421648f433e539cc.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-421648f433e539cc.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-421648f433e539cc.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-421648f433e539cc.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-421648f433e539cc.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-421648f433e539cc.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-421648f433e539cc.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-421648f433e539cc.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-421648f433e539cc.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-421648f433e539cc.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/realtime/authorize/route-421648f433e539cc.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-421648f433e539cc.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-421648f433e539cc.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-421648f433e539cc.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/settings/route-421648f433e539cc.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-421648f433e539cc.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/tags/route-421648f433e539cc.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-421648f433e539cc.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-421648f433e539cc.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-421648f433e539cc.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-421648f433e539cc.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-421648f433e539cc.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-421648f433e539cc.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-421648f433e539cc.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-421648f433e539cc.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-421648f433e539cc.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-421648f433e539cc.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-421648f433e539cc.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-421648f433e539cc.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-421648f433e539cc.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-421648f433e539cc.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-421648f433e539cc.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-421648f433e539cc.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-421648f433e539cc.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-421648f433e539cc.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-421648f433e539cc.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-421648f433e539cc.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-421648f433e539cc.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-421648f433e539cc.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-421648f433e539cc.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-421648f433e539cc.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-421648f433e539cc.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-421648f433e539cc.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-421648f433e539cc.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-421648f433e539cc.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-421648f433e539cc.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-421648f433e539cc.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-421648f433e539cc.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-421648f433e539cc.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-421648f433e539cc.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-421648f433e539cc.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-421648f433e539cc.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-421648f433e539cc.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-421648f433e539cc.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/v1/route-421648f433e539cc.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-421648f433e539cc.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-421648f433e539cc.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-421648f433e539cc.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-421648f433e539cc.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-421648f433e539cc.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-421648f433e539cc.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-421648f433e539cc.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-421648f433e539cc.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/version/route-421648f433e539cc.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-421648f433e539cc.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/version/update/route-421648f433e539cc.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/landing/page-d0dc2acaf2a1c239.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/layout-1c95599c7054cadc.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/login/page-744fd018e592b5f6.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-421648f433e539cc.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/page-421648f433e539cc.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-421648f433e539cc.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-421648f433e539cc.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-421648f433e539cc.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-421648f433e539cc.js +0 -1
  1092. package/app/.next-cli-build/static/css/f21ca4a324c22a6c.css +0 -1
  1093. package/app/.next-cli-build/static/css/fa9e956ea578b5b8.css +0 -1
  1094. /package/app/.next-cli-build/static/{2HBi62dJo0vhfF1vhuTk4 → j9NY-4IuO21Wl7djjsl7y}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
1
  (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[533],{10533:(e,t,s)=>{Promise.resolve().then(s.bind(s,20242))},15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>i,Hx:()=>n,Iv:()=>d,Nv:()=>m,RL:()=>c,ev:()=>u,fl:()=>r,hT:()=>a,oX:()=>l,t6:()=>o});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],n=2e3,i=3e5,r=5e3,o=5,c=1e4,d=5e3,u=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],m=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},20242:(e,t,s)=>{"use strict";s.d(t,{default:()=>g});var a=s(95155),l=s(12115),n=s(14051),i=s.n(n),r=s(35497),o=s(11059),c=s(15536);async function d(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(c.Iv)})).ok}catch{return!1}}async function u(...e){let t=e.filter(Boolean).map(d);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}function m({label:e,active:t=!1,url:s,copyId:l,copied:n,onCopy:i,status:o,actions:c}){return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-[11px] font-mono font-semibold uppercase tracking-wide px-2 py-1 shrink-0 w-[84px] text-center border ${t?"bg-primary/10 text-primary border-primary/25":"bg-surface-2 text-text-muted border-transparent"}`,children:e}),o?(0,a.jsx)(p,{...o}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.pd,{value:s,readOnly:!0,className:"flex-1",inputClassName:"font-mono text-sm py-2"}),(0,a.jsx)("button",{onClick:()=>i(s,l),title:"Copy endpoint",className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:n===l?"check":"content_copy"})})]}),c]})}let x={pending:"border-border bg-surface-2 text-text-muted",error:"border-red-500/30 bg-red-500/5 text-red-600 dark:text-red-400"};function p({tone:e="pending",icon:t,spin:s=!1,message:l}){return(0,a.jsxs)("div",{className:`flex-1 min-w-0 flex items-center gap-2 px-3 py-2 border text-sm ${x[e]||x.pending}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] shrink-0 ${s?"animate-spin":""}`,children:t||(s?"progress_activity":"info")}),(0,a.jsx)("span",{className:"truncate",children:l})]})}function h({status:e,className:t=""}){return(0,a.jsx)("div",{className:`p-2 text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function y({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 bg-surface border border-border shadow-[var(--shadow-elev)] text-text-main text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150 delay-200",children:e})]})}function f({message:e,action:t}){return(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 bg-yellow-500/10 border border-yellow-500/25 text-yellow-800 dark:text-yellow-300",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-xs flex-1 leading-relaxed",children:e}),t&&(0,a.jsx)("a",{href:t.href,className:"text-xs font-semibold underline shrink-0 hover:opacity-80 mt-0.5",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}function g({machineId:e}){let[t,s]=(0,l.useState)([]),[n,i]=(0,l.useState)(!0),[x,p]=(0,l.useState)(!1),[b,j]=(0,l.useState)(""),[w,v]=(0,l.useState)(null),[k,N]=(0,l.useState)(null),[C,S]=(0,l.useState)(!1),[T,P]=(0,l.useState)(!0),[E,A]=(0,l.useState)(!0),[$,I]=(0,l.useState)(!1),[U,_]=(0,l.useState)(!0),[R,D]=(0,l.useState)(!1),[O,L]=(0,l.useState)(!1),[F,q]=(0,l.useState)(""),[W,z]=(0,l.useState)(""),[K,H]=(0,l.useState)(!1),[J,B]=(0,l.useState)(""),[M,Q]=(0,l.useState)(null),[X,Z]=(0,l.useState)(!1),[G,V]=(0,l.useState)(!1),[Y,ee]=(0,l.useState)(!1),[et,es]=(0,l.useState)(!1),[ea,el]=(0,l.useState)(""),[en,ei]=(0,l.useState)(!1),[er,eo]=(0,l.useState)(""),[ec,ed]=(0,l.useState)(null),[eu,em]=(0,l.useState)(""),[ex,ep]=(0,l.useState)(""),[eh,ey]=(0,l.useState)(null),[ef,eg]=(0,l.useState)(!1),[eb,ej]=(0,l.useState)([]),[ew,ev]=(0,l.useState)(""),[ek,eN]=(0,l.useState)(!1),[eC,eS]=(0,l.useState)(!1),[eT,eP]=(0,l.useState)(!1),eE=(0,l.useRef)(null),eA=(0,l.useRef)(0),e$=(0,l.useRef)(0),eI=(0,l.useRef)(!1),eU=(0,l.useRef)(!1),e_=(0,l.useRef)(!1),eR=(0,l.useRef)(!1),[eD,eO]=(0,l.useState)(!1),[eL,eF]=(0,l.useState)(!1),[eq,eW]=(0,l.useState)(new Set),[ez,eK]=(0,l.useState)(!1);(0,l.useEffect)(()=>{eK(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]);let{copied:eH,copy:eJ}=(0,o.C)(),eB=!T||!E,eM=T?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,l.useEffect)(()=>{eE.current&&(eE.current.scrollTop=eE.current.scrollHeight)},[eb]),(0,l.useEffect)(()=>{eY(),eZ()},[]),(0,l.useEffect)(()=>{if(!(R||Y))return;let e=!R||O,t=!Y||et,s=()=>{document.hidden||eX()};if(document.addEventListener("visibilitychange",s),e&&t)return()=>document.removeEventListener("visibilitychange",s);let a=setInterval(()=>{document.hidden||eX()},c.fl);return()=>{clearInterval(a),document.removeEventListener("visibilitychange",s)}},[R,Y,O,et]),(0,l.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(R&&(F||W)){let e=await u(W,F);eI.current=e,e?(eA.current=0,L(!0),e_.current||(e_.current=!0,eO(!0))):(eA.current+=1,eA.current>=c.t6&&L(!1))}else eI.current=!1;if(Y&&ea){let e=await d(ea);eU.current=e,e?(e$.current=0,es(!0),eR.current||(eR.current=!0,eF(!0))):(e$.current+=1,e$.current>=c.t6&&es(!1))}else eU.current=!1}};if(!(R&&(F||W)||Y&&ea))return;e();let t=!Y||et;if((!R||O)&&t)return;let s=setInterval(e,c.RL);return()=>clearInterval(s)},[R,F,W,Y,ea,O,et]);let eQ=(0,l.useCallback)((e,t,s,a,l,n)=>{t.current?(s.current=0,a(!0),l.current||(l.current=!0,n(!0))):(s.current+=1,s.current>=c.t6&&a(!1))},[]),eX=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,a=t.tunnel?.tunnelUrl||"";q(a),z(t.tunnel?.publicUrl||""),D(s),eQ(null,eI,eA,L,e_,eO);let l=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,n=t.tailscale?.tunnelUrl||"";el(n),ee(l),eQ(null,eU,e$,es,eR,eF)}catch{}},eZ=async()=>{_(!0);try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e.ok){let t=await e.json();S(t.requireApiKey||!1),P(!1!==t.requireLogin),A(t.hasPassword||!1),I(t.tunnelDashboardAccess||!1)}if(t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,a=e.tunnel?.tunnelUrl||"";q(a),z(e.tunnel?.publicUrl||""),D(s),eQ(null,eI,eA,L,e_,eO);let l=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,n=e.tailscale?.tunnelUrl||"";el(n),ee(l),eQ(null,eU,e$,es,eR,eF)}}catch(e){console.log("Error loading settings:",e)}finally{_(!1)}},eG=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:e})})).ok&&I(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},eV=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:e})})).ok&&S(e)}catch(e){console.log("Error updating requireApiKey:",e)}},eY=async()=>{try{let e=await fetch("/api/keys"),t=await e.json();e.ok&&s(t.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{i(!1)}},e0=async(...e)=>{H(!0),B("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),s=Date.now();for(;Date.now()-s<c.Cp;){if(await new Promise(e=>setTimeout(e,c.Hx)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return D(!0),H(!1),B(""),!0;if((Date.now()-s)%1e4<c.Hx)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return Q({type:"error",message:"Tunnel process stopped unexpectedly."}),H(!1),B(""),!1}}catch{}}return Q({type:"error",message:"Tunnel created but not reachable. Please try again."}),H(!1),B(""),!1},e1=async()=>{Z(!1),H(!0),Q(null),B("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let s=await t.json();s.download?.downloading?B(`Downloading cloudflared... ${s.download.progress}%`):e&&B("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void Q({type:"error",message:s.error||"Failed to enable tunnel"});let a=s.tunnelUrl;if(!a)return void Q({type:"error",message:"No tunnel URL returned"});q(a),z(s.publicUrl||""),await e0(s.publicUrl,a)}catch(e){Q({type:"error",message:e.message})}finally{e=!1,H(!1),B("")}},e2=async()=>{H(!0),Q(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(D(!1),q(""),V(!1),Q({type:"success",message:"Tunnel disabled"})):Q({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){Q({type:"error",message:e.message})}finally{H(!1)}},e5=async()=>{ey(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return ey(t.installed),t}}catch{}return ey(!1),{installed:!1}},e4=async()=>{eg(!0),ed(null),ej([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:ew})});ev("");let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let n=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=n.pop()||"",n)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)ej(e=>[...e.slice(-50),a.message]);else if("done"===s){ey(!0),eg(!1),eS(!1),e7();return}else"error"===s&&ed({type:"error",message:a.error||"Install failed"})}}}catch(e){ed({type:"error",message:e.message})}finally{eg(!1)}},e3=async e=>{eo("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<c.Cp;){await new Promise(e=>setTimeout(e,c.Hx));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},e6=(e,t)=>{em(e),ep(t)},e8=()=>{em(""),ep("")},e7=async()=>{eS(!1),eN(!0),ei(!0),ed(null),eo("Connecting..."),e8();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){el(t.tunnelUrl||"");let e=await e3(t.tunnelUrl);ee(!0),ed(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){e6(t.authUrl,"Open Login Page"),eo('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){e8(),eo("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){el(t.tunnelUrl||"");let e=await e3(t.tunnelUrl);ee(!0),ed(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await e9(t.enableUrl):ed({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}e8(),ed({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await e9(t.enableUrl);ed({type:"error",message:t.error||"Failed to connect"})}catch(e){ed({type:"error",message:e.message})}finally{ei(!1),eN(!1),eo(""),e8()}},e9=async e=>{e6(e,"Open Funnel Settings"),eo('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){e8(),el(t.tunnelUrl||"");let e=await e3(t.tunnelUrl);ee(!0),ed(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){e8(),ed({type:"error",message:t.error});return}}catch{}}e8(),ed({type:"error",message:"Timed out waiting for Funnel to be enabled."})},te=async()=>{ei(!0),ed(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(ee(!1),el(""),eP(!1),ed({type:"success",message:"Tailscale disabled"})):ed({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){ed({type:"error",message:e.message})}finally{ei(!1)}},tt=async()=>{ed(null),ej([]);let e=await e5();e?.installed&&e?.hasCachedPassword?e7():eS(!0)},ts=async()=>{if(b.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:b})}),t=await e.json();e.ok&&(v(t.key),await eY(),j(""),p(!1))}catch(e){console.log("Error creating key:",e)}},ta=async e=>{N({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{N(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(s(t.filter(t=>t.id!==e)),eW(t=>{let s=new Set(t);return s.delete(e),s}))}catch(e){console.log("Error deleting key:",e)}}})},tl=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error toggling key:",e)}},[tn,ti]=(0,l.useState)("/v1");if((0,l.useEffect)(()=>{ti(`${window.location.origin}/v1`)},[]),n)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]});let tr=(e,t="Stop")=>(0,a.jsx)("button",{onClick:e,className:"p-2 hover:bg-red-500/10 text-red-500 transition-colors shrink-0",title:t,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})});return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(r.Zp,{padding:"none",children:[(0,a.jsx)("div",{className:"flex items-start justify-between gap-4 px-6 py-4 border-b border-border-subtle",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-base font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"api"}),"API Endpoint"]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"OpenAI-compatible base URL. Point any client here."})]})}),(0,a.jsxs)("div",{className:"px-6 py-5",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(m,{label:"Local",active:!0,url:tn,copyId:"local_url",copied:eH,onCopy:eJ}),R&&!K&&O?(0,a.jsx)(m,{label:"Tunnel",active:!0,url:`${W||F}/v1`,copyId:"tunnel_url",copied:eH,onCopy:eJ,actions:tr(()=>V(!0),"Disable Tunnel")}):!R||K||O?K?(0,a.jsx)(m,{label:"Tunnel",status:{tone:"pending",spin:!0,message:J||"Creating tunnel…"},actions:tr(()=>{H(!1),B("")})}):M?.type==="error"?(0,a.jsx)(m,{label:"Tunnel",status:{tone:"error",icon:"error",message:M.message},actions:(0,a.jsx)(r.$n,{size:"sm",variant:"secondary",icon:"cloud_upload",onClick:()=>Z(!0),children:"Retry"})}):U?(0,a.jsx)(m,{label:"Tunnel",status:{tone:"pending",spin:!0,message:"Checking…"},actions:tr(()=>_(!1))}):(0,a.jsx)(m,{label:"Tunnel",status:{tone:"pending",icon:"cloud_off",message:"Not enabled — expose this endpoint over the public internet."},actions:(0,a.jsx)(r.$n,{size:"sm",variant:"secondary",icon:"cloud_upload",onClick:()=>{eB?Q({type:"error",message:`Security required: ${eM}`}):C?Z(!0):Q({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"})}):(0,a.jsx)(m,{label:"Tunnel",active:!0,status:{tone:"pending",spin:!0,message:eD?"Reconnecting…":"Checking…"},actions:tr(()=>V(!0),"Disable Tunnel")}),Y&&!en&&et?(0,a.jsx)(m,{label:"Tailscale",active:!0,url:`${ea}/v1`,copyId:"ts_url",copied:eH,onCopy:eJ,actions:tr(()=>eP(!0),"Disable Tailscale")}):!Y||en||et?en||ek?(0,a.jsx)(m,{label:"Tailscale",status:{tone:"pending",spin:!0,message:er||"Connecting…"},actions:(0,a.jsxs)(a.Fragment,{children:[eu&&(0,a.jsx)(r.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eu,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:ex||"Open"}),tr(()=>{ei(!1),eN(!1),eo(""),e8()})]})}):ec?.type==="error"?(0,a.jsx)(m,{label:"Tailscale",status:{tone:"error",icon:"error",message:ec.message},actions:(0,a.jsx)(r.$n,{size:"sm",variant:"secondary",icon:"vpn_lock",onClick:tt,children:"Retry"})}):(0,a.jsx)(m,{label:"Tailscale",status:{tone:"pending",icon:"vpn_key_off",message:"Not enabled — reach this endpoint over your private tailnet."},actions:(0,a.jsx)(r.$n,{size:"sm",variant:"secondary",icon:"vpn_lock",onClick:()=>{eB?ed({type:"error",message:`Security required: ${eM}`}):tt()},children:"Enable"})}):(0,a.jsx)(m,{label:"Tailscale",active:!0,status:{tone:"pending",spin:!0,message:eL?"Reconnecting…":"Checking…"},actions:tr(()=>eP(!0),"Disable Tailscale")})]}),eB&&!R&&!Y&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(f,{message:eM,action:{label:"Open settings",href:"/dashboard/profile"}})}),(R||Y)&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!C&&(0,a.jsx)(f,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!T||!E)&&(0,a.jsx)(f,{message:T?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:T?"Change password":"Enable",href:"/dashboard/profile"}})]}),(R||Y)&&(0,a.jsxs)("div",{className:"mt-5 pt-4 border-t border-border-subtle flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,a.jsx)(y,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Login is still required. Leave off to expose only the API."})]}),(0,a.jsx)(r.lM,{checked:$,onChange:()=>eG(!$)})]})]})]}),(0,a.jsxs)(r.Zp,{id:"require-api-key",padding:"none",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4 px-6 py-4 border-b border-border-subtle",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-base font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"vpn_key"}),"API Keys",t.length>0&&(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted bg-surface-2 px-1.5 py-0.5",children:t.length})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Credentials clients send as ",(0,a.jsx)("code",{className:"font-mono",children:"Authorization: Bearer …"})]})]}),(0,a.jsx)(r.$n,{size:"sm",icon:"add",onClick:()=>p(!0),children:"Create Key"})]}),(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4 px-6 py-4 border-b border-border-subtle bg-surface-2/30",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Require API key"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Requests without a valid key will be rejected"})]}),(0,a.jsx)(r.lM,{checked:C,onChange:()=>eV(!C)})]}),ez&&!C&&(0,a.jsx)("div",{className:"px-6 pt-4",children:(0,a.jsx)(f,{message:"Endpoint is exposed without an API key."})}),0===t.length?(0,a.jsxs)("div",{className:"text-center px-6 py-14",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-12 h-12 bg-surface-2 text-text-muted mb-3",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"vpn_key"})}),(0,a.jsx)("p",{className:"text-text-main font-medium text-sm mb-1",children:"No API keys yet"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mb-4",children:"Create your first API key to get started"}),(0,a.jsx)(r.$n,{size:"sm",icon:"add",onClick:()=>p(!0),children:"Create Key"})]}):(0,a.jsx)("div",{className:"flex flex-col px-6",children:t.map(e=>{var t;return(0,a.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e.name}),!1===e.isActive&&(0,a.jsx)("span",{className:"shrink-0 text-[10px] font-semibold uppercase tracking-wide px-1.5 py-0.5 bg-yellow-500/15 text-yellow-700 dark:text-yellow-400",children:"Paused"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono truncate",children:eq.has(e.id)?e.key:(t=e.key)&&!(t.length<=10)?t.slice(0,6)+"•".repeat(t.length-10)+t.slice(-4):t||""}),(0,a.jsx)("button",{onClick:()=>{var t;return t=e.id,void eW(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"shrink-0 p-1 hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:eq.has(e.id)?"Hide key":"Show key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eq.has(e.id)?"visibility_off":"visibility"})}),(0,a.jsx)("button",{onClick:()=>eJ(e.key,e.id),title:"Copy key",className:"shrink-0 p-1 hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eH===e.id?"check":"content_copy"})})]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-subtle mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(r.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?N({title:"Pause API Key",message:`Pause API key "${e.name}"?
2
2
 
3
- This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{N(null),tl(e.id,t)}}):tl(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,a.jsx)("button",{onClick:()=>ta(e.id),className:"p-2 hover:bg-red-500/10 text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(r.aF,{isOpen:x,title:"Create API Key",size:"sm",onClose:()=>{p(!1),j("")},footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.$n,{onClick:()=>{p(!1),j("")},variant:"ghost",children:"Cancel"}),(0,a.jsx)(r.$n,{onClick:ts,disabled:!b.trim(),children:"Create"})]}),children:(0,a.jsx)(r.pd,{label:"Key Name",value:b,onChange:e=>j(e.target.value),onKeyDown:e=>{"Enter"===e.key&&b.trim()&&ts()},placeholder:"Production Key",hint:"A label to help you identify this key later.",autoFocus:!0})}),(0,a.jsx)(r.aF,{isOpen:!!w,title:"API Key Created",onClose:()=>v(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.pd,{value:w||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(r.$n,{variant:"secondary",icon:"created_key"===eH?"check":"content_copy",onClick:()=>eJ(w,"created_key"),children:"created_key"===eH?"Copied!":"Copy"})]}),(0,a.jsx)(r.$n,{onClick:()=>v(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(r.aF,{isOpen:X,title:"Enable Tunnel",onClose:()=>Z(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local 9Router to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:c.oX.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:e1,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(r.$n,{onClick:()=>Z(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(r.aF,{isOpen:G,title:"Disable Tunnel",onClose:()=>!K&&V(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:e2,fullWidth:!0,disabled:K,variant:"danger",children:K?"Disabling...":"Disable"}),(0,a.jsx)(r.$n,{onClick:()=>V(!1),variant:"ghost",fullWidth:!0,disabled:K,children:"Cancel"})]})]})}),(0,a.jsx)(r.aF,{isOpen:eC,title:"Tailscale Funnel",onClose:()=>{ef||(eS(!1),ev(""),ed(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===eh&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===eh&&!ef&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:e4,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(r.$n,{onClick:()=>eS(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ef&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eb.length>0&&(0,a.jsx)("div",{ref:eE,className:"bg-black/5 dark:bg-white/5 p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eb.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===eh&&!ef&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:()=>e7(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(r.$n,{onClick:()=>eS(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ec&&(0,a.jsx)(h,{status:ec})]})}),(0,a.jsx)(r.aF,{isOpen:eT,title:"Disable Tailscale",onClose:()=>!en&&eP(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:te,fullWidth:!0,disabled:en,variant:"danger",children:en?"Disabling...":"Disable"}),(0,a.jsx)(r.$n,{onClick:()=>eP(!1),variant:"ghost",fullWidth:!0,disabled:en,children:"Cancel"})]})]})}),(0,a.jsx)(r.uo,{isOpen:!!k,onClose:()=>N(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}g.propTypes={machineId:i().string.isRequired}}}]);
3
+ This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{N(null),tl(e.id,t)}}):tl(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,a.jsx)("button",{onClick:()=>ta(e.id),className:"p-2 hover:bg-red-500/10 text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(r.aF,{isOpen:x,title:"Create API Key",size:"sm",onClose:()=>{p(!1),j("")},footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.$n,{onClick:()=>{p(!1),j("")},variant:"ghost",children:"Cancel"}),(0,a.jsx)(r.$n,{onClick:ts,disabled:!b.trim(),children:"Create"})]}),children:(0,a.jsx)(r.pd,{label:"Key Name",value:b,onChange:e=>j(e.target.value),onKeyDown:e=>{"Enter"===e.key&&b.trim()&&ts()},placeholder:"Production Key",hint:"A label to help you identify this key later.",autoFocus:!0})}),(0,a.jsx)(r.aF,{isOpen:!!w,title:"API Key Created",onClose:()=>v(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.pd,{value:w||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(r.$n,{variant:"secondary",icon:"created_key"===eH?"check":"content_copy",onClick:()=>eJ(w,"created_key"),children:"created_key"===eH?"Copied!":"Copy"})]}),(0,a.jsx)(r.$n,{onClick:()=>v(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(r.aF,{isOpen:X,title:"Enable Tunnel",onClose:()=>Z(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local PolyRouter to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:c.oX.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:e1,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(r.$n,{onClick:()=>Z(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(r.aF,{isOpen:G,title:"Disable Tunnel",onClose:()=>!K&&V(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:e2,fullWidth:!0,disabled:K,variant:"danger",children:K?"Disabling...":"Disable"}),(0,a.jsx)(r.$n,{onClick:()=>V(!1),variant:"ghost",fullWidth:!0,disabled:K,children:"Cancel"})]})]})}),(0,a.jsx)(r.aF,{isOpen:eC,title:"Tailscale Funnel",onClose:()=>{ef||(eS(!1),ev(""),ed(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===eh&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===eh&&!ef&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:e4,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(r.$n,{onClick:()=>eS(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ef&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eb.length>0&&(0,a.jsx)("div",{ref:eE,className:"bg-black/5 dark:bg-white/5 p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eb.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===eh&&!ef&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:()=>e7(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(r.$n,{onClick:()=>eS(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ec&&(0,a.jsx)(h,{status:ec})]})}),(0,a.jsx)(r.aF,{isOpen:eT,title:"Disable Tailscale",onClose:()=>!en&&eP(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:te,fullWidth:!0,disabled:en,variant:"danger",children:en?"Disabling...":"Disable"}),(0,a.jsx)(r.$n,{onClick:()=>eP(!1),variant:"ghost",fullWidth:!0,disabled:en,children:"Cancel"})]})]})}),(0,a.jsx)(r.uo,{isOpen:!!k,onClose:()=>N(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}g.propTypes={machineId:i().string.isRequired}}}]);
@@ -4,4 +4,4 @@
4
4
  `,children:[y.includes(e.name)&&(0,s.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),e.name]},e.id)})})]}),Object.entries(K).map(([e,t])=>(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,s.jsx)(o.A,{src:`/providers/${e}.png`,alt:t.name,size:14,fallbackText:(t.name||e).slice(0,2).toUpperCase(),fallbackColor:t.color}),(0,s.jsx)("span",{className:"text-xs font-medium text-primary",children:t.name}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",t.models.length,")"]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.models.map(e=>{let t=i===e.value,a=e.isPlaceholder;return(0,s.jsx)("button",{onClick:()=>B(e),title:a?"Select to pre-fill, then edit model ID in the input":void 0,className:`
5
5
  px-2 py-1 text-xs font-medium transition-all border hover:cursor-pointer
6
6
  ${a?"border-dashed border-border text-text-muted hover:border-primary/50 hover:text-primary bg-surface italic":t?"bg-primary text-white border-primary":y.includes(e.value)?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
7
- `,children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[y.includes(e.value)&&!a&&(0,s.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),a?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"edit"}),e.name]}):e.isCustom?(0,s.jsxs)(s.Fragment,{children:[e.name,(0,s.jsx)("span",{className:"text-[9px] opacity-60 font-normal",children:"custom"}),(0,s.jsx)(c.default,{caps:N(e.value)})]}):(0,s.jsxs)(s.Fragment,{children:[e.name,(0,s.jsx)(c.default,{caps:N(e.value)})]})]})},e.value)})})]},e)),0===Object.keys(K).length&&0===U.length&&(0,s.jsxs)("div",{className:"text-center py-4 text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-2xl mb-1 block",children:"search_off"}),(0,s.jsx)("p",{className:"text-xs",children:"No models found"})]})]})]})}h.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onSelect:i().func.isRequired,onDeselect:i().func,selectedModel:i().string,activeProviders:i().arrayOf(i().shape({provider:i().string.isRequired})),title:i().string,modelAliases:i().object,kindFilter:i().string,addedModelValues:i().arrayOf(i().string),closeOnSelect:i().bool}},73579:(e,t,a)=>{a.d(t,{default:()=>u});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(81127),o=a(11910),c=a(92542),d=a(56061),m=a(88105),x=a(98);function u({isOpen:e,connection:t,proxyPools:a,onSave:n,onClose:i}){let[p,h]=(0,r.useState)({name:"",priority:1,apiKey:""}),[f,g]=(0,r.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[b,v]=(0,r.useState)({accountId:""}),[y,j]=(0,r.useState)(""),[k,N]=(0,r.useState)(!1),[w,C]=(0,r.useState)(null),[S,O]=(0,r.useState)(!1),[I,T]=(0,r.useState)(null),[P,F]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(t){h({name:t.name||"",priority:t.priority||1,apiKey:""}),"azure"===t.provider&&t.providerSpecificData&&g({azureEndpoint:t.providerSpecificData.azureEndpoint||"",apiVersion:t.providerSpecificData.apiVersion||"2024-10-01-preview",deployment:t.providerSpecificData.deployment||"",organization:t.providerSpecificData.organization||""}),"cloudflare-ai"===t.provider&&t.providerSpecificData&&v({accountId:t.providerSpecificData.accountId||""});let e=m.Q2?.[t.provider];e?.regions&&j(t.providerSpecificData?.region||e.defaultRegion||e.regions[0]?.id||""),C(null),T(null)}},[t]);let W=t?.authType==="oauth",A=t?.provider==="azure",$=t?.provider==="cloudflare-ai",R=!!t&&((0,m.mq)(t.provider)||(0,m.gb)(t.provider)),_=t&&m.Q2?.[t.provider]?.regions||null,E=()=>{if(_&&y)return{...t?.providerSpecificData||{},region:y}},q=async()=>{if(t?.provider){N(!0),C(null);try{let e=await fetch(`/api/providers/${t.id}/test`,{method:"POST"}),a=await e.json();C(a.valid?"success":"failed")}catch{C("failed")}finally{N(!1)}}},D=async()=>{if(t?.provider&&p.apiKey){O(!0),T(null);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:p.apiKey,...A?{providerSpecificData:f}:{},...$?{providerSpecificData:b}:{},..._?{providerSpecificData:E()}:{}})}),a=await e.json();T(a.valid?"success":"failed")}catch{T("failed")}finally{O(!1)}}},L=async()=>{if(t){F(!0);try{let e={name:p.name,priority:p.priority};if(!W&&p.apiKey){e.apiKey=p.apiKey;let a="success"===I;if(!a)try{O(!0),T(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:p.apiKey,...A?{providerSpecificData:f}:{},...$?{providerSpecificData:b}:{},..._?{providerSpecificData:E()}:{}})});a=!!(await e.json()).valid,T(a?"success":"failed")}catch{T("failed")}finally{O(!1)}a&&(e.testStatus="active",e.lastError=null,e.lastErrorAt=null)}A&&(e.providerSpecificData={azureEndpoint:f.azureEndpoint,apiVersion:f.apiVersion,deployment:f.deployment,organization:f.organization}),$&&(e.providerSpecificData={accountId:b.accountId}),_&&y&&(e.providerSpecificData=E()),await n(e)}finally{F(!1)}}};return t?(0,s.jsx)(l.default,{isOpen:e,title:"Edit Connection",onClose:i,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(o.default,{label:"Name",value:p.name,onChange:e=>h({...p,name:e.target.value}),placeholder:W?"Account name":"Production Key"}),W&&t.email&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-3 ",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted mb-1",children:"Email"}),(0,s.jsx)("p",{className:"font-medium",children:t.email})]}),(0,s.jsx)(o.default,{label:"Priority",type:"number",value:p.priority,onChange:e=>h({...p,priority:Number.parseInt(e.target.value,10)||1})}),!W&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(o.default,{label:"API Key",type:"password",value:p.apiKey,onChange:e=>h({...p,apiKey:e.target.value}),placeholder:"Enter new API key",hint:"Leave blank to keep the current API key.",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(c.default,{onClick:D,disabled:!p.apiKey||S||P,variant:"secondary",children:S?"Checking...":"Check"})})]}),I&&(0,s.jsx)(d.default,{variant:"success"===I?"success":"error",children:"success"===I?"Valid":"Invalid"})]}),A&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(o.default,{label:"Azure Endpoint",value:f.azureEndpoint,onChange:e=>g({...f,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com",hint:"Your Azure OpenAI resource endpoint URL"}),(0,s.jsx)(o.default,{label:"Deployment Name",value:f.deployment,onChange:e=>g({...f,deployment:e.target.value}),placeholder:"gpt-4",hint:"The deployment name in your Azure resource"}),(0,s.jsx)(o.default,{label:"API Version",value:f.apiVersion,onChange:e=>g({...f,apiVersion:e.target.value}),placeholder:"2024-10-01-preview",hint:"Azure OpenAI API version to use"}),(0,s.jsx)(o.default,{label:"Organization",value:f.organization,onChange:e=>g({...f,organization:e.target.value}),placeholder:"Organization ID",hint:"Required for billing"})]})]}),_&&(0,s.jsx)(x.default,{label:"Region",value:y,onChange:e=>j(e.target.value),options:_.map(e=>({value:e.id,label:e.label}))}),!R&&!A&&!$&&(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(c.default,{onClick:q,variant:"secondary",disabled:k,children:k?"Testing...":"Test Connection"}),w&&(0,s.jsx)(d.default,{variant:"success"===w?"success":"error",children:"success"===w?"Valid":"Failed"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.default,{onClick:L,fullWidth:!0,disabled:P,children:P?"Saving...":"Save"}),(0,s.jsx)(c.default,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}u.propTypes={isOpen:i().bool.isRequired,connection:i().shape({id:i().string,name:i().string,email:i().string,priority:i().number,authType:i().string,provider:i().string,providerSpecificData:i().object}),proxyPools:i().arrayOf(i().shape({id:i().string,name:i().string})),onSave:i().func.isRequired,onClose:i().func.isRequired}},80752:(e,t,a)=>{a.d(t,{default:()=>c});var s=a(95155),r=a(12115),n=a(1620),i=a(97556),l=a(81127),o=a(39403);function c({onLogout:e}){let[t,a]=(0,r.useState)(!1),[d,m]=(0,r.useState)(!1),[x,u]=(0,r.useState)(!1),{toggleTheme:p,isDark:h}=(0,n.D)(),f=async()=>{u(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}u(!1),m(!1)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.default,{trigger:(0,s.jsx)("button",{className:"flex items-center justify-center p-2 text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all rounded-[var(--radius-brand)]",title:"Menu",children:(0,s.jsx)("span",{className:"material-symbols-outlined",children:"grid_view"})}),children:[(0,s.jsx)(o.DropdownItem,{icon:"history",label:"Change Log",onClick:()=>a(!0)}),(0,s.jsx)(o.DropdownItem,{icon:h?"light_mode":"dark_mode",label:"Theme",onClick:p}),(0,s.jsx)(o.DropdownItem,{icon:"power_settings_new",label:"Shutdown",danger:!0,onClick:()=>m(!0)}),(0,s.jsx)(o.DropdownItem,{icon:"logout",label:"Logout",danger:!0,onClick:e})]}),(0,s.jsx)(i.default,{isOpen:t,onClose:()=>a(!1)}),(0,s.jsx)(l.ConfirmModal,{isOpen:d,onClose:()=>m(!1),onConfirm:f,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:x})]})}},91450:(e,t,a)=>{a.d(t,{default:()=>l});var s=a(95155),r=a(14051),n=a.n(r),i=a(38587);function l({children:e}){return(0,s.jsxs)("div",{className:"min-h-screen flex flex-col relative bg-bg transition-colors duration-500 overflow-x-hidden selection:bg-primary/20 selection:text-primary",children:[(0,s.jsx)("div",{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-primary/5 dark:bg-primary/5 rounded-full blur-[100px] pointer-events-none z-0"}),(0,s.jsx)("div",{className:"fixed bottom-0 right-0 w-[600px] h-[600px] bg-green-200/20 dark:bg-green-900/10 rounded-full blur-[120px] pointer-events-none z-0 translate-y-1/3 translate-x-1/3"}),(0,s.jsx)("div",{className:"absolute top-6 right-6 z-20",children:(0,s.jsx)(i.default,{variant:"card"})}),(0,s.jsx)("main",{className:"flex-1 flex flex-col items-center justify-center p-4 sm:p-6 z-10 w-full h-full",children:e})]})}l.propTypes={children:n().node.isRequired}},92173:(e,t,a)=>{a.d(t,{default:()=>d});var s=a(95155),r=a(98500),n=a.n(r),i=a(90620);let l=[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"Changelog",href:"#"}],o=[{label:"Documentation",href:"#"},{label:"API Reference",href:"#"},{label:"Help Center",href:"#"}],c=[{label:"About",href:"#"},{label:"Blog",href:"#"},{label:"Contact",href:"#"}];function d(){return(0,s.jsx)("footer",{className:"bg-bg border-t border-border pt-16 pb-12",children:(0,s.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-10 mb-12",children:[(0,s.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,s.jsx)("div",{className:"size-6 text-primary",children:(0,s.jsx)("svg",{className:"w-full h-full",fill:"currentColor",viewBox:"0 0 48 48",children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M12.0799 24L4 19.2479L9.95537 8.75216L18.04 13.4961L18.0446 4H29.9554L29.96 13.4961L38.0446 8.75216L44 19.2479L35.92 24L44 28.7521L38.0446 39.2479L29.96 34.5039L29.9554 44H18.0446L18.04 34.5039L9.95537 39.2479L4 28.7521L12.0799 24Z",fillRule:"evenodd"})})}),(0,s.jsx)("span",{className:"text-xl font-bold text-text-main",children:i.vQ.name})]}),(0,s.jsx)("p",{className:"text-text-muted mb-6 max-w-sm font-light",children:"The unified interface for modern AI infrastructure. Secure, observable, and scalable."}),(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"Twitter",children:(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"})})}),(0,s.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"GitHub",children:(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"})})})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Product"}),(0,s.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:l.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)(n(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Resources"}),(0,s.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:o.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)(n(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Company"}),(0,s.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:c.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)(n(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]})]}),(0,s.jsxs)("div",{className:"border-t border-border pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["\xa9 ",new Date().getFullYear()," ",i.vQ.name," Inc. All rights reserved."]}),(0,s.jsxs)("div",{className:"flex gap-6 text-sm text-text-muted",children:[(0,s.jsx)(n(),{href:"#",className:"hover:text-primary transition-colors",children:"Privacy Policy"}),(0,s.jsx)(n(),{href:"#",className:"hover:text-primary transition-colors",children:"Terms of Service"})]})]})]})})}},92613:(e,t,a)=>{a.d(t,{default:()=>m});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(35497),o=a(11059);let c=e=>{let t="";for(let a of e)t+=String.fromCharCode(a);return globalThis.btoa(t).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")};async function d(e,t){let a=await e.text();try{return JSON.parse(a)}catch{let s=e.headers.get("content-type")||"unknown content type",r=a.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim().slice(0,180);throw Error(`${t} returned HTTP ${e.status} (${s}): ${r||"empty response"}`)}}function m({isOpen:e,provider:t,providerInfo:a,onSuccess:n,onClose:i,oauthMeta:x,idcConfig:u}){let[p,h]=(0,r.useState)("waiting"),[f,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(""),[y,j]=(0,r.useState)(null),[k,N]=(0,r.useState)(!1),[w,C]=(0,r.useState)(null),[S,O]=(0,r.useState)(!1),I=(0,r.useRef)(null),T=(0,r.useRef)(!1),P=(0,r.useRef)(!1),{copied:F,copy:W}=(0,o.C)(),[A,$]=(0,r.useState)(!1),[R,_]=(0,r.useState)("/callback?code=..."),E=(0,r.useRef)(!1);(0,r.useEffect)(()=>{$("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),_(`${window.location.origin}/callback?code=...`)},[]);let q=(0,r.useCallback)(async(e,a)=>{if(f)try{let s=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:f.redirectUri,codeVerifier:f.codeVerifier,state:a,...x?{meta:x}:{}})}),r=await d(s,"OAuth exchange");if(!s.ok)throw Error(r.error);h("success"),n?.()}catch(e){j(e.message),h("error")}},[f,t,n,x]),D=(0,r.useCallback)(async e=>{if(f?.state)try{let t=await fetch("/api/oauth/xai/manual-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,state:f.state})}),a=await d(t,"OAuth manual-code exchange");if(!t.ok)throw Error(a.error);h("success"),n?.()}catch(e){j(e.message),h("error")}},[f,n]),L=(0,r.useCallback)(async(e,a,s,r,i)=>{T.current=!1,O(!0);let l=Date.now()+(Number.isFinite(i)&&i>0?i:12e4);for(;Date.now()<l;){if(T.current){console.log("[OAuthModal] Polling aborted"),O(!1);return}if(await new Promise(e=>setTimeout(e,1e3*s)),T.current){console.log("[OAuthModal] Polling aborted after sleep"),O(!1);return}try{let i=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:a,extraData:r})}),l=await d(i,"OAuth device-code poll");if(l.success){T.current=!0,h("success"),O(!1),n?.();return}if("expired_token"===l.error||"access_denied"===l.error)throw Error(l.errorDescription||l.error);"slow_down"===l.error&&(s=Math.min(s+5,30))}catch(e){j(e.message),h("error"),O(!1);return}}j("Authorization timeout"),h("error"),O(!1)},[t,n]),M=(0,r.useCallback)(async()=>{if(t)try{let a;if(j(null),["github","qwen","kiro","kimi","kimi-coding","kilocode","codebuddy-cn","qoder","grok-cli"].includes(t)){N(!0),h("waiting");let e=new URL(`/api/oauth/${t}/device-code`,window.location.origin);"kiro"===t&&u?.startUrl&&(e.searchParams.set("start_url",u.startUrl),u.region&&e.searchParams.set("region",u.region),e.searchParams.set("auth_method","idc"));let a=await fetch(e.toString()),s=await d(a,"OAuth device-code request");if(!a.ok)throw Error(s.error);C(s);let r=s.verification_uri_complete||s.verification_uri;r&&window.open(r,"_blank","noopener,noreferrer");let n="kiro"===t?{_clientId:s._clientId,_clientSecret:s._clientSecret,_region:s._region,_authMethod:s._authMethod,_startUrl:s._startUrl}:"qoder"===t?{_qoderNonce:s._qoderNonce,_qoderMachineId:s._qoderMachineId,_qoderVerifier:s.codeVerifier}:"kimi"===t||"kimi-coding"===t?{_kimiDeviceId:s._kimiDeviceId}:null;L(s.device_code,s.codeVerifier,s.interval||5,n,Number.isFinite(s.expires_in)&&s.expires_in>0?1e3*s.expires_in:void 0);return}let s=window.location.port||("https:"===window.location.protocol?"443":"80");a="codex"===t?"http://localhost:1455/auth/callback":"xai"===t?"http://127.0.0.1:56121/callback":`http://localhost:${s}/callback`;let r=new URL(`/api/oauth/${t}/authorize`,window.location.origin);r.searchParams.set("redirect_uri",a),x&&Object.entries(x).forEach(([e,t])=>{t&&r.searchParams.set(e,t)});let n=await fetch(r.toString()),i=await d(n,"OAuth authorize");if(!n.ok)throw Error(i.error);if("codex"===t){var e;let t,a,s,r=i.state;e=`${window.location.origin}/callback`,t=new Uint8Array(24),globalThis.crypto.getRandomValues(t),a={type:"openai-oauth-callback",version:1,nonce:c(t),callbackUrl:e,...r?{appState:r}:{}},i.state=`oo2_${s=JSON.stringify(a),c(new TextEncoder().encode(s))}`;let n=new URL(i.authUrl);n.searchParams.set("state",i.state),i.authUrl=n.toString()}let l=!1,o=!1;if("codex"===t)try{let e=new URL("/api/oauth/codex/start-proxy",window.location.origin);e.searchParams.set("app_port",s),e.searchParams.set("state",i.state),e.searchParams.set("code_verifier",i.codeVerifier),e.searchParams.set("redirect_uri",a);let t=await fetch(e.toString()),r=await d(t,"Codex callback proxy");l=r.success,o=!!r.serverSide}catch{l=!1}let m=!1,p=!1;if("xai"===t)try{let e=new URL("/api/oauth/xai/start-proxy",window.location.origin);e.searchParams.set("app_port",s),e.searchParams.set("state",i.state),e.searchParams.set("code_verifier",i.codeVerifier),e.searchParams.set("redirect_uri",a);let t=await fetch(e.toString()),r=await d(t,"xAI callback proxy");if(m=r.success,p=!!r.serverSide,!m&&"port_busy"===r.reason)throw Error("Port 56121 in use; close the conflicting process and retry")}catch(e){if(e?.message)throw e;m=!1}if(g({...i,redirectUri:a,codexServerSide:o,xaiServerSide:p}),!i.authUrl){if("device_code"===i.flowType)throw Error(`Provider ${t} uses device-code login but is not wired in the OAuth modal device-code list`);throw Error("No authorization URL returned from OAuth provider")}"codex"===t&&l||"xai"===t&&m||A&&"codex"!==t&&"xai"!==t?(h("waiting"),I.current=window.open(i.authUrl,"oauth_popup","width=600,height=700"),I.current||h("input")):(h("input"),window.open(i.authUrl,"_blank"))}catch(e){j(e.message),h("error")}},[t,A,L,x,u]);(0,r.useEffect)(()=>{e&&t?P.current||(P.current=!0,g(null),v(""),j(null),N(!1),C(null),O(!1),T.current=!1,M()):e||(T.current=!0,P.current=!1,"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t&&fetch("/api/oauth/xai/stop-proxy").catch(()=>{}))},[e,t,M]),(0,r.useEffect)(()=>{let e=f?.codexServerSide?"codex":f?.xaiServerSide?"xai":null;if(!e||!f?.state||E.current)return;let t=!1,a=0,s=async()=>{if(!t&&!E.current){a+=1;try{let a=await fetch(`/api/oauth/${e}/poll-status?state=${encodeURIComponent(f.state)}`),s=await d(a,"OAuth status poll");if(t||E.current)return;if("done"===s.status){E.current=!0,h("success"),n?.();return}if("error"===s.status){E.current=!0,j(s.error||"Authentication failed"),h("error");return}}catch{}if(a>=200){E.current=!0,j("Authentication timeout"),h("error");return}setTimeout(s,1500)}};return setTimeout(s,1500),()=>{t=!0}},[f,n]),(0,r.useEffect)(()=>{let e;if(!f)return;E.current=!1;let a=async e=>{if(E.current)return;let{code:a,token:s,state:r,error:n,errorDescription:i}=e;if(n){E.current=!0,j(i||n),h("error");return}if(s||a){if("codex"===t&&r!==f.state){E.current=!0,j("OpenAI OAuth callback state did not match"),h("error");return}E.current=!0,await q(s||a,r)}},s=e=>{let t=e.origin.includes("localhost")||e.origin.includes("127.0.0.1"),s=e.origin===window.location.origin;(t||s)&&e.data?.type==="oauth_callback"&&a(e.data.data)};window.addEventListener("message",s);try{(e=new BroadcastChannel("oauth_callback")).onmessage=e=>a(e.data)}catch(e){console.log("BroadcastChannel not supported")}let r=e=>{if("oauth_callback"===e.key&&e.newValue)try{let t=JSON.parse(e.newValue);a(t),localStorage.removeItem("oauth_callback")}catch(e){console.log("Failed to parse localStorage data")}};window.addEventListener("storage",r);try{let e=localStorage.getItem("oauth_callback");if(e){let t=JSON.parse(e);t.timestamp&&Date.now()-t.timestamp<3e4&&a(t),localStorage.removeItem("oauth_callback")}}catch{}return()=>{window.removeEventListener("message",s),window.removeEventListener("storage",r),e&&e.close()}},[f,q,t]);let z=async()=>{try{j(null);let e=b.trim();if(e.startsWith("eyJ")&&e.includes("."))return void await q(e,null);if("xai"===t&&e&&!e.includes("://")&&!e.includes("?")&&!e.includes("code="))return void await D(e);if("kimchi"===t&&e&&!e.includes("://")&&!e.includes("?"))return void await q(e,null);let a=new URL(e),s=a.searchParams.get("code"),r=a.searchParams.get("token"),n=a.searchParams.get("state"),i=a.searchParams.get("error");if(i)throw Error(a.searchParams.get("error_description")||i);if(!s&&!r)throw Error("xai"===t?"Paste the callback URL or copied xAI code":"kimchi"===t?"No Kimchi token found in URL":"No authorization code found in URL");await q(r||s,n)}catch(e){j(e.message),h("error")}},U=(0,r.useCallback)(()=>{"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t&&fetch("/api/oauth/xai/stop-proxy").catch(()=>{}),i()},[i,t]);if(!t||!a)return null;let K="xai"===t,B="kimchi"===t,V=w?.verification_uri_complete||w?.verification_uri||"",J=K?"Connect Grok Build OAuth":`Connect ${a.name}`,G=K?"http://127.0.0.1:56121/callback?code=... or copied code":B?`${R.replace("code=...","token=...")} or copied token`:R;return(0,s.jsx)(l.aF,{isOpen:e,title:J,onClose:U,size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[("waiting"===p||"input"===p)&&!k&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border border-border bg-sidebar/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-primary animate-spin",children:"progress_activity"}),(0,s.jsx)("span",{className:"text-sm",children:K?"Waiting for Grok Build OAuth…":"Waiting for popup authorization…"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 my-1",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-border"}),(0,s.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wider",children:"Or paste callback URL manually"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-border"})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 1: Open this ",K?"Grok Build OAuth URL":"URL"," in your browser"]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.pd,{value:f?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,s.jsx)(l.$n,{variant:"secondary",icon:"auth_url"===F?"check":"content_copy",onClick:()=>W(f?.authUrl,"auth_url"),disabled:!f?.authUrl,children:"Copy"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 2: Paste the ","xai"===t?"callback URL or copied code":B?"callback URL or copied token":"callback URL"," here"]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"xai"===t?"If xAI shows a code instead of redirecting, paste that code here.":B?"After authorization, copy the full callback URL or token from your browser.":"After authorization, copy the full URL from your browser."}),(0,s.jsx)(l.pd,{value:b,onChange:e=>v(e.target.value),placeholder:G,className:"font-mono text-xs"})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:z,fullWidth:!0,disabled:!b,children:"Connect"}),(0,s.jsx)(l.$n,{onClick:U,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"waiting"===p&&k&&w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"text-center py-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the login URL below and authorize:"}),(0,s.jsxs)("div",{className:"bg-sidebar p-4 mb-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Login URL"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("code",{className:"flex-1 text-sm break-all",children:V}),(0,s.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"login_url"===F?"check":"content_copy",onClick:()=>W(V,"login_url"),disabled:!V}),(0,s.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"open_in_new",onClick:()=>window.open(V,"_blank","noopener,noreferrer"),disabled:!V,children:"Open"})]})]}),(0,s.jsxs)("div",{className:"bg-primary/10 p-4 ",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,s.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:w.user_code}),(0,s.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"user_code"===F?"check":"content_copy",onClick:()=>W(w.user_code,"user_code")})]})]})]}),S&&(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]})]}),"success"===p&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",a.name," account has been connected."]}),(0,s.jsx)(l.$n,{onClick:U,fullWidth:!0,children:"Done"})]}),"error"===p&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,s.jsx)("p",{className:"text-sm text-red-600 mb-4",children:y}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:M,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,s.jsx)(l.$n,{onClick:U,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}m.propTypes={isOpen:i().bool.isRequired,provider:i().string,providerInfo:i().shape({name:i().string}),onSuccess:i().func,onClose:i().func.isRequired,oauthMeta:i().object,idcConfig:i().shape({startUrl:i().string,region:i().string})}},92622:(e,t,a)=>{a.d(t,{default:()=>j});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(98500),o=a.n(l),c=a(73321),d=a(31474),m=a(90620),x=a(88105),u=a(11059),p=a(92542),h=a(81127);let f=["embedding","image","video","tts","stt","speechToSpeech"],g="/dashboard/media-providers/web",b=[{href:"/dashboard/endpoint",label:"Endpoint & Key",icon:"api"},{href:"/dashboard/providers",label:"Providers",icon:"dns"},{href:"/dashboard/combos",label:"Combos",icon:"layers"},{href:"/dashboard/usage",label:"Usage",icon:"bar_chart"},{href:"/dashboard/quota",label:"Quota Tracker",icon:"data_usage"},{href:"/dashboard/token-saver",label:"Token Saver",icon:"savings"},{href:"/dashboard/cli-tools",label:"CLI Tools",icon:"terminal"}],v=[{href:"/dashboard/console-log",label:"Console Log",icon:"terminal"},{href:"/dashboard/translator",label:"Translator",icon:"translate"}],y=[{href:"/dashboard/proxy-pools",label:"Proxy Pools",icon:"lan"},{href:"/dashboard/skills",label:"Skills",icon:"extension"}];function j({onClose:e}){let t=(0,c.usePathname)(),[a,n]=(0,r.useState)(!1),[i,l]=(0,r.useState)(!1),[N,w]=(0,r.useState)(null),[C,S]=(0,r.useState)(!1),[O,I]=(0,r.useState)(!1),[T,P]=(0,r.useState)(0),[F,W]=(0,r.useState)(!1),{copied:A,copy:$}=(0,u.C)(2e3),R=m.h0.installCmdLatest;(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{e.enableTranslator&&W(!0)}).catch(()=>{})},[]),(0,r.useEffect)(()=>{fetch("/api/version").then(e=>e.json()).then(e=>{e.hasUpdate&&w(e)}).catch(()=>{})},[]);let _=e=>"/dashboard/endpoint"===e?"/dashboard"===t||t.startsWith("/dashboard/endpoint"):t.startsWith(e),E=async()=>{try{await navigator.clipboard.writeText(R)}catch{}$(R);let e=m.h0.shutdownCountdownSec;P(e);let t=setInterval(()=>{P(e-=1),e<=0&&(clearInterval(t),fetch("/api/version/shutdown",{method:"POST"}).catch(()=>{}),l(!0))},1e3)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("aside",{className:"flex w-72 flex-col border-r border-border-subtle bg-vibrancy backdrop-blur-xl transition-colors duration-300 min-h-full",children:[(0,s.jsxs)("div",{className:"px-6 py-4 flex flex-col gap-2",children:[(0,s.jsx)(o(),{href:"/dashboard",className:"flex items-center gap-3",children:(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("h1",{className:"text-lg font-semibold tracking-tight",children:[(0,s.jsx)("span",{className:"text-brand-500",children:"Poly"}),(0,s.jsx)("span",{className:"text-text-main",children:"Router"})]}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["v",m.vQ.version]})]})}),N&&(0,s.jsxs)("div",{className:"flex flex-col gap-1.5 p-1 -m-1",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-green-600 dark:text-green-500",children:["↑ New version available: v",N.latestVersion]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{onClick:()=>S(!0),className:"px-2 py-1 bg-green-600 hover:bg-green-700 dark:bg-green-500 dark:hover:bg-green-600 text-white text-[11px] font-semibold transition-colors cursor-pointer",children:"Update now"}),(0,s.jsx)("button",{onClick:()=>$(R),title:"Copy install command",className:"flex-1 text-left hover:opacity-80 transition-opacity cursor-pointer min-w-0",children:(0,s.jsx)("code",{className:"block text-[10px] text-green-600/80 dark:text-green-400/70 font-mono truncate",children:A?"✓ copied!":R})})]})]})]}),(0,s.jsxs)("nav",{className:"flex-1 px-4 py-2 space-y-0.5 overflow-y-auto custom-scrollbar",children:[b.map(t=>(0,s.jsxs)(o(),{href:t.href,onClick:e,className:(0,d.cn)("flex items-center gap-3 px-3 py-1 transition-all group",_(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:(0,d.cn)("material-symbols-outlined text-[18px]",_(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,s.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),(0,s.jsxs)("div",{className:"pt-3 mt-2 space-y-0.5",children:[(0,s.jsx)("p",{className:"px-4 text-xs font-semibold text-text-muted/60 uppercase tracking-wider mb-2",children:"System"}),(0,s.jsxs)("button",{onClick:()=>n(e=>!e),className:(0,d.cn)("w-full flex items-center gap-3 px-3 py-1 transition-all group",t.startsWith("/dashboard/media-providers")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"perm_media"}),(0,s.jsx)("span",{className:"text-[13px] font-medium flex-1 text-left",children:"Media Providers"}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] transition-transform",style:{transform:a?"rotate(180deg)":"rotate(0deg)"},children:"expand_more"})]}),a&&(0,s.jsxs)("div",{className:"pl-4",children:[x.rj.filter(e=>f.includes(e.id)).map(a=>(0,s.jsxs)(o(),{href:`/dashboard/media-providers/${a.id}`,onClick:e,className:(0,d.cn)("flex items-center gap-3 px-4 py-1 transition-all group",t.startsWith(`/dashboard/media-providers/${a.id}`)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:a.icon}),(0,s.jsx)("span",{className:"text-sm",children:a.label})]},a.id)),(0,s.jsxs)(o(),{href:g,onClick:e,className:(0,d.cn)("flex items-center gap-3 px-4 py-1 transition-all group",t.startsWith(g)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"travel_explore"}),(0,s.jsx)("span",{className:"text-sm",children:"Web Fetch & Search"})]},"web")]}),y.map(t=>(0,s.jsxs)(o(),{href:t.href,onClick:e,className:(0,d.cn)("flex items-center gap-3 px-3 py-1 transition-all group",_(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:(0,d.cn)("material-symbols-outlined text-[18px]",_(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,s.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),v.map(t=>"/dashboard/translator"!==t.href||F?(0,s.jsxs)(o(),{href:t.href,onClick:e,className:(0,d.cn)("flex items-center gap-3 px-3 py-1 transition-all group",_(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:(0,d.cn)("material-symbols-outlined text-[18px]",_(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,s.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href):null),(0,s.jsxs)(o(),{href:"/dashboard/profile",onClick:e,className:(0,d.cn)("flex items-center gap-3 px-3 py-1 transition-all group",_("/dashboard/profile")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:(0,d.cn)("material-symbols-outlined text-[18px]",_("/dashboard/profile")?"fill-1":"group-hover:text-primary transition-colors"),children:"settings"}),(0,s.jsx)("span",{className:"text-[13px] font-medium",children:"Settings"})]})]})]})]}),(0,s.jsx)(h.ConfirmModal,{isOpen:C,onClose:()=>S(!1),onConfirm:()=>{S(!1),I(!0)},title:"Update PolyRouter",message:`Show install command for v${N?.latestVersion||""}? You can copy it and shutdown to install manually.`,confirmText:"Show Command",cancelText:"Cancel",variant:"primary"}),(i||O)&&(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm p-6",children:O?(0,s.jsx)(k,{latestVersion:N?.latestVersion,installCmd:R,copied:A,onCopyAndShutdown:E,onCancel:()=>{I(!1),P(0)},countdown:T,isDisconnected:i}):(0,s.jsxs)("div",{className:"text-center p-8",children:[(0,s.jsx)("div",{className:"flex items-center justify-center size-16 rounded-full bg-red-500/20 text-red-500 mx-auto mb-4",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"power_off"})}),(0,s.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Server Disconnected"}),(0,s.jsx)("p",{className:"text-text-muted mb-6",children:"The proxy server has been stopped."}),(0,s.jsx)(p.default,{variant:"secondary",onClick:()=>globalThis.location.reload(),children:"Reload Page"})]})})]})}function k({latestVersion:e,installCmd:t,copied:a,onCopyAndShutdown:r,onCancel:n,countdown:i,isDisconnected:l}){let o=i>0;return(0,s.jsxs)("div",{className:"w-full max-w-lg bg-neutral-900/95 border border-white/10 p-6 text-white",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,s.jsx)("div",{className:"flex items-center justify-center size-11 rounded-full bg-green-500/20 text-green-400",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"content_copy"})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("h2",{className:"text-lg font-semibold",children:["Update PolyRouter",e?` to v${e}`:""]}),(0,s.jsx)("p",{className:"text-xs text-white/60",children:l?"Server stopped. Paste the command into a terminal to install.":o?`Command copied. Server will stop in ${i}s...`:"Click the button below to copy the install command and shutdown."})]})]}),(0,s.jsx)("p",{className:"text-sm text-white/80 mb-2",children:"Install command:"}),(0,s.jsx)("div",{className:"w-full px-3 py-2 bg-white/5 mb-4",children:(0,s.jsx)("code",{className:"text-xs font-mono text-green-400 break-all",children:t})}),(0,s.jsxs)("ol",{className:"text-xs text-white/70 space-y-1 list-decimal list-inside mb-4",children:[(0,s.jsxs)("li",{children:["Click ",(0,s.jsx)("strong",{children:"Copy & Shutdown"})," below."]}),(0,s.jsx)("li",{children:"Paste the command into your terminal and press Enter."}),(0,s.jsxs)("li",{children:["Run ",(0,s.jsx)("code",{className:"px-1 bg-white/10 text-green-400",children:"9router"})," again after install."]})]}),l?(0,s.jsx)(p.default,{variant:"secondary",fullWidth:!0,onClick:()=>globalThis.location.reload(),children:"Reload Page"}):(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.default,{variant:"secondary",onClick:n,disabled:o,children:"Cancel"}),(0,s.jsx)(p.default,{variant:"primary",fullWidth:!0,onClick:r,disabled:o,children:a?"✓ Copied — shutting down...":o?`Shutting down in ${i}s`:"Copy & Shutdown"})]})]})}j.propTypes={onClose:i().func},k.propTypes={latestVersion:i().string,installCmd:i().string.isRequired,copied:i().bool,onCopyAndShutdown:i().func.isRequired,onCancel:i().func.isRequired,countdown:i().number,isDisconnected:i().bool}},94230:(e,t,a)=>{a.d(t,{default:()=>c});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(35497),o=a(11059);function c({isOpen:e,provider:t,onSuccess:a,onClose:n}){let[i,d]=(0,r.useState)("loading"),[m,x]=(0,r.useState)(""),[u,p]=(0,r.useState)(null),[h,f]=(0,r.useState)(""),[g,b]=(0,r.useState)(null),{copied:v,copy:y}=(0,o.C)(),j=(0,r.useRef)(!1);(0,r.useEffect)(()=>{e||(j.current=!1)},[e]),(0,r.useEffect)(()=>{e&&t&&(async()=>{try{b(null),d("loading");let e=await fetch(`/api/oauth/kiro/social-authorize?provider=${t}`),a=await e.json();if(!e.ok)throw Error(a.error);p(a),x(a.authUrl),d("input"),j.current||(j.current=!0,window.open(a.authUrl,"_blank"))}catch(e){b(e.message),d("error")}})()},[e,t]);let k=async()=>{try{let e;b(null);try{e=new URL(h)}catch(e){throw Error("Invalid callback URL format")}let s=e.searchParams.get("code");e.searchParams.get("state");let r=e.searchParams.get("error");if(r)throw Error(e.searchParams.get("error_description")||r);if(!s)throw Error("No authorization code found in URL");let n=await fetch("/api/oauth/kiro/social-exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:s,codeVerifier:u.codeVerifier,provider:t})}),i=await n.json();if(!n.ok)throw Error(i.error);d("success"),a?.()}catch(e){b(e.message),d("error")}},N="google"===t?"Google":"GitHub";return(0,s.jsx)(l.aF,{isOpen:e,title:`Connect Kiro via ${N}`,onClose:n,size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:["loading"===i&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Initializing..."}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Setting up ",N," authentication"]})]}),"input"===i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.pd,{value:m,readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,s.jsx)(l.$n,{variant:"secondary",icon:"auth_url"===v?"check":"content_copy",onClick:()=>y(m,"auth_url"),children:"Copy"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser address bar."}),(0,s.jsx)(l.pd,{value:h,onChange:e=>f(e.target.value),placeholder:"kiro://kiro.kiroAgent/authenticate-success?code=...",className:"font-mono text-xs"})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:k,fullWidth:!0,disabled:!h,children:"Connect"}),(0,s.jsx)(l.$n,{onClick:n,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===i&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your Kiro account via ",N," has been connected."]}),(0,s.jsx)(l.$n,{onClick:n,fullWidth:!0,children:"Done"})]}),"error"===i&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,s.jsx)("p",{className:"text-sm text-red-600 mb-4",children:g}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:()=>d("input"),variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,s.jsx)(l.$n,{onClick:n,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}c.propTypes={isOpen:i().bool.isRequired,provider:i().oneOf(["google","github"]).isRequired,onSuccess:i().func,onClose:i().func.isRequired}},95088:(e,t,a)=>{a.d(t,{default:()=>c});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(35497);let o="https://gitlab.com";function c({isOpen:e,providerInfo:t,onSuccess:a,onClose:n}){let i,[d,m]=(0,r.useState)(null),[x,u]=(0,r.useState)(o),[p,h]=(0,r.useState)(""),[f,g]=(0,r.useState)(""),[b,v]=(0,r.useState)(""),[y,j]=(0,r.useState)(!1),[k,N]=(0,r.useState)(null),[w,C]=(0,r.useState)(!1),[S,O]=(0,r.useState)(null),I=()=>{m(null),u(o),h(""),g(""),v(""),N(null),j(!1),C(!1),O(null),n()},T=async()=>{if(!b.trim())return void N("Personal Access Token is required");j(!0),N(null);try{let e=await fetch("/api/oauth/gitlab/pat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:b.trim(),baseUrl:x.trim()||o})}),t=await e.json();if(!e.ok)throw Error(t.error||"Authentication failed");a?.(),I()}catch(e){N(e.message)}finally{j(!1)}};return e?w&&S?(0,s.jsx)(l.LF,{isOpen:!0,provider:"gitlab",providerInfo:t,oauthMeta:S,onSuccess:()=>{a?.(),I()},onClose:()=>{C(!1),O(null)}}):(0,s.jsx)(l.aF,{isOpen:e,title:"Connect GitLab Duo",onClose:I,size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[!d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Choose how to authenticate with GitLab Duo:"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("button",{onClick:()=>m("oauth"),className:"flex flex-col items-center gap-2 p-4 border border-border hover:border-primary hover:bg-primary/5 transition-colors text-left",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-2xl text-primary",children:"lock_open"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"OAuth App"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a GitLab OAuth application"})]})]}),(0,s.jsxs)("button",{onClick:()=>m("pat"),className:"flex flex-col items-center gap-2 p-4 border border-border hover:border-primary hover:bg-primary/5 transition-colors text-left",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-2xl text-primary",children:"key"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Personal Access Token"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a GitLab PAT with api scope"})]})]})]})]}),"oauth"===d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Create an OAuth app at"," ",(0,s.jsx)("a",{href:`${x.trim()||o}/-/profile/applications`,target:"_blank",rel:"noreferrer",className:"text-primary underline",children:"GitLab Applications"})," ","with redirect URI"," ",(0,s.jsx)("code",{className:"bg-sidebar px-1 text-xs",children:(i=window.location.port||("https:"===window.location.protocol?"443":"80"),`http://localhost:${i}/callback`)})]}),(0,s.jsx)(l.pd,{label:"GitLab Base URL",value:x,onChange:e=>u(e.target.value),placeholder:o}),(0,s.jsx)(l.pd,{label:"Client ID",value:p,onChange:e=>h(e.target.value),placeholder:"Your OAuth application client ID"}),(0,s.jsx)(l.pd,{label:"Client Secret (optional for PKCE)",value:f,onChange:e=>g(e.target.value),placeholder:"Leave empty for public PKCE app"}),k&&(0,s.jsx)("p",{className:"text-sm text-red-500",children:k}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:()=>{p.trim()?(N(null),O({baseUrl:x.trim()||o,clientId:p.trim(),clientSecret:f.trim()}),C(!0)):N("Client ID is required")},fullWidth:!0,disabled:!p.trim(),children:"Authorize"}),(0,s.jsx)(l.$n,{onClick:()=>{m(null),N(null)},variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"pat"===d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Create a PAT at"," ",(0,s.jsx)("a",{href:`${x.trim()||o}/-/user_settings/personal_access_tokens`,target:"_blank",rel:"noreferrer",className:"text-primary underline",children:"GitLab Access Tokens"})," ","with scopes: ",(0,s.jsx)("code",{className:"bg-sidebar px-1 text-xs",children:"api"}),","," ",(0,s.jsx)("code",{className:"bg-sidebar px-1 text-xs",children:"read_user"}),", and"," ",(0,s.jsx)("code",{className:"bg-sidebar px-1 text-xs",children:"ai_features"}),"."]}),(0,s.jsx)(l.pd,{label:"GitLab Base URL",value:x,onChange:e=>u(e.target.value),placeholder:o}),(0,s.jsx)(l.pd,{label:"Personal Access Token",value:b,onChange:e=>v(e.target.value),placeholder:"glpat-xxxxxxxxxxxxxxxxxxxx",type:"password"}),k&&(0,s.jsx)("p",{className:"text-sm text-red-500",children:k}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:T,fullWidth:!0,disabled:!b.trim()||y,loading:y,children:"Connect"}),(0,s.jsx)(l.$n,{onClick:()=>{m(null),N(null)},variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})}):null}c.propTypes={isOpen:i().bool.isRequired,providerInfo:i().shape({name:i().string}),onSuccess:i().func,onClose:i().func.isRequired}},96748:(e,t,a)=>{a.d(t,{default:()=>c});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(35497);let o="https://api.openai.com/v1";function c({isOpen:e,onClose:t,onCreated:a,onSaved:n,node:i}){let d=!!i,[m,x]=(0,r.useState)({name:"",prefix:"",baseUrl:o}),[u,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)(""),[g,b]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),[j,k]=(0,r.useState)(null);(0,r.useEffect)(()=>{e&&(k(null),f(""),b(""),d?x({name:i.name||"",prefix:i.prefix||"",baseUrl:i.baseUrl||o}):x({name:"",prefix:"",baseUrl:o}))},[e,d,i]);let N=async()=>{if(m.name.trim()&&m.prefix.trim()&&m.baseUrl.trim()){p(!0);try{let e=d?`/api/provider-nodes/${i.id}`:"/api/provider-nodes",t=d?"PUT":"POST",s={name:m.name,prefix:m.prefix,baseUrl:m.baseUrl};d||(s.type="custom-embedding");let r=await fetch(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),l=await r.json();r.ok&&(d?n?.(l.node):a?.(l.node))}catch(e){console.log("Error saving custom embedding node:",e)}finally{p(!1)}}},w=async()=>{y(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:m.baseUrl,apiKey:h,type:"custom-embedding",modelId:g.trim()||void 0})}),t=await e.json();k(t)}catch{k({valid:!1,error:"Network error"})}finally{y(!1)}};return(0,s.jsx)(l.aF,{isOpen:e,title:d?"Edit Custom Embedding":"Add Custom Embedding",onClose:t,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(l.pd,{label:"Name",value:m.name,onChange:e=>x({...m,name:e.target.value}),placeholder:"Voyage AI",hint:"Required. A friendly label for this embedding provider."}),(0,s.jsx)(l.pd,{label:"Prefix",value:m.prefix,onChange:e=>x({...m,prefix:e.target.value}),placeholder:"voyage",hint:"Required. Used as the provider prefix for model IDs (e.g. voyage/voyage-3)."}),(0,s.jsx)(l.pd,{label:"Base URL",value:m.baseUrl,onChange:e=>x({...m,baseUrl:e.target.value}),placeholder:"https://api.voyageai.com/v1",hint:"Most embedding APIs are OpenAI-compatible: Voyage, Cohere, Jina, Mistral, Together..."}),(0,s.jsx)(l.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>f(e.target.value)}),(0,s.jsx)(l.pd,{label:"Model ID (for Check)",value:g,onChange:e=>b(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",hint:"Required for validation. Will send a test embeddings request."}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(l.$n,{onClick:w,disabled:!h||!g.trim()||v||!m.baseUrl.trim(),variant:"secondary",children:v?"Checking...":"Check"}),(()=>{if(!j)return null;let{valid:e,error:t,dimensions:a}=j;return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.Ex,{variant:"success",children:"Valid"}),a&&(0,s.jsxs)("span",{className:"text-sm text-text-muted",children:[a," dims"]})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(l.Ex,{variant:"error",children:"Invalid"}),t&&(0,s.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:N,fullWidth:!0,disabled:!m.name.trim()||!m.prefix.trim()||!m.baseUrl.trim()||u,children:u?d?"Saving...":"Creating...":d?"Save":"Create"}),(0,s.jsx)(l.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}c.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func,onSaved:i().func,node:i().shape({id:i().string,name:i().string,prefix:i().string,baseUrl:i().string})}},97556:(e,t,a)=>{a.d(t,{default:()=>o});var s=a(95155),r=a(12115),n=a(9233),i=a(81127),l=a(90620);function o({isOpen:e,onClose:t}){let[a,c]=(0,r.useState)(""),[d,m]=(0,r.useState)(!1),[x,u]=(0,r.useState)("");return(0,r.useEffect)(()=>{e&&!a&&(m(!0),u(""),fetch(l.Nu.changelogUrl).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()}).then(e=>c(n.xI.parse(e))).catch(e=>u(e.message||"Failed to load")).finally(()=>m(!1)))},[e,a]),(0,s.jsx)(i.default,{isOpen:e,onClose:t,title:"Change Log",size:"full",className:"flex flex-col max-h-[85vh]",children:(0,s.jsxs)("div",{className:"overflow-y-auto flex-1 -mx-5 -my-5 px-5 py-5",children:[d&&(0,s.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}),x&&(0,s.jsxs)("div",{className:"text-red-500 py-4",children:["Failed to load changelog: ",x]}),!d&&!x&&a&&(0,s.jsx)("div",{className:"changelog-body text-text-main",dangerouslySetInnerHTML:{__html:a}})]})})}n.xI.setOptions({gfm:!0,breaks:!0})},97677:(e,t,a)=>{a.d(t,{default:()=>r});var s=a(95155);function r({text:e,children:t,position:a="top"}){return(0,s.jsxs)("div",{className:"relative inline-flex group/tt",children:[t,(0,s.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"}[a]} z-50 w-max max-w-64 opacity-0 group-hover/tt:opacity-100 transition-opacity duration-150 delay-200`,children:(0,s.jsxs)("div",{className:"relative px-2.5 py-1.5 text-[11px] leading-snug bg-surface border border-border shadow-[var(--shadow-elev)] text-text-main whitespace-normal",children:[e,(0,s.jsx)("div",{className:`absolute w-0 h-0 ${{top:"left-1/2 -translate-x-1/2 top-full -mt-px border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-surface border-t dark:border-t-[var(--color-surface)]",bottom:"left-1/2 -translate-x-1/2 bottom-full -mb-px border-l-4 border-r-4 border-b-4 border-l-transparent border-r-transparent border-b-surface border-b dark:border-b-[var(--color-surface)]",left:"top-1/2 -translate-y-1/2 left-full -ml-px border-t-4 border-b-4 border-l-4 border-t-transparent border-b-transparent border-l-surface border-l dark:border-l-[var(--color-surface)]",right:"top-1/2 -translate-y-1/2 right-full -mr-px border-t-4 border-b-4 border-r-4 border-t-transparent border-b-transparent border-r-surface border-r dark:border-r-[var(--color-surface)]"}[a]}`})]})})]})}},98542:(e,t,a)=>{a.d(t,{default:()=>n});var s=a(95155),r=a(31474);function n({checked:e=!1,onChange:t,label:a,description:i,disabled:l=!1,size:o="md",className:c}){let d={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"size-6",translate:"translate-x-7"}};return(0,s.jsxs)("div",{className:(0,r.cn)("flex items-center gap-3",l&&"opacity-50 cursor-not-allowed",c),children:[(0,s.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:l,onClick:()=>{!l&&t&&t(!e)},className:(0,r.cn)("relative inline-flex shrink-0 cursor-pointer rounded-full","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-brand-500/30",e?"bg-brand-500":"bg-surface-3",d[o].track,l&&"cursor-not-allowed"),children:(0,s.jsx)("span",{className:(0,r.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",e?d[o].translate:"translate-x-0.5",d[o].thumb,"mt-0.5")})}),(a||i)&&(0,s.jsxs)("div",{className:"flex flex-col",children:[a&&(0,s.jsx)("span",{className:"text-sm font-medium text-text-main",children:a}),i&&(0,s.jsx)("span",{className:"text-xs text-text-muted",children:i})]})]})}}}]);
7
+ `,children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[y.includes(e.value)&&!a&&(0,s.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),a?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"edit"}),e.name]}):e.isCustom?(0,s.jsxs)(s.Fragment,{children:[e.name,(0,s.jsx)("span",{className:"text-[9px] opacity-60 font-normal",children:"custom"}),(0,s.jsx)(c.default,{caps:N(e.value)})]}):(0,s.jsxs)(s.Fragment,{children:[e.name,(0,s.jsx)(c.default,{caps:N(e.value)})]})]})},e.value)})})]},e)),0===Object.keys(K).length&&0===U.length&&(0,s.jsxs)("div",{className:"text-center py-4 text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-2xl mb-1 block",children:"search_off"}),(0,s.jsx)("p",{className:"text-xs",children:"No models found"})]})]})]})}h.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onSelect:i().func.isRequired,onDeselect:i().func,selectedModel:i().string,activeProviders:i().arrayOf(i().shape({provider:i().string.isRequired})),title:i().string,modelAliases:i().object,kindFilter:i().string,addedModelValues:i().arrayOf(i().string),closeOnSelect:i().bool}},73579:(e,t,a)=>{a.d(t,{default:()=>u});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(81127),o=a(11910),c=a(92542),d=a(56061),m=a(88105),x=a(98);function u({isOpen:e,connection:t,proxyPools:a,onSave:n,onClose:i}){let[p,h]=(0,r.useState)({name:"",priority:1,apiKey:""}),[f,g]=(0,r.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[b,v]=(0,r.useState)({accountId:""}),[y,j]=(0,r.useState)(""),[k,N]=(0,r.useState)(!1),[w,C]=(0,r.useState)(null),[S,O]=(0,r.useState)(!1),[I,T]=(0,r.useState)(null),[P,F]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(t){h({name:t.name||"",priority:t.priority||1,apiKey:""}),"azure"===t.provider&&t.providerSpecificData&&g({azureEndpoint:t.providerSpecificData.azureEndpoint||"",apiVersion:t.providerSpecificData.apiVersion||"2024-10-01-preview",deployment:t.providerSpecificData.deployment||"",organization:t.providerSpecificData.organization||""}),"cloudflare-ai"===t.provider&&t.providerSpecificData&&v({accountId:t.providerSpecificData.accountId||""});let e=m.Q2?.[t.provider];e?.regions&&j(t.providerSpecificData?.region||e.defaultRegion||e.regions[0]?.id||""),C(null),T(null)}},[t]);let W=t?.authType==="oauth",A=t?.provider==="azure",$=t?.provider==="cloudflare-ai",R=!!t&&((0,m.mq)(t.provider)||(0,m.gb)(t.provider)),_=t&&m.Q2?.[t.provider]?.regions||null,E=()=>{if(_&&y)return{...t?.providerSpecificData||{},region:y}},q=async()=>{if(t?.provider){N(!0),C(null);try{let e=await fetch(`/api/providers/${t.id}/test`,{method:"POST"}),a=await e.json();C(a.valid?"success":"failed")}catch{C("failed")}finally{N(!1)}}},D=async()=>{if(t?.provider&&p.apiKey){O(!0),T(null);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:p.apiKey,...A?{providerSpecificData:f}:{},...$?{providerSpecificData:b}:{},..._?{providerSpecificData:E()}:{}})}),a=await e.json();T(a.valid?"success":"failed")}catch{T("failed")}finally{O(!1)}}},L=async()=>{if(t){F(!0);try{let e={name:p.name,priority:p.priority};if(!W&&p.apiKey){e.apiKey=p.apiKey;let a="success"===I;if(!a)try{O(!0),T(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:p.apiKey,...A?{providerSpecificData:f}:{},...$?{providerSpecificData:b}:{},..._?{providerSpecificData:E()}:{}})});a=!!(await e.json()).valid,T(a?"success":"failed")}catch{T("failed")}finally{O(!1)}a&&(e.testStatus="active",e.lastError=null,e.lastErrorAt=null)}A&&(e.providerSpecificData={azureEndpoint:f.azureEndpoint,apiVersion:f.apiVersion,deployment:f.deployment,organization:f.organization}),$&&(e.providerSpecificData={accountId:b.accountId}),_&&y&&(e.providerSpecificData=E()),await n(e)}finally{F(!1)}}};return t?(0,s.jsx)(l.default,{isOpen:e,title:"Edit Connection",onClose:i,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(o.default,{label:"Name",value:p.name,onChange:e=>h({...p,name:e.target.value}),placeholder:W?"Account name":"Production Key"}),W&&t.email&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-3 ",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted mb-1",children:"Email"}),(0,s.jsx)("p",{className:"font-medium",children:t.email})]}),(0,s.jsx)(o.default,{label:"Priority",type:"number",value:p.priority,onChange:e=>h({...p,priority:Number.parseInt(e.target.value,10)||1})}),!W&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(o.default,{label:"API Key",type:"password",value:p.apiKey,onChange:e=>h({...p,apiKey:e.target.value}),placeholder:"Enter new API key",hint:"Leave blank to keep the current API key.",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(c.default,{onClick:D,disabled:!p.apiKey||S||P,variant:"secondary",children:S?"Checking...":"Check"})})]}),I&&(0,s.jsx)(d.default,{variant:"success"===I?"success":"error",children:"success"===I?"Valid":"Invalid"})]}),A&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(o.default,{label:"Azure Endpoint",value:f.azureEndpoint,onChange:e=>g({...f,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com",hint:"Your Azure OpenAI resource endpoint URL"}),(0,s.jsx)(o.default,{label:"Deployment Name",value:f.deployment,onChange:e=>g({...f,deployment:e.target.value}),placeholder:"gpt-4",hint:"The deployment name in your Azure resource"}),(0,s.jsx)(o.default,{label:"API Version",value:f.apiVersion,onChange:e=>g({...f,apiVersion:e.target.value}),placeholder:"2024-10-01-preview",hint:"Azure OpenAI API version to use"}),(0,s.jsx)(o.default,{label:"Organization",value:f.organization,onChange:e=>g({...f,organization:e.target.value}),placeholder:"Organization ID",hint:"Required for billing"})]})]}),_&&(0,s.jsx)(x.default,{label:"Region",value:y,onChange:e=>j(e.target.value),options:_.map(e=>({value:e.id,label:e.label}))}),!R&&!A&&!$&&(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(c.default,{onClick:q,variant:"secondary",disabled:k,children:k?"Testing...":"Test Connection"}),w&&(0,s.jsx)(d.default,{variant:"success"===w?"success":"error",children:"success"===w?"Valid":"Failed"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.default,{onClick:L,fullWidth:!0,disabled:P,children:P?"Saving...":"Save"}),(0,s.jsx)(c.default,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}u.propTypes={isOpen:i().bool.isRequired,connection:i().shape({id:i().string,name:i().string,email:i().string,priority:i().number,authType:i().string,provider:i().string,providerSpecificData:i().object}),proxyPools:i().arrayOf(i().shape({id:i().string,name:i().string})),onSave:i().func.isRequired,onClose:i().func.isRequired}},80752:(e,t,a)=>{a.d(t,{default:()=>c});var s=a(95155),r=a(12115),n=a(1620),i=a(97556),l=a(81127),o=a(39403);function c({onLogout:e}){let[t,a]=(0,r.useState)(!1),[d,m]=(0,r.useState)(!1),[x,u]=(0,r.useState)(!1),{toggleTheme:p,isDark:h}=(0,n.D)(),f=async()=>{u(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}u(!1),m(!1)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.default,{trigger:(0,s.jsx)("button",{className:"flex items-center justify-center p-2 text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all rounded-[var(--radius-brand)]",title:"Menu",children:(0,s.jsx)("span",{className:"material-symbols-outlined",children:"grid_view"})}),children:[(0,s.jsx)(o.DropdownItem,{icon:"history",label:"Change Log",onClick:()=>a(!0)}),(0,s.jsx)(o.DropdownItem,{icon:h?"light_mode":"dark_mode",label:"Theme",onClick:p}),(0,s.jsx)(o.DropdownItem,{icon:"power_settings_new",label:"Shutdown",danger:!0,onClick:()=>m(!0)}),(0,s.jsx)(o.DropdownItem,{icon:"logout",label:"Logout",danger:!0,onClick:e})]}),(0,s.jsx)(i.default,{isOpen:t,onClose:()=>a(!1)}),(0,s.jsx)(l.ConfirmModal,{isOpen:d,onClose:()=>m(!1),onConfirm:f,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:x})]})}},91450:(e,t,a)=>{a.d(t,{default:()=>l});var s=a(95155),r=a(14051),n=a.n(r),i=a(38587);function l({children:e}){return(0,s.jsxs)("div",{className:"min-h-screen flex flex-col relative bg-bg transition-colors duration-500 overflow-x-hidden selection:bg-primary/20 selection:text-primary",children:[(0,s.jsx)("div",{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-primary/5 dark:bg-primary/5 rounded-full blur-[100px] pointer-events-none z-0"}),(0,s.jsx)("div",{className:"fixed bottom-0 right-0 w-[600px] h-[600px] bg-green-200/20 dark:bg-green-900/10 rounded-full blur-[120px] pointer-events-none z-0 translate-y-1/3 translate-x-1/3"}),(0,s.jsx)("div",{className:"absolute top-6 right-6 z-20",children:(0,s.jsx)(i.default,{variant:"card"})}),(0,s.jsx)("main",{className:"flex-1 flex flex-col items-center justify-center p-4 sm:p-6 z-10 w-full h-full",children:e})]})}l.propTypes={children:n().node.isRequired}},92173:(e,t,a)=>{a.d(t,{default:()=>d});var s=a(95155),r=a(98500),n=a.n(r),i=a(90620);let l=[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"Changelog",href:"#"}],o=[{label:"Documentation",href:"#"},{label:"API Reference",href:"#"},{label:"Help Center",href:"#"}],c=[{label:"About",href:"#"},{label:"Blog",href:"#"},{label:"Contact",href:"#"}];function d(){return(0,s.jsx)("footer",{className:"bg-bg border-t border-border pt-16 pb-12",children:(0,s.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-10 mb-12",children:[(0,s.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,s.jsx)("div",{className:"size-6 text-primary",children:(0,s.jsx)("svg",{className:"w-full h-full",fill:"currentColor",viewBox:"0 0 48 48",children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M12.0799 24L4 19.2479L9.95537 8.75216L18.04 13.4961L18.0446 4H29.9554L29.96 13.4961L38.0446 8.75216L44 19.2479L35.92 24L44 28.7521L38.0446 39.2479L29.96 34.5039L29.9554 44H18.0446L18.04 34.5039L9.95537 39.2479L4 28.7521L12.0799 24Z",fillRule:"evenodd"})})}),(0,s.jsx)("span",{className:"text-xl font-bold text-text-main",children:i.vQ.name})]}),(0,s.jsx)("p",{className:"text-text-muted mb-6 max-w-sm font-light",children:"The unified interface for modern AI infrastructure. Secure, observable, and scalable."}),(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"Twitter",children:(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"})})}),(0,s.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"GitHub",children:(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"})})})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Product"}),(0,s.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:l.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)(n(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Resources"}),(0,s.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:o.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)(n(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Company"}),(0,s.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:c.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)(n(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]})]}),(0,s.jsxs)("div",{className:"border-t border-border pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["\xa9 ",new Date().getFullYear()," ",i.vQ.name," Inc. All rights reserved."]}),(0,s.jsxs)("div",{className:"flex gap-6 text-sm text-text-muted",children:[(0,s.jsx)(n(),{href:"#",className:"hover:text-primary transition-colors",children:"Privacy Policy"}),(0,s.jsx)(n(),{href:"#",className:"hover:text-primary transition-colors",children:"Terms of Service"})]})]})]})})}},92613:(e,t,a)=>{a.d(t,{default:()=>m});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(35497),o=a(11059);let c=e=>{let t="";for(let a of e)t+=String.fromCharCode(a);return globalThis.btoa(t).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")};async function d(e,t){let a=await e.text();try{return JSON.parse(a)}catch{let s=e.headers.get("content-type")||"unknown content type",r=a.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim().slice(0,180);throw Error(`${t} returned HTTP ${e.status} (${s}): ${r||"empty response"}`)}}function m({isOpen:e,provider:t,providerInfo:a,onSuccess:n,onClose:i,oauthMeta:x,idcConfig:u}){let[p,h]=(0,r.useState)("waiting"),[f,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(""),[y,j]=(0,r.useState)(null),[k,N]=(0,r.useState)(!1),[w,C]=(0,r.useState)(null),[S,O]=(0,r.useState)(!1),I=(0,r.useRef)(null),T=(0,r.useRef)(!1),P=(0,r.useRef)(!1),{copied:F,copy:W}=(0,o.C)(),[A,$]=(0,r.useState)(!1),[R,_]=(0,r.useState)("/callback?code=..."),E=(0,r.useRef)(!1);(0,r.useEffect)(()=>{$("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),_(`${window.location.origin}/callback?code=...`)},[]);let q=(0,r.useCallback)(async(e,a)=>{if(f)try{let s=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:f.redirectUri,codeVerifier:f.codeVerifier,state:a,...x?{meta:x}:{}})}),r=await d(s,"OAuth exchange");if(!s.ok)throw Error(r.error);h("success"),n?.()}catch(e){j(e.message),h("error")}},[f,t,n,x]),D=(0,r.useCallback)(async e=>{if(f?.state)try{let t=await fetch("/api/oauth/xai/manual-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,state:f.state})}),a=await d(t,"OAuth manual-code exchange");if(!t.ok)throw Error(a.error);h("success"),n?.()}catch(e){j(e.message),h("error")}},[f,n]),L=(0,r.useCallback)(async(e,a,s,r,i)=>{T.current=!1,O(!0);let l=Date.now()+(Number.isFinite(i)&&i>0?i:12e4);for(;Date.now()<l;){if(T.current){console.log("[OAuthModal] Polling aborted"),O(!1);return}if(await new Promise(e=>setTimeout(e,1e3*s)),T.current){console.log("[OAuthModal] Polling aborted after sleep"),O(!1);return}try{let i=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:a,extraData:r})}),l=await d(i,"OAuth device-code poll");if(l.success){T.current=!0,h("success"),O(!1),n?.();return}if("expired_token"===l.error||"access_denied"===l.error)throw Error(l.errorDescription||l.error);"slow_down"===l.error&&(s=Math.min(s+5,30))}catch(e){j(e.message),h("error"),O(!1);return}}j("Authorization timeout"),h("error"),O(!1)},[t,n]),M=(0,r.useCallback)(async()=>{if(t)try{let a;if(j(null),["github","qwen","kiro","kimi","kimi-coding","kilocode","codebuddy-cn","qoder","grok-cli"].includes(t)){N(!0),h("waiting");let e=new URL(`/api/oauth/${t}/device-code`,window.location.origin);"kiro"===t&&u?.startUrl&&(e.searchParams.set("start_url",u.startUrl),u.region&&e.searchParams.set("region",u.region),e.searchParams.set("auth_method","idc"));let a=await fetch(e.toString()),s=await d(a,"OAuth device-code request");if(!a.ok)throw Error(s.error);C(s);let r=s.verification_uri_complete||s.verification_uri;r&&window.open(r,"_blank","noopener,noreferrer");let n="kiro"===t?{_clientId:s._clientId,_clientSecret:s._clientSecret,_region:s._region,_authMethod:s._authMethod,_startUrl:s._startUrl}:"qoder"===t?{_qoderNonce:s._qoderNonce,_qoderMachineId:s._qoderMachineId,_qoderVerifier:s.codeVerifier}:"kimi"===t||"kimi-coding"===t?{_kimiDeviceId:s._kimiDeviceId}:null;L(s.device_code,s.codeVerifier,s.interval||5,n,Number.isFinite(s.expires_in)&&s.expires_in>0?1e3*s.expires_in:void 0);return}let s=window.location.port||("https:"===window.location.protocol?"443":"80");a="codex"===t?"http://localhost:1455/auth/callback":"xai"===t?"http://127.0.0.1:56121/callback":`http://localhost:${s}/callback`;let r=new URL(`/api/oauth/${t}/authorize`,window.location.origin);r.searchParams.set("redirect_uri",a),x&&Object.entries(x).forEach(([e,t])=>{t&&r.searchParams.set(e,t)});let n=await fetch(r.toString()),i=await d(n,"OAuth authorize");if(!n.ok)throw Error(i.error);if("codex"===t){var e;let t,a,s,r=i.state;e=`${window.location.origin}/callback`,t=new Uint8Array(24),globalThis.crypto.getRandomValues(t),a={type:"openai-oauth-callback",version:1,nonce:c(t),callbackUrl:e,...r?{appState:r}:{}},i.state=`oo2_${s=JSON.stringify(a),c(new TextEncoder().encode(s))}`;let n=new URL(i.authUrl);n.searchParams.set("state",i.state),i.authUrl=n.toString()}let l=!1,o=!1;if("codex"===t)try{let e=new URL("/api/oauth/codex/start-proxy",window.location.origin);e.searchParams.set("app_port",s),e.searchParams.set("state",i.state),e.searchParams.set("code_verifier",i.codeVerifier),e.searchParams.set("redirect_uri",a);let t=await fetch(e.toString()),r=await d(t,"Codex callback proxy");l=r.success,o=!!r.serverSide}catch{l=!1}let m=!1,p=!1;if("xai"===t)try{let e=new URL("/api/oauth/xai/start-proxy",window.location.origin);e.searchParams.set("app_port",s),e.searchParams.set("state",i.state),e.searchParams.set("code_verifier",i.codeVerifier),e.searchParams.set("redirect_uri",a);let t=await fetch(e.toString()),r=await d(t,"xAI callback proxy");if(m=r.success,p=!!r.serverSide,!m&&"port_busy"===r.reason)throw Error("Port 56121 in use; close the conflicting process and retry")}catch(e){if(e?.message)throw e;m=!1}if(g({...i,redirectUri:a,codexServerSide:o,xaiServerSide:p}),!i.authUrl){if("device_code"===i.flowType)throw Error(`Provider ${t} uses device-code login but is not wired in the OAuth modal device-code list`);throw Error("No authorization URL returned from OAuth provider")}"codex"===t&&l||"xai"===t&&m||A&&"codex"!==t&&"xai"!==t?(h("waiting"),I.current=window.open(i.authUrl,"oauth_popup","width=600,height=700"),I.current||h("input")):(h("input"),window.open(i.authUrl,"_blank"))}catch(e){j(e.message),h("error")}},[t,A,L,x,u]);(0,r.useEffect)(()=>{e&&t?P.current||(P.current=!0,g(null),v(""),j(null),N(!1),C(null),O(!1),T.current=!1,M()):e||(T.current=!0,P.current=!1,"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t&&fetch("/api/oauth/xai/stop-proxy").catch(()=>{}))},[e,t,M]),(0,r.useEffect)(()=>{let e=f?.codexServerSide?"codex":f?.xaiServerSide?"xai":null;if(!e||!f?.state||E.current)return;let t=!1,a=0,s=async()=>{if(!t&&!E.current){a+=1;try{let a=await fetch(`/api/oauth/${e}/poll-status?state=${encodeURIComponent(f.state)}`),s=await d(a,"OAuth status poll");if(t||E.current)return;if("done"===s.status){E.current=!0,h("success"),n?.();return}if("error"===s.status){E.current=!0,j(s.error||"Authentication failed"),h("error");return}}catch{}if(a>=200){E.current=!0,j("Authentication timeout"),h("error");return}setTimeout(s,1500)}};return setTimeout(s,1500),()=>{t=!0}},[f,n]),(0,r.useEffect)(()=>{let e;if(!f)return;E.current=!1;let a=async e=>{if(E.current)return;let{code:a,token:s,state:r,error:n,errorDescription:i}=e;if(n){E.current=!0,j(i||n),h("error");return}if(s||a){if("codex"===t&&r!==f.state){E.current=!0,j("OpenAI OAuth callback state did not match"),h("error");return}E.current=!0,await q(s||a,r)}},s=e=>{let t=e.origin.includes("localhost")||e.origin.includes("127.0.0.1"),s=e.origin===window.location.origin;(t||s)&&e.data?.type==="oauth_callback"&&a(e.data.data)};window.addEventListener("message",s);try{(e=new BroadcastChannel("oauth_callback")).onmessage=e=>a(e.data)}catch(e){console.log("BroadcastChannel not supported")}let r=e=>{if("oauth_callback"===e.key&&e.newValue)try{let t=JSON.parse(e.newValue);a(t),localStorage.removeItem("oauth_callback")}catch(e){console.log("Failed to parse localStorage data")}};window.addEventListener("storage",r);try{let e=localStorage.getItem("oauth_callback");if(e){let t=JSON.parse(e);t.timestamp&&Date.now()-t.timestamp<3e4&&a(t),localStorage.removeItem("oauth_callback")}}catch{}return()=>{window.removeEventListener("message",s),window.removeEventListener("storage",r),e&&e.close()}},[f,q,t]);let z=async()=>{try{j(null);let e=b.trim();if(e.startsWith("eyJ")&&e.includes("."))return void await q(e,null);if("xai"===t&&e&&!e.includes("://")&&!e.includes("?")&&!e.includes("code="))return void await D(e);if("kimchi"===t&&e&&!e.includes("://")&&!e.includes("?"))return void await q(e,null);let a=new URL(e),s=a.searchParams.get("code"),r=a.searchParams.get("token"),n=a.searchParams.get("state"),i=a.searchParams.get("error");if(i)throw Error(a.searchParams.get("error_description")||i);if(!s&&!r)throw Error("xai"===t?"Paste the callback URL or copied xAI code":"kimchi"===t?"No Kimchi token found in URL":"No authorization code found in URL");await q(r||s,n)}catch(e){j(e.message),h("error")}},U=(0,r.useCallback)(()=>{"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t&&fetch("/api/oauth/xai/stop-proxy").catch(()=>{}),i()},[i,t]);if(!t||!a)return null;let K="xai"===t,B="kimchi"===t,V=w?.verification_uri_complete||w?.verification_uri||"",J=K?"Connect Grok Build OAuth":`Connect ${a.name}`,G=K?"http://127.0.0.1:56121/callback?code=... or copied code":B?`${R.replace("code=...","token=...")} or copied token`:R;return(0,s.jsx)(l.aF,{isOpen:e,title:J,onClose:U,size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[("waiting"===p||"input"===p)&&!k&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border border-border bg-sidebar/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-primary animate-spin",children:"progress_activity"}),(0,s.jsx)("span",{className:"text-sm",children:K?"Waiting for Grok Build OAuth…":"Waiting for popup authorization…"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 my-1",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-border"}),(0,s.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wider",children:"Or paste callback URL manually"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-border"})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 1: Open this ",K?"Grok Build OAuth URL":"URL"," in your browser"]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.pd,{value:f?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,s.jsx)(l.$n,{variant:"secondary",icon:"auth_url"===F?"check":"content_copy",onClick:()=>W(f?.authUrl,"auth_url"),disabled:!f?.authUrl,children:"Copy"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 2: Paste the ","xai"===t?"callback URL or copied code":B?"callback URL or copied token":"callback URL"," here"]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"xai"===t?"If xAI shows a code instead of redirecting, paste that code here.":B?"After authorization, copy the full callback URL or token from your browser.":"After authorization, copy the full URL from your browser."}),(0,s.jsx)(l.pd,{value:b,onChange:e=>v(e.target.value),placeholder:G,className:"font-mono text-xs"})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:z,fullWidth:!0,disabled:!b,children:"Connect"}),(0,s.jsx)(l.$n,{onClick:U,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"waiting"===p&&k&&w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"text-center py-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the login URL below and authorize:"}),(0,s.jsxs)("div",{className:"bg-sidebar p-4 mb-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Login URL"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("code",{className:"flex-1 text-sm break-all",children:V}),(0,s.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"login_url"===F?"check":"content_copy",onClick:()=>W(V,"login_url"),disabled:!V}),(0,s.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"open_in_new",onClick:()=>window.open(V,"_blank","noopener,noreferrer"),disabled:!V,children:"Open"})]})]}),(0,s.jsxs)("div",{className:"bg-primary/10 p-4 ",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,s.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:w.user_code}),(0,s.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"user_code"===F?"check":"content_copy",onClick:()=>W(w.user_code,"user_code")})]})]})]}),S&&(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]})]}),"success"===p&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",a.name," account has been connected."]}),(0,s.jsx)(l.$n,{onClick:U,fullWidth:!0,children:"Done"})]}),"error"===p&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,s.jsx)("p",{className:"text-sm text-red-600 mb-4",children:y}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:M,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,s.jsx)(l.$n,{onClick:U,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}m.propTypes={isOpen:i().bool.isRequired,provider:i().string,providerInfo:i().shape({name:i().string}),onSuccess:i().func,onClose:i().func.isRequired,oauthMeta:i().object,idcConfig:i().shape({startUrl:i().string,region:i().string})}},92622:(e,t,a)=>{a.d(t,{default:()=>j});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(98500),o=a.n(l),c=a(73321),d=a(31474),m=a(90620),x=a(88105),u=a(11059),p=a(92542),h=a(81127);let f=["embedding","image","video","tts","stt","speechToSpeech"],g="/dashboard/media-providers/web",b=[{href:"/dashboard/endpoint",label:"Endpoint & Key",icon:"api"},{href:"/dashboard/providers",label:"Providers",icon:"dns"},{href:"/dashboard/combos",label:"Combos",icon:"layers"},{href:"/dashboard/usage",label:"Usage",icon:"bar_chart"},{href:"/dashboard/quota",label:"Quota Tracker",icon:"data_usage"},{href:"/dashboard/token-saver",label:"Token Saver",icon:"savings"},{href:"/dashboard/cli-tools",label:"CLI Tools",icon:"terminal"}],v=[{href:"/dashboard/console-log",label:"Console Log",icon:"terminal"},{href:"/dashboard/translator",label:"Translator",icon:"translate"}],y=[{href:"/dashboard/proxy-pools",label:"Proxy Pools",icon:"lan"},{href:"/dashboard/skills",label:"Skills",icon:"extension"}];function j({onClose:e}){let t=(0,c.usePathname)(),[a,n]=(0,r.useState)(!1),[i,l]=(0,r.useState)(!1),[N,w]=(0,r.useState)(null),[C,S]=(0,r.useState)(!1),[O,I]=(0,r.useState)(!1),[T,P]=(0,r.useState)(0),[F,W]=(0,r.useState)(!1),{copied:A,copy:$}=(0,u.C)(2e3),R=m.h0.installCmdLatest;(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{e.enableTranslator&&W(!0)}).catch(()=>{})},[]),(0,r.useEffect)(()=>{fetch("/api/version").then(e=>e.json()).then(e=>{e.hasUpdate&&w(e)}).catch(()=>{})},[]);let _=e=>"/dashboard/endpoint"===e?"/dashboard"===t||t.startsWith("/dashboard/endpoint"):t.startsWith(e),E=async()=>{try{await navigator.clipboard.writeText(R)}catch{}$(R);let e=m.h0.shutdownCountdownSec;P(e);let t=setInterval(()=>{P(e-=1),e<=0&&(clearInterval(t),fetch("/api/version/shutdown",{method:"POST"}).catch(()=>{}),l(!0))},1e3)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("aside",{className:"flex w-72 flex-col border-r border-border-subtle bg-vibrancy backdrop-blur-xl transition-colors duration-300 min-h-full",children:[(0,s.jsxs)("div",{className:"px-6 py-4 flex flex-col gap-2",children:[(0,s.jsx)(o(),{href:"/dashboard",className:"flex items-center gap-3",children:(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("h1",{className:"text-lg font-semibold tracking-tight",children:[(0,s.jsx)("span",{className:"text-brand-500",children:"Poly"}),(0,s.jsx)("span",{className:"text-text-main",children:"Router"})]}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["v",m.vQ.version]})]})}),N&&(0,s.jsxs)("div",{className:"flex flex-col gap-1.5 p-1 -m-1",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-green-600 dark:text-green-500",children:["↑ New version available: v",N.latestVersion]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{onClick:()=>S(!0),className:"px-2 py-1 bg-green-600 hover:bg-green-700 dark:bg-green-500 dark:hover:bg-green-600 text-white text-[11px] font-semibold transition-colors cursor-pointer",children:"Update now"}),(0,s.jsx)("button",{onClick:()=>$(R),title:"Copy install command",className:"flex-1 text-left hover:opacity-80 transition-opacity cursor-pointer min-w-0",children:(0,s.jsx)("code",{className:"block text-[10px] text-green-600/80 dark:text-green-400/70 font-mono truncate",children:A?"✓ copied!":R})})]})]})]}),(0,s.jsxs)("nav",{className:"flex-1 px-4 py-2 space-y-0.5 overflow-y-auto custom-scrollbar",children:[b.map(t=>(0,s.jsxs)(o(),{href:t.href,onClick:e,className:(0,d.cn)("flex items-center gap-3 px-3 py-1 transition-all group",_(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:(0,d.cn)("material-symbols-outlined text-[18px]",_(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,s.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),(0,s.jsxs)("div",{className:"pt-3 mt-2 space-y-0.5",children:[(0,s.jsx)("p",{className:"px-4 text-xs font-semibold text-text-muted/60 uppercase tracking-wider mb-2",children:"System"}),(0,s.jsxs)("button",{onClick:()=>n(e=>!e),className:(0,d.cn)("w-full flex items-center gap-3 px-3 py-1 transition-all group",t.startsWith("/dashboard/media-providers")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"perm_media"}),(0,s.jsx)("span",{className:"text-[13px] font-medium flex-1 text-left",children:"Media Providers"}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] transition-transform",style:{transform:a?"rotate(180deg)":"rotate(0deg)"},children:"expand_more"})]}),a&&(0,s.jsxs)("div",{className:"pl-4",children:[x.rj.filter(e=>f.includes(e.id)).map(a=>(0,s.jsxs)(o(),{href:`/dashboard/media-providers/${a.id}`,onClick:e,className:(0,d.cn)("flex items-center gap-3 px-4 py-1 transition-all group",t.startsWith(`/dashboard/media-providers/${a.id}`)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:a.icon}),(0,s.jsx)("span",{className:"text-sm",children:a.label})]},a.id)),(0,s.jsxs)(o(),{href:g,onClick:e,className:(0,d.cn)("flex items-center gap-3 px-4 py-1 transition-all group",t.startsWith(g)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"travel_explore"}),(0,s.jsx)("span",{className:"text-sm",children:"Web Fetch & Search"})]},"web")]}),y.map(t=>(0,s.jsxs)(o(),{href:t.href,onClick:e,className:(0,d.cn)("flex items-center gap-3 px-3 py-1 transition-all group",_(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:(0,d.cn)("material-symbols-outlined text-[18px]",_(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,s.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),v.map(t=>"/dashboard/translator"!==t.href||F?(0,s.jsxs)(o(),{href:t.href,onClick:e,className:(0,d.cn)("flex items-center gap-3 px-3 py-1 transition-all group",_(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:(0,d.cn)("material-symbols-outlined text-[18px]",_(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,s.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href):null),(0,s.jsxs)(o(),{href:"/dashboard/profile",onClick:e,className:(0,d.cn)("flex items-center gap-3 px-3 py-1 transition-all group",_("/dashboard/profile")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,s.jsx)("span",{className:(0,d.cn)("material-symbols-outlined text-[18px]",_("/dashboard/profile")?"fill-1":"group-hover:text-primary transition-colors"),children:"settings"}),(0,s.jsx)("span",{className:"text-[13px] font-medium",children:"Settings"})]})]})]})]}),(0,s.jsx)(h.ConfirmModal,{isOpen:C,onClose:()=>S(!1),onConfirm:()=>{S(!1),I(!0)},title:"Update PolyRouter",message:`Show install command for v${N?.latestVersion||""}? You can copy it and shutdown to install manually.`,confirmText:"Show Command",cancelText:"Cancel",variant:"primary"}),(i||O)&&(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm p-6",children:O?(0,s.jsx)(k,{latestVersion:N?.latestVersion,installCmd:R,copied:A,onCopyAndShutdown:E,onCancel:()=>{I(!1),P(0)},countdown:T,isDisconnected:i}):(0,s.jsxs)("div",{className:"text-center p-8",children:[(0,s.jsx)("div",{className:"flex items-center justify-center size-16 rounded-full bg-red-500/20 text-red-500 mx-auto mb-4",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"power_off"})}),(0,s.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Server Disconnected"}),(0,s.jsx)("p",{className:"text-text-muted mb-6",children:"The proxy server has been stopped."}),(0,s.jsx)(p.default,{variant:"secondary",onClick:()=>globalThis.location.reload(),children:"Reload Page"})]})})]})}function k({latestVersion:e,installCmd:t,copied:a,onCopyAndShutdown:r,onCancel:n,countdown:i,isDisconnected:l}){let o=i>0;return(0,s.jsxs)("div",{className:"w-full max-w-lg bg-neutral-900/95 border border-white/10 p-6 text-white",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,s.jsx)("div",{className:"flex items-center justify-center size-11 rounded-full bg-green-500/20 text-green-400",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"content_copy"})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("h2",{className:"text-lg font-semibold",children:["Update PolyRouter",e?` to v${e}`:""]}),(0,s.jsx)("p",{className:"text-xs text-white/60",children:l?"Server stopped. Paste the command into a terminal to install.":o?`Command copied. Server will stop in ${i}s...`:"Click the button below to copy the install command and shutdown."})]})]}),(0,s.jsx)("p",{className:"text-sm text-white/80 mb-2",children:"Install command:"}),(0,s.jsx)("div",{className:"w-full px-3 py-2 bg-white/5 mb-4",children:(0,s.jsx)("code",{className:"text-xs font-mono text-green-400 break-all",children:t})}),(0,s.jsxs)("ol",{className:"text-xs text-white/70 space-y-1 list-decimal list-inside mb-4",children:[(0,s.jsxs)("li",{children:["Click ",(0,s.jsx)("strong",{children:"Copy & Shutdown"})," below."]}),(0,s.jsx)("li",{children:"Paste the command into your terminal and press Enter."}),(0,s.jsxs)("li",{children:["Run ",(0,s.jsx)("code",{className:"px-1 bg-white/10 text-green-400",children:"polyrouter"})," again after install."]})]}),l?(0,s.jsx)(p.default,{variant:"secondary",fullWidth:!0,onClick:()=>globalThis.location.reload(),children:"Reload Page"}):(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.default,{variant:"secondary",onClick:n,disabled:o,children:"Cancel"}),(0,s.jsx)(p.default,{variant:"primary",fullWidth:!0,onClick:r,disabled:o,children:a?"✓ Copied — shutting down...":o?`Shutting down in ${i}s`:"Copy & Shutdown"})]})]})}j.propTypes={onClose:i().func},k.propTypes={latestVersion:i().string,installCmd:i().string.isRequired,copied:i().bool,onCopyAndShutdown:i().func.isRequired,onCancel:i().func.isRequired,countdown:i().number,isDisconnected:i().bool}},94230:(e,t,a)=>{a.d(t,{default:()=>c});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(35497),o=a(11059);function c({isOpen:e,provider:t,onSuccess:a,onClose:n}){let[i,d]=(0,r.useState)("loading"),[m,x]=(0,r.useState)(""),[u,p]=(0,r.useState)(null),[h,f]=(0,r.useState)(""),[g,b]=(0,r.useState)(null),{copied:v,copy:y}=(0,o.C)(),j=(0,r.useRef)(!1);(0,r.useEffect)(()=>{e||(j.current=!1)},[e]),(0,r.useEffect)(()=>{e&&t&&(async()=>{try{b(null),d("loading");let e=await fetch(`/api/oauth/kiro/social-authorize?provider=${t}`),a=await e.json();if(!e.ok)throw Error(a.error);p(a),x(a.authUrl),d("input"),j.current||(j.current=!0,window.open(a.authUrl,"_blank"))}catch(e){b(e.message),d("error")}})()},[e,t]);let k=async()=>{try{let e;b(null);try{e=new URL(h)}catch(e){throw Error("Invalid callback URL format")}let s=e.searchParams.get("code");e.searchParams.get("state");let r=e.searchParams.get("error");if(r)throw Error(e.searchParams.get("error_description")||r);if(!s)throw Error("No authorization code found in URL");let n=await fetch("/api/oauth/kiro/social-exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:s,codeVerifier:u.codeVerifier,provider:t})}),i=await n.json();if(!n.ok)throw Error(i.error);d("success"),a?.()}catch(e){b(e.message),d("error")}},N="google"===t?"Google":"GitHub";return(0,s.jsx)(l.aF,{isOpen:e,title:`Connect Kiro via ${N}`,onClose:n,size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:["loading"===i&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Initializing..."}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Setting up ",N," authentication"]})]}),"input"===i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.pd,{value:m,readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,s.jsx)(l.$n,{variant:"secondary",icon:"auth_url"===v?"check":"content_copy",onClick:()=>y(m,"auth_url"),children:"Copy"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser address bar."}),(0,s.jsx)(l.pd,{value:h,onChange:e=>f(e.target.value),placeholder:"kiro://kiro.kiroAgent/authenticate-success?code=...",className:"font-mono text-xs"})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:k,fullWidth:!0,disabled:!h,children:"Connect"}),(0,s.jsx)(l.$n,{onClick:n,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===i&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your Kiro account via ",N," has been connected."]}),(0,s.jsx)(l.$n,{onClick:n,fullWidth:!0,children:"Done"})]}),"error"===i&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,s.jsx)("p",{className:"text-sm text-red-600 mb-4",children:g}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:()=>d("input"),variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,s.jsx)(l.$n,{onClick:n,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}c.propTypes={isOpen:i().bool.isRequired,provider:i().oneOf(["google","github"]).isRequired,onSuccess:i().func,onClose:i().func.isRequired}},95088:(e,t,a)=>{a.d(t,{default:()=>c});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(35497);let o="https://gitlab.com";function c({isOpen:e,providerInfo:t,onSuccess:a,onClose:n}){let i,[d,m]=(0,r.useState)(null),[x,u]=(0,r.useState)(o),[p,h]=(0,r.useState)(""),[f,g]=(0,r.useState)(""),[b,v]=(0,r.useState)(""),[y,j]=(0,r.useState)(!1),[k,N]=(0,r.useState)(null),[w,C]=(0,r.useState)(!1),[S,O]=(0,r.useState)(null),I=()=>{m(null),u(o),h(""),g(""),v(""),N(null),j(!1),C(!1),O(null),n()},T=async()=>{if(!b.trim())return void N("Personal Access Token is required");j(!0),N(null);try{let e=await fetch("/api/oauth/gitlab/pat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:b.trim(),baseUrl:x.trim()||o})}),t=await e.json();if(!e.ok)throw Error(t.error||"Authentication failed");a?.(),I()}catch(e){N(e.message)}finally{j(!1)}};return e?w&&S?(0,s.jsx)(l.LF,{isOpen:!0,provider:"gitlab",providerInfo:t,oauthMeta:S,onSuccess:()=>{a?.(),I()},onClose:()=>{C(!1),O(null)}}):(0,s.jsx)(l.aF,{isOpen:e,title:"Connect GitLab Duo",onClose:I,size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[!d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Choose how to authenticate with GitLab Duo:"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("button",{onClick:()=>m("oauth"),className:"flex flex-col items-center gap-2 p-4 border border-border hover:border-primary hover:bg-primary/5 transition-colors text-left",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-2xl text-primary",children:"lock_open"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"OAuth App"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a GitLab OAuth application"})]})]}),(0,s.jsxs)("button",{onClick:()=>m("pat"),className:"flex flex-col items-center gap-2 p-4 border border-border hover:border-primary hover:bg-primary/5 transition-colors text-left",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-2xl text-primary",children:"key"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Personal Access Token"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a GitLab PAT with api scope"})]})]})]})]}),"oauth"===d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Create an OAuth app at"," ",(0,s.jsx)("a",{href:`${x.trim()||o}/-/profile/applications`,target:"_blank",rel:"noreferrer",className:"text-primary underline",children:"GitLab Applications"})," ","with redirect URI"," ",(0,s.jsx)("code",{className:"bg-sidebar px-1 text-xs",children:(i=window.location.port||("https:"===window.location.protocol?"443":"80"),`http://localhost:${i}/callback`)})]}),(0,s.jsx)(l.pd,{label:"GitLab Base URL",value:x,onChange:e=>u(e.target.value),placeholder:o}),(0,s.jsx)(l.pd,{label:"Client ID",value:p,onChange:e=>h(e.target.value),placeholder:"Your OAuth application client ID"}),(0,s.jsx)(l.pd,{label:"Client Secret (optional for PKCE)",value:f,onChange:e=>g(e.target.value),placeholder:"Leave empty for public PKCE app"}),k&&(0,s.jsx)("p",{className:"text-sm text-red-500",children:k}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:()=>{p.trim()?(N(null),O({baseUrl:x.trim()||o,clientId:p.trim(),clientSecret:f.trim()}),C(!0)):N("Client ID is required")},fullWidth:!0,disabled:!p.trim(),children:"Authorize"}),(0,s.jsx)(l.$n,{onClick:()=>{m(null),N(null)},variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"pat"===d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Create a PAT at"," ",(0,s.jsx)("a",{href:`${x.trim()||o}/-/user_settings/personal_access_tokens`,target:"_blank",rel:"noreferrer",className:"text-primary underline",children:"GitLab Access Tokens"})," ","with scopes: ",(0,s.jsx)("code",{className:"bg-sidebar px-1 text-xs",children:"api"}),","," ",(0,s.jsx)("code",{className:"bg-sidebar px-1 text-xs",children:"read_user"}),", and"," ",(0,s.jsx)("code",{className:"bg-sidebar px-1 text-xs",children:"ai_features"}),"."]}),(0,s.jsx)(l.pd,{label:"GitLab Base URL",value:x,onChange:e=>u(e.target.value),placeholder:o}),(0,s.jsx)(l.pd,{label:"Personal Access Token",value:b,onChange:e=>v(e.target.value),placeholder:"glpat-xxxxxxxxxxxxxxxxxxxx",type:"password"}),k&&(0,s.jsx)("p",{className:"text-sm text-red-500",children:k}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:T,fullWidth:!0,disabled:!b.trim()||y,loading:y,children:"Connect"}),(0,s.jsx)(l.$n,{onClick:()=>{m(null),N(null)},variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})}):null}c.propTypes={isOpen:i().bool.isRequired,providerInfo:i().shape({name:i().string}),onSuccess:i().func,onClose:i().func.isRequired}},96748:(e,t,a)=>{a.d(t,{default:()=>c});var s=a(95155),r=a(12115),n=a(14051),i=a.n(n),l=a(35497);let o="https://api.openai.com/v1";function c({isOpen:e,onClose:t,onCreated:a,onSaved:n,node:i}){let d=!!i,[m,x]=(0,r.useState)({name:"",prefix:"",baseUrl:o}),[u,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)(""),[g,b]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),[j,k]=(0,r.useState)(null);(0,r.useEffect)(()=>{e&&(k(null),f(""),b(""),d?x({name:i.name||"",prefix:i.prefix||"",baseUrl:i.baseUrl||o}):x({name:"",prefix:"",baseUrl:o}))},[e,d,i]);let N=async()=>{if(m.name.trim()&&m.prefix.trim()&&m.baseUrl.trim()){p(!0);try{let e=d?`/api/provider-nodes/${i.id}`:"/api/provider-nodes",t=d?"PUT":"POST",s={name:m.name,prefix:m.prefix,baseUrl:m.baseUrl};d||(s.type="custom-embedding");let r=await fetch(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),l=await r.json();r.ok&&(d?n?.(l.node):a?.(l.node))}catch(e){console.log("Error saving custom embedding node:",e)}finally{p(!1)}}},w=async()=>{y(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:m.baseUrl,apiKey:h,type:"custom-embedding",modelId:g.trim()||void 0})}),t=await e.json();k(t)}catch{k({valid:!1,error:"Network error"})}finally{y(!1)}};return(0,s.jsx)(l.aF,{isOpen:e,title:d?"Edit Custom Embedding":"Add Custom Embedding",onClose:t,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(l.pd,{label:"Name",value:m.name,onChange:e=>x({...m,name:e.target.value}),placeholder:"Voyage AI",hint:"Required. A friendly label for this embedding provider."}),(0,s.jsx)(l.pd,{label:"Prefix",value:m.prefix,onChange:e=>x({...m,prefix:e.target.value}),placeholder:"voyage",hint:"Required. Used as the provider prefix for model IDs (e.g. voyage/voyage-3)."}),(0,s.jsx)(l.pd,{label:"Base URL",value:m.baseUrl,onChange:e=>x({...m,baseUrl:e.target.value}),placeholder:"https://api.voyageai.com/v1",hint:"Most embedding APIs are OpenAI-compatible: Voyage, Cohere, Jina, Mistral, Together..."}),(0,s.jsx)(l.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>f(e.target.value)}),(0,s.jsx)(l.pd,{label:"Model ID (for Check)",value:g,onChange:e=>b(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",hint:"Required for validation. Will send a test embeddings request."}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(l.$n,{onClick:w,disabled:!h||!g.trim()||v||!m.baseUrl.trim(),variant:"secondary",children:v?"Checking...":"Check"}),(()=>{if(!j)return null;let{valid:e,error:t,dimensions:a}=j;return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.Ex,{variant:"success",children:"Valid"}),a&&(0,s.jsxs)("span",{className:"text-sm text-text-muted",children:[a," dims"]})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(l.Ex,{variant:"error",children:"Invalid"}),t&&(0,s.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:N,fullWidth:!0,disabled:!m.name.trim()||!m.prefix.trim()||!m.baseUrl.trim()||u,children:u?d?"Saving...":"Creating...":d?"Save":"Create"}),(0,s.jsx)(l.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}c.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func,onSaved:i().func,node:i().shape({id:i().string,name:i().string,prefix:i().string,baseUrl:i().string})}},97556:(e,t,a)=>{a.d(t,{default:()=>o});var s=a(95155),r=a(12115),n=a(9233),i=a(81127),l=a(90620);function o({isOpen:e,onClose:t}){let[a,c]=(0,r.useState)(""),[d,m]=(0,r.useState)(!1),[x,u]=(0,r.useState)("");return(0,r.useEffect)(()=>{e&&!a&&(m(!0),u(""),fetch(l.Nu.changelogUrl).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()}).then(e=>c(n.xI.parse(e))).catch(e=>u(e.message||"Failed to load")).finally(()=>m(!1)))},[e,a]),(0,s.jsx)(i.default,{isOpen:e,onClose:t,title:"Change Log",size:"full",className:"flex flex-col max-h-[85vh]",children:(0,s.jsxs)("div",{className:"overflow-y-auto flex-1 -mx-5 -my-5 px-5 py-5",children:[d&&(0,s.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}),x&&(0,s.jsxs)("div",{className:"text-red-500 py-4",children:["Failed to load changelog: ",x]}),!d&&!x&&a&&(0,s.jsx)("div",{className:"changelog-body text-text-main",dangerouslySetInnerHTML:{__html:a}})]})})}n.xI.setOptions({gfm:!0,breaks:!0})},97677:(e,t,a)=>{a.d(t,{default:()=>r});var s=a(95155);function r({text:e,children:t,position:a="top"}){return(0,s.jsxs)("div",{className:"relative inline-flex group/tt",children:[t,(0,s.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"}[a]} z-50 w-max max-w-64 opacity-0 group-hover/tt:opacity-100 transition-opacity duration-150 delay-200`,children:(0,s.jsxs)("div",{className:"relative px-2.5 py-1.5 text-[11px] leading-snug bg-surface border border-border shadow-[var(--shadow-elev)] text-text-main whitespace-normal",children:[e,(0,s.jsx)("div",{className:`absolute w-0 h-0 ${{top:"left-1/2 -translate-x-1/2 top-full -mt-px border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-surface border-t dark:border-t-[var(--color-surface)]",bottom:"left-1/2 -translate-x-1/2 bottom-full -mb-px border-l-4 border-r-4 border-b-4 border-l-transparent border-r-transparent border-b-surface border-b dark:border-b-[var(--color-surface)]",left:"top-1/2 -translate-y-1/2 left-full -ml-px border-t-4 border-b-4 border-l-4 border-t-transparent border-b-transparent border-l-surface border-l dark:border-l-[var(--color-surface)]",right:"top-1/2 -translate-y-1/2 right-full -mr-px border-t-4 border-b-4 border-r-4 border-t-transparent border-b-transparent border-r-surface border-r dark:border-r-[var(--color-surface)]"}[a]}`})]})})]})}},98542:(e,t,a)=>{a.d(t,{default:()=>n});var s=a(95155),r=a(31474);function n({checked:e=!1,onChange:t,label:a,description:i,disabled:l=!1,size:o="md",className:c}){let d={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"size-6",translate:"translate-x-7"}};return(0,s.jsxs)("div",{className:(0,r.cn)("flex items-center gap-3",l&&"opacity-50 cursor-not-allowed",c),children:[(0,s.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:l,onClick:()=>{!l&&t&&t(!e)},className:(0,r.cn)("relative inline-flex shrink-0 cursor-pointer rounded-full","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-brand-500/30",e?"bg-brand-500":"bg-surface-3",d[o].track,l&&"cursor-not-allowed"),children:(0,s.jsx)("span",{className:(0,r.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",e?d[o].translate:"translate-x-0.5",d[o].thumb,"mt-0.5")})}),(a||i)&&(0,s.jsxs)("div",{className:"flex flex-col",children:[a&&(0,s.jsx)("span",{className:"text-sm font-medium text-text-main",children:a}),i&&(0,s.jsx)("span",{className:"text-xs text-text-muted",children:i})]})]})}}}]);