@techysy/10router 1.0.7 → 1.1.0

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 (972) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +8 -6
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +2 -2
  5. package/app/.next-cli-build/routes-manifest.json +18 -8
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/_global-error/page.js +1 -1
  76. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  86. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  88. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  89. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  90. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +2 -2
  106. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
  114. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  134. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  142. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -0
  174. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -0
  175. package/app/.next-cli-build/server/app/api/keys/rotate/route_client-reference-manifest.js +1 -0
  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 +1 -1
  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/codebuddy-cn/bulk-import/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  219. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -0
  239. package/app/.next-cli-build/server/app/api/{providers/[id]/json-models → oauth/xiaomi-mimo/api-key}/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route_client-reference-manifest.js +1 -0
  241. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +4 -0
  242. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -0
  243. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route_client-reference-manifest.js +1 -0
  244. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  277. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  279. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  283. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  285. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  287. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  289. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  291. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  293. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  295. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  297. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  299. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  317. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  359. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  373. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  413. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  415. package/app/.next-cli-build/server/app/callback.html +1 -1
  416. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  417. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  418. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  419. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  420. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  421. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  422. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +6 -6
  423. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  424. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  427. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -6
  428. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  429. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  431. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  432. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +6 -6
  433. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  434. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  436. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  437. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
  438. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  439. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  440. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  442. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +6 -6
  443. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  444. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  447. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -6
  448. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  449. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  452. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +6 -6
  453. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  454. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  456. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  457. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +6 -6
  458. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  459. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  461. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  462. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +6 -6
  463. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  464. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  467. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +6 -6
  468. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  469. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  472. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +6 -6
  473. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  474. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  476. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  477. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -7
  478. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  479. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  485. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  486. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
  488. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  489. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  490. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +6 -6
  491. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  492. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  495. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
  496. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  497. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  499. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  500. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +6 -6
  501. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  502. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  505. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +6 -6
  506. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  507. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  509. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  510. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +6 -6
  511. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  512. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  513. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  514. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  515. package/app/.next-cli-build/server/app/index.html +1 -1
  516. package/app/.next-cli-build/server/app/index.rsc +4 -4
  517. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  518. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  519. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  520. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  521. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  522. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  523. package/app/.next-cli-build/server/app/landing.html +1 -1
  524. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  525. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  526. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
  528. package/app/.next-cli-build/server/app/login/page.js +1 -1
  529. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  530. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  531. package/app/.next-cli-build/server/app/login.html +1 -1
  532. package/app/.next-cli-build/server/app/login.rsc +5 -5
  533. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  534. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
  536. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  537. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  538. package/app/.next-cli-build/server/app/page.js +1 -1
  539. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  540. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  541. package/app/.next-cli-build/server/app-paths-manifest.json +8 -6
  542. package/app/.next-cli-build/server/chunks/1260.js +1 -1
  543. package/app/.next-cli-build/server/chunks/1377.js +1 -1
  544. package/app/.next-cli-build/server/chunks/1636.js +1 -1
  545. package/app/.next-cli-build/server/chunks/1937.js +1 -1
  546. package/app/.next-cli-build/server/chunks/1998.js +1 -1
  547. package/app/.next-cli-build/server/chunks/2132.js +1 -0
  548. package/app/.next-cli-build/server/chunks/2179.js +1 -1
  549. package/app/.next-cli-build/server/chunks/2391.js +1 -1
  550. package/app/.next-cli-build/server/chunks/241.js +1 -1
  551. package/app/.next-cli-build/server/chunks/2732.js +1 -1
  552. package/app/.next-cli-build/server/chunks/2765.js +1 -0
  553. package/app/.next-cli-build/server/chunks/295.js +1 -1
  554. package/app/.next-cli-build/server/chunks/318.js +10 -10
  555. package/app/.next-cli-build/server/chunks/3212.js +1 -1
  556. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  557. package/app/.next-cli-build/server/chunks/3662.js +1 -0
  558. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  559. package/app/.next-cli-build/server/chunks/3962.js +1 -1
  560. package/app/.next-cli-build/server/chunks/4037.js +1 -1
  561. package/app/.next-cli-build/server/chunks/4049.js +1 -1
  562. package/app/.next-cli-build/server/chunks/412.js +1 -1
  563. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  564. package/app/.next-cli-build/server/chunks/4152.js +1 -0
  565. package/app/.next-cli-build/server/chunks/4665.js +1 -1
  566. package/app/.next-cli-build/server/chunks/4755.js +1 -0
  567. package/app/.next-cli-build/server/chunks/4985.js +1 -1
  568. package/app/.next-cli-build/server/chunks/5182.js +1 -1
  569. package/app/.next-cli-build/server/chunks/525.js +1 -0
  570. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  571. package/app/.next-cli-build/server/chunks/5615.js +3 -3
  572. package/app/.next-cli-build/server/chunks/5781.js +2 -2
  573. package/app/.next-cli-build/server/chunks/595.js +1 -1
  574. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  575. package/app/.next-cli-build/server/chunks/615.js +1 -1
  576. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  577. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  578. package/app/.next-cli-build/server/chunks/6457.js +1 -1
  579. package/app/.next-cli-build/server/chunks/653.js +1 -1
  580. package/app/.next-cli-build/server/chunks/6844.js +1 -1
  581. package/app/.next-cli-build/server/chunks/6871.js +1 -0
  582. package/app/.next-cli-build/server/chunks/7211.js +1 -1
  583. package/app/.next-cli-build/server/chunks/7239.js +2 -2
  584. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  585. package/app/.next-cli-build/server/chunks/7322.js +2 -2
  586. package/app/.next-cli-build/server/chunks/7774.js +3 -3
  587. package/app/.next-cli-build/server/chunks/7805.js +24 -0
  588. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  589. package/app/.next-cli-build/server/chunks/8363.js +1 -1
  590. package/app/.next-cli-build/server/chunks/8444.js +1 -1
  591. package/app/.next-cli-build/server/chunks/8499.js +5 -5
  592. package/app/.next-cli-build/server/chunks/8546.js +1 -0
  593. package/app/.next-cli-build/server/chunks/869.js +1 -1
  594. package/app/.next-cli-build/server/chunks/8838.js +1 -1
  595. package/app/.next-cli-build/server/chunks/8895.js +9 -7
  596. package/app/.next-cli-build/server/chunks/8990.js +1 -0
  597. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  598. package/app/.next-cli-build/server/chunks/9896.js +1 -0
  599. package/app/.next-cli-build/server/instrumentation.js +1 -1
  600. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  601. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  602. package/app/.next-cli-build/server/middleware.js +8 -8
  603. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  604. package/app/.next-cli-build/server/pages/404.html +1 -1
  605. package/app/.next-cli-build/server/pages/500.html +1 -1
  606. package/app/.next-cli-build/static/chunks/1243-a9f0940294c15c24.js +3 -0
  607. package/app/.next-cli-build/static/chunks/1321-0167273f2d678ede.js +1 -0
  608. package/app/.next-cli-build/static/chunks/5497-a55c9d3d9f5b5cbf.js +7 -0
  609. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a2a6c56b7776af70.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-cd93d4f0b910293c.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-60c620ec082ed541.js +14 -0
  612. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c7ef8300ebeb4889.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-a52d19cb5aacd04f.js → layout-1cffa0a228a79ad6.js} +1 -1
  614. package/app/.next-cli-build/static/chunks/app/_global-error/page-f5ad4d359abeda22.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-f5ad4d359abeda22.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f5ad4d359abeda22.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f5ad4d359abeda22.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f5ad4d359abeda22.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f5ad4d359abeda22.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-f5ad4d359abeda22.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-f5ad4d359abeda22.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-f5ad4d359abeda22.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-f5ad4d359abeda22.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-f5ad4d359abeda22.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-f5ad4d359abeda22.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f5ad4d359abeda22.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f5ad4d359abeda22.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f5ad4d359abeda22.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f5ad4d359abeda22.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f5ad4d359abeda22.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f5ad4d359abeda22.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f5ad4d359abeda22.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f5ad4d359abeda22.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f5ad4d359abeda22.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f5ad4d359abeda22.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f5ad4d359abeda22.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-f5ad4d359abeda22.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f5ad4d359abeda22.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-f5ad4d359abeda22.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f5ad4d359abeda22.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f5ad4d359abeda22.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f5ad4d359abeda22.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f5ad4d359abeda22.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f5ad4d359abeda22.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f5ad4d359abeda22.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/combos/route-f5ad4d359abeda22.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-f5ad4d359abeda22.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-f5ad4d359abeda22.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-f5ad4d359abeda22.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-f5ad4d359abeda22.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-f5ad4d359abeda22.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-f5ad4d359abeda22.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/health/route-f5ad4d359abeda22.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/init/route-f5ad4d359abeda22.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f5ad4d359abeda22.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-f5ad4d359abeda22.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/keys/route-f5ad4d359abeda22.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/locale/route-f5ad4d359abeda22.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f5ad4d359abeda22.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f5ad4d359abeda22.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f5ad4d359abeda22.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f5ad4d359abeda22.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f5ad4d359abeda22.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f5ad4d359abeda22.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f5ad4d359abeda22.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-f5ad4d359abeda22.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-f5ad4d359abeda22.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-f5ad4d359abeda22.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f5ad4d359abeda22.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/models/route-f5ad4d359abeda22.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/models/test/route-f5ad4d359abeda22.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f5ad4d359abeda22.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-f5ad4d359abeda22.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-f5ad4d359abeda22.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-f5ad4d359abeda22.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-f5ad4d359abeda22.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f5ad4d359abeda22.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f5ad4d359abeda22.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f5ad4d359abeda22.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f5ad4d359abeda22.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f5ad4d359abeda22.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-f5ad4d359abeda22.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f5ad4d359abeda22.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f5ad4d359abeda22.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-f5ad4d359abeda22.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f5ad4d359abeda22.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f5ad4d359abeda22.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-f5ad4d359abeda22.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-f5ad4d359abeda22.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/pricing/route-f5ad4d359abeda22.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f5ad4d359abeda22.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f5ad4d359abeda22.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f5ad4d359abeda22.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f5ad4d359abeda22.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f5ad4d359abeda22.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f5ad4d359abeda22.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f5ad4d359abeda22.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-f5ad4d359abeda22.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f5ad4d359abeda22.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/providers/route-f5ad4d359abeda22.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f5ad4d359abeda22.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f5ad4d359abeda22.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f5ad4d359abeda22.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f5ad4d359abeda22.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f5ad4d359abeda22.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f5ad4d359abeda22.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f5ad4d359abeda22.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f5ad4d359abeda22.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f5ad4d359abeda22.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-f5ad4d359abeda22.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-f5ad4d359abeda22.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-f5ad4d359abeda22.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-f5ad4d359abeda22.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-f5ad4d359abeda22.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-f5ad4d359abeda22.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-f5ad4d359abeda22.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-f5ad4d359abeda22.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-f5ad4d359abeda22.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-f5ad4d359abeda22.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f5ad4d359abeda22.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f5ad4d359abeda22.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/settings/route-f5ad4d359abeda22.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-f5ad4d359abeda22.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/tags/route-f5ad4d359abeda22.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f5ad4d359abeda22.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f5ad4d359abeda22.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-f5ad4d359abeda22.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-f5ad4d359abeda22.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-f5ad4d359abeda22.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f5ad4d359abeda22.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f5ad4d359abeda22.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f5ad4d359abeda22.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f5ad4d359abeda22.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f5ad4d359abeda22.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f5ad4d359abeda22.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f5ad4d359abeda22.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f5ad4d359abeda22.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-f5ad4d359abeda22.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f5ad4d359abeda22.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f5ad4d359abeda22.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-f5ad4d359abeda22.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-f5ad4d359abeda22.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f5ad4d359abeda22.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f5ad4d359abeda22.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f5ad4d359abeda22.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f5ad4d359abeda22.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f5ad4d359abeda22.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f5ad4d359abeda22.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f5ad4d359abeda22.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f5ad4d359abeda22.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f5ad4d359abeda22.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f5ad4d359abeda22.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f5ad4d359abeda22.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f5ad4d359abeda22.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f5ad4d359abeda22.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f5ad4d359abeda22.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f5ad4d359abeda22.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f5ad4d359abeda22.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-f5ad4d359abeda22.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f5ad4d359abeda22.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f5ad4d359abeda22.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/v1/route-f5ad4d359abeda22.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-f5ad4d359abeda22.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-f5ad4d359abeda22.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-f5ad4d359abeda22.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-f5ad4d359abeda22.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-f5ad4d359abeda22.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f5ad4d359abeda22.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f5ad4d359abeda22.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f5ad4d359abeda22.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/version/route-f5ad4d359abeda22.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f5ad4d359abeda22.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/version/update/route-f5ad4d359abeda22.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f5ad4d359abeda22.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/page-f5ad4d359abeda22.js +1 -0
  776. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f5ad4d359abeda22.js +1 -0
  777. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f5ad4d359abeda22.js +1 -0
  778. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f5ad4d359abeda22.js +1 -0
  779. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f5ad4d359abeda22.js +1 -0
  780. package/app/.next-cli-build/static/rBJbR_XYSlh3OgKbcSSXs/_buildManifest.js +1 -0
  781. package/app/package.json +5 -3
  782. package/app/public/i18n/changelog/en.md +47 -1
  783. package/app/public/i18n/changelog/zh-CN.md +47 -1
  784. package/app/public/i18n/changelog/zh-TW.md +47 -1
  785. package/app/public/i18n/literals/zh-CN.json +101 -3
  786. package/app/public/i18n/literals/zh-TW.json +107 -2
  787. package/app/public/providers/amd.png +0 -0
  788. package/app/public/providers/xiaomi-mimo.png +0 -0
  789. package/app/src/lib/oauth/providers/xiaomi-mimo.js +169 -0
  790. package/app/src/mitm/server.js +23 -23
  791. package/app/src/shared/utils/apiKey.js +82 -24
  792. package/package.json +52 -52
  793. package/app/.next-cli-build/server/app/api/providers/[id]/json-models/route.js +0 -1
  794. package/app/.next-cli-build/server/app/api/providers/[id]/json-models/route_client-reference-manifest.js +0 -1
  795. package/app/.next-cli-build/server/chunks/1564.js +0 -1
  796. package/app/.next-cli-build/server/chunks/6212.js +0 -1
  797. package/app/.next-cli-build/server/chunks/7598.js +0 -1
  798. package/app/.next-cli-build/server/chunks/9140.js +0 -29
  799. package/app/.next-cli-build/server/chunks/9463.js +0 -1
  800. package/app/.next-cli-build/static/aKCEN8jaWm631dVqBrSte/_buildManifest.js +0 -1
  801. package/app/.next-cli-build/static/chunks/1243-53ff028412802304.js +0 -3
  802. package/app/.next-cli-build/static/chunks/1321-a54e76efdf16ea12.js +0 -1
  803. package/app/.next-cli-build/static/chunks/5497-cd84151680071f1d.js +0 -7
  804. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-1049c48c632926aa.js +0 -1
  805. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-75cd720b6edf6d23.js +0 -1
  806. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-d3c784cd4a50bef9.js +0 -14
  807. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-7b9bde3902dca2bb.js +0 -1
  808. package/app/.next-cli-build/static/chunks/app/_global-error/page-610e2a51edf6ccba.js +0 -1
  809. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-610e2a51edf6ccba.js +0 -1
  810. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-610e2a51edf6ccba.js +0 -1
  811. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-610e2a51edf6ccba.js +0 -1
  812. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-610e2a51edf6ccba.js +0 -1
  813. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-610e2a51edf6ccba.js +0 -1
  814. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-610e2a51edf6ccba.js +0 -1
  815. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-610e2a51edf6ccba.js +0 -1
  816. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-610e2a51edf6ccba.js +0 -1
  817. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-610e2a51edf6ccba.js +0 -1
  818. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-610e2a51edf6ccba.js +0 -1
  819. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-610e2a51edf6ccba.js +0 -1
  820. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-610e2a51edf6ccba.js +0 -1
  821. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-610e2a51edf6ccba.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-610e2a51edf6ccba.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-610e2a51edf6ccba.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-610e2a51edf6ccba.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-610e2a51edf6ccba.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-610e2a51edf6ccba.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-610e2a51edf6ccba.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-610e2a51edf6ccba.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-610e2a51edf6ccba.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-610e2a51edf6ccba.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-610e2a51edf6ccba.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-610e2a51edf6ccba.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-610e2a51edf6ccba.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-610e2a51edf6ccba.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-610e2a51edf6ccba.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-610e2a51edf6ccba.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-610e2a51edf6ccba.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-610e2a51edf6ccba.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-610e2a51edf6ccba.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/combos/route-610e2a51edf6ccba.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-610e2a51edf6ccba.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-610e2a51edf6ccba.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-610e2a51edf6ccba.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-610e2a51edf6ccba.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-610e2a51edf6ccba.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-610e2a51edf6ccba.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/health/route-610e2a51edf6ccba.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/init/route-610e2a51edf6ccba.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-610e2a51edf6ccba.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/keys/route-610e2a51edf6ccba.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/locale/route-610e2a51edf6ccba.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-610e2a51edf6ccba.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-610e2a51edf6ccba.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-610e2a51edf6ccba.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-610e2a51edf6ccba.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-610e2a51edf6ccba.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-610e2a51edf6ccba.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-610e2a51edf6ccba.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-610e2a51edf6ccba.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-610e2a51edf6ccba.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-610e2a51edf6ccba.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-610e2a51edf6ccba.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/models/route-610e2a51edf6ccba.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/models/test/route-610e2a51edf6ccba.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-610e2a51edf6ccba.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-610e2a51edf6ccba.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-610e2a51edf6ccba.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-610e2a51edf6ccba.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-610e2a51edf6ccba.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-610e2a51edf6ccba.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-610e2a51edf6ccba.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-610e2a51edf6ccba.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-610e2a51edf6ccba.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-610e2a51edf6ccba.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-610e2a51edf6ccba.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-610e2a51edf6ccba.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-610e2a51edf6ccba.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-610e2a51edf6ccba.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-610e2a51edf6ccba.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-610e2a51edf6ccba.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/pricing/route-610e2a51edf6ccba.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-610e2a51edf6ccba.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-610e2a51edf6ccba.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-610e2a51edf6ccba.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/json-models/route-610e2a51edf6ccba.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-610e2a51edf6ccba.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-610e2a51edf6ccba.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-610e2a51edf6ccba.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-610e2a51edf6ccba.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-610e2a51edf6ccba.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-610e2a51edf6ccba.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/providers/route-610e2a51edf6ccba.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-610e2a51edf6ccba.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-610e2a51edf6ccba.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-610e2a51edf6ccba.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-610e2a51edf6ccba.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-610e2a51edf6ccba.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-610e2a51edf6ccba.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-610e2a51edf6ccba.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-610e2a51edf6ccba.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-610e2a51edf6ccba.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-610e2a51edf6ccba.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-610e2a51edf6ccba.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-610e2a51edf6ccba.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-610e2a51edf6ccba.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-610e2a51edf6ccba.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-610e2a51edf6ccba.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-610e2a51edf6ccba.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-610e2a51edf6ccba.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-610e2a51edf6ccba.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-610e2a51edf6ccba.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-610e2a51edf6ccba.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-610e2a51edf6ccba.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/settings/route-610e2a51edf6ccba.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-610e2a51edf6ccba.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/tags/route-610e2a51edf6ccba.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-610e2a51edf6ccba.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-610e2a51edf6ccba.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-610e2a51edf6ccba.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-610e2a51edf6ccba.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-610e2a51edf6ccba.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-610e2a51edf6ccba.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-610e2a51edf6ccba.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-610e2a51edf6ccba.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-610e2a51edf6ccba.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-610e2a51edf6ccba.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-610e2a51edf6ccba.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-610e2a51edf6ccba.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-610e2a51edf6ccba.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-610e2a51edf6ccba.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-610e2a51edf6ccba.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-610e2a51edf6ccba.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-610e2a51edf6ccba.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-610e2a51edf6ccba.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-610e2a51edf6ccba.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-610e2a51edf6ccba.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-610e2a51edf6ccba.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-610e2a51edf6ccba.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-610e2a51edf6ccba.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-610e2a51edf6ccba.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-610e2a51edf6ccba.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-610e2a51edf6ccba.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-610e2a51edf6ccba.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-610e2a51edf6ccba.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-610e2a51edf6ccba.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-610e2a51edf6ccba.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-610e2a51edf6ccba.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-610e2a51edf6ccba.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-610e2a51edf6ccba.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-610e2a51edf6ccba.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-610e2a51edf6ccba.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-610e2a51edf6ccba.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-610e2a51edf6ccba.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/v1/route-610e2a51edf6ccba.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-610e2a51edf6ccba.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-610e2a51edf6ccba.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-610e2a51edf6ccba.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-610e2a51edf6ccba.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-610e2a51edf6ccba.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-610e2a51edf6ccba.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-610e2a51edf6ccba.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-610e2a51edf6ccba.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/version/route-610e2a51edf6ccba.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-610e2a51edf6ccba.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/version/update/route-610e2a51edf6ccba.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-610e2a51edf6ccba.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/page-610e2a51edf6ccba.js +0 -1
  968. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-610e2a51edf6ccba.js +0 -1
  969. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-610e2a51edf6ccba.js +0 -1
  970. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-610e2a51edf6ccba.js +0 -1
  971. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-610e2a51edf6ccba.js +0 -1
  972. /package/app/.next-cli-build/static/{aKCEN8jaWm631dVqBrSte → rBJbR_XYSlh3OgKbcSSXs}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{56836:(e,t,s)=>{Promise.resolve().then(s.bind(s,80191))},80191:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var l=s(95155),a=s(12115),i=s(44923),n=s(87256),r=s(39768),o=s(5020),d=s(35497),c=s(11059),m=s(929);s(88105);var x=s(73006);let p=/^[a-zA-Z0-9_.\-]+$/,u=[{key:"vision",label:"Vision",icon:"visibility",desc:"Images"},{key:"audioInput",label:"Audio",icon:"graphic_eq",desc:"Audio input"}],h={enabled:!0,roundRobin:!1,models:[]},b={vision:{...h},pdf:{...h},audioInput:{...h},videoInput:{...h}};function f(){let[e,t]=(0,a.useState)([]),[s,i]=(0,a.useState)(!0),[n,r]=(0,a.useState)(!1),[o,x]=(0,a.useState)(null),[p,f]=(0,a.useState)([]),[g,v]=(0,a.useState)({}),[N,k]=(0,a.useState)(b),{getCaps:C}=(0,m.y)(),[S,$]=(0,a.useState)(null),{copied:M,copy:A}=(0,c.C)();(0,a.useEffect)(()=>{E()},[]);let E=async()=>{try{let[s,l,a]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings")]),i=await s.json(),n=await l.json(),r=a.ok?await a.json():{};s.ok&&t((i.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),l.ok&&f(n.connections||[]),v(r.comboStrategies||{});let o=r.capacityAdapter||{},d={};for(let t of u){var e;d[t.key]=(e=o[t.key],Array.isArray(e)?{enabled:!0,roundRobin:!1,models:e.map(e=>e?.model||e).filter(Boolean)}:e&&"object"==typeof e?{enabled:!1!==e.enabled,roundRobin:!!e.roundRobin,models:Array.isArray(e.models)?e.models.filter(Boolean):[]}:{...h})}k(d)}catch(e){console.log("Error fetching data:",e)}finally{i(!1)}},T=async e=>{k(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({capacityAdapter:e})})}catch(e){console.log("Error updating capacity adapter:",e)}},O=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await E(),r(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},P=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await E(),x(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},F=async s=>{$({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{$(null);try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&t(e.filter(e=>e.id!==s))}catch(e){console.log("Error deleting combo:",e)}}})},R=async(e,t)=>{try{let s={...g},l={...s[e]||{},...t};l.fallbackStrategy&&"fallback"!==l.fallbackStrategy?s[e]=l:delete s[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})}),v(s)}catch(e){console.log("Error updating combo strategy:",e)}};return s?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(d.Qv,{}),(0,l.jsx)(d.Qv,{})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Group models under one name, then pick a strategy per combo:"}),(0,l.jsxs)("ul",{className:"text-sm text-text-muted mt-2 flex flex-col gap-1",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fallback"})," — tries models in order (next on failure)"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Round Robin"})," — rotates models across requests to spread load"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fusion"})," — queries all models in parallel, then a judge synthesizes one answer. Best quality, but costs the most: every request bills all panel models + the judge (N+1 calls)"]})]})]}),(0,l.jsx)(d.$n,{icon:"add",onClick:()=>r(!0),className:"w-full sm:w-auto whitespace-nowrap",children:"Create Combo"})]}),0===e.length?(0,l.jsx)(d.Zp,{children:(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,l.jsx)(d.$n,{icon:"add",onClick:()=>r(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,l.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>(0,l.jsx)(j,{combo:e,getCaps:C,activeProviders:p,copied:M,onCopy:A,onEdit:()=>x(e),onDelete:()=>F(e.id),strategy:g[e.name]||{},onSetStrategy:t=>R(e.name,t)},e.id))}),(0,l.jsx)(y,{capacityAdapter:N,onChange:T,activeProviders:p,getCaps:C}),n&&(0,l.jsx)(w,{isOpen:n,onClose:()=>r(!1),onSave:O,activeProviders:p},"create"),o&&(0,l.jsx)(w,{isOpen:!!o,combo:o,onClose:()=>x(null),onSave:e=>P(o.id,e),activeProviders:p},o.id),(0,l.jsx)(d.uo,{isOpen:!!S,onClose:()=>$(null),onConfirm:S?.onConfirm,title:S?.title||"Confirm",message:S?.message,variant:"danger"})]})}let g=[{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"fusion",label:"Fusion — panel + judge"}];function j({combo:e,getCaps:t,activeProviders:s=[],copied:i,onCopy:n,onEdit:r,onDelete:o,strategy:c={},onSetStrategy:m}){let[x,p]=(0,a.useState)(!1),u=c.fallbackStrategy||"fallback",h=c.judgeModel||"";return(0,l.jsxs)(d.Zp,{padding:"sm",className:"group",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,s)=>(0,l.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)(d.nh,{caps:t?.(e)})]},s)),e.models.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]}),"fusion"===u&&(0,l.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Judge"}),(0,l.jsxs)("button",{onClick:()=>p(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Pick the model that fuses panel answers",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"gavel"}),(0,l.jsx)("span",{className:"truncate",children:h||`Auto — ${e.models[0]||"first model"}`})]}),h&&(0,l.jsx)("button",{onClick:()=>m({judgeModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset judge to Auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]})]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsx)("div",{className:"w-full sm:w-[200px]",children:(0,l.jsx)(d.l6,{options:g,value:u,onChange:e=>m({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),n(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:i===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:r,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,l.jsxs)("button",{onClick:o,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),x&&(0,l.jsx)(d.rq,{isOpen:x,onClose:()=>p(!1),onSelect:e=>{m({judgeModel:e?.value||""}),p(!1)},activeProviders:s,title:"Select Judge Model",addedModelValues:h?[h]:[],closeOnSelect:!0})]})}function y({capacityAdapter:e,onChange:t,activeProviders:s,getCaps:a}){return(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("p",{className:"text-sm font-medium",children:(0,x.Tl)("Vision Adapter")}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:(0,x.Tl)("Your model can't read image/audio? Auto-switches to a model in the pool below.")}),(0,l.jsxs)("ul",{className:"mt-1.5 text-[11px] text-text-muted flex flex-col gap-0.5",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Vision"})," — ",(0,x.Tl)("Images")," (png, jpg, webp, …)"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Audio"})," — ",(0,x.Tl)("Audio input")]})]})]})}),(0,l.jsx)("div",{className:"flex flex-col gap-4",children:u.map(i=>(0,l.jsx)(v,{cap:i,entry:e[i.key]||h,onChange:s=>t({...e,[i.key]:s}),activeProviders:s,getCaps:a},i.key))})]})}function v({cap:e,entry:t,onChange:s,activeProviders:i,getCaps:n}){let[r,o]=(0,a.useState)(!1),{enabled:c,roundRobin:m,models:p}=t,u=e=>s({...t,...e}),h=(e,t)=>{let s=e+t;if(s<0||s>=p.length)return;let l=[...p];[l[e],l[s]]=[l[s],l[e]],u({models:l})};return(0,l.jsxs)(d.Zp,{padding:"sm",className:`group ${!c?"opacity-50":""}`,children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2.5 sm:items-center",children:[(0,l.jsx)(d.lM,{checked:c,onChange:e=>u({enabled:e}),"aria-label":`${(0,x.Tl)("Enable")} ${e.label} ${(0,x.Tl)("adapter")}`}),(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:e.icon})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("code",{className:"font-mono text-sm font-medium",children:e.label}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["— ",(0,x.Tl)(e.desc)]})]}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===p.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:(0,x.Tl)("No models")}):p.slice(0,3).map((e,t)=>(0,l.jsxs)("code",{className:"group/chip inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)(d.nh,{caps:n?.(e)}),(0,l.jsx)("button",{onClick:()=>h(t,-1),disabled:0===t,className:`leading-none opacity-0 group-hover/chip:opacity-100 ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary"}`,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:()=>h(t,1),disabled:t===p.length-1,className:`leading-none opacity-0 group-hover/chip:opacity-100 ${t===p.length-1?"text-text-muted/20":"text-text-muted hover:text-primary"}`,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})}),(0,l.jsx)("button",{onClick:()=>{let e;u({models:0===(e=p.filter((e,s)=>s!==t)).length?["oc/mimo-v2.5-free"]:e})},className:"leading-none opacity-0 group-hover/chip:opacity-100 text-text-muted hover:text-red-500",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},`${e}-${t}`)),p.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",p.length-3," ",(0,x.Tl)("more")]})]})]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer select-none",children:[(0,l.jsx)(d.lM,{checked:m,onChange:e=>u({roundRobin:e}),disabled:!c,"aria-label":`${(0,x.Tl)("Round-robin")} ${e.label} ${(0,x.Tl)("adapter")}`}),(0,l.jsx)("span",{children:(0,x.Tl)("Round")})]}),(0,l.jsx)(d.$n,{icon:"add",variant:"ghost",size:"sm",onClick:()=>o(!0),disabled:!c,title:`${(0,x.Tl)("Add Model")} — ${e.label}`,children:(0,x.Tl)("Add Model")})]})]}),r&&(0,l.jsx)(d.rq,{isOpen:r,onClose:()=>o(!1),onSelect:e=>{p.includes(e.value)||u({models:[...p,e.value]})},activeProviders:i,title:`Add ${e.label} Model`,addedModelValues:p,capFilter:e.key,closeOnSelect:!1})]})}function N({id:e,index:t,model:s,isFirst:i,isLast:o,onEdit:d,onMoveUp:c,onMoveDown:m,onRemove:x}){let{attributes:p,listeners:u,setNodeRef:h,transform:b,isDragging:f}=(0,n.gl)({id:e}),g={transform:r.Ks.Transform.toString(b),opacity:f?.4:1,zIndex:f?999:void 0},[j,y]=(0,a.useState)(!1),[v,w]=(0,a.useState)(s),k=()=>{let e=v.trim();e&&e!==s?d(e):w(s),y(!1)};return(0,l.jsxs)("div",{ref:h,style:g,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${f?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,l.jsx)("button",{...p,...u,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,l.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,l.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,l.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),j?(0,l.jsx)("input",{autoFocus:!0,value:v,onChange:e=>w(e.target.value),onBlur:k,onKeyDown:e=>{"Enter"===e.key&&k(),"Escape"===e.key&&(w(s),y(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,l.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>y(!0),title:"Click to edit",children:s}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,l.jsx)("button",{onClick:c,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:m,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,l.jsx)("button",{onClick:x,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function w({isOpen:e,combo:t,onClose:s,onSave:r,activeProviders:c,kindFilter:m=null}){let[x,u]=(0,a.useState)(t?.name||""),[h,b]=(0,a.useState)(t?.models||[]),[f,g]=(0,a.useState)(!1),[j,y]=(0,a.useState)(!1),[v,k]=(0,a.useState)(""),[C,S]=(0,a.useState)({}),$=(0,i.FR)((0,i.MS)(i.AN,{activationConstraint:{distance:5}}),(0,i.MS)(i.uN,{coordinateGetter:n.JR})),M=h.map((e,t)=>({uid:`item-${t}`,model:e})),A=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();S(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,a.useEffect)(()=>{e&&A()},[e]);let E=e=>e.trim()?p.test(e)?(k(""),!0):(k("Only letters, numbers, -, _ and . allowed"),!1):(k("Name is required"),!1),T=async()=>{E(x)&&(y(!0),await r({name:x.trim(),models:h}),y(!1))},O=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.aF,{isOpen:e,onClose:s,title:O?"Edit Combo":"Create Combo",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(d.pd,{label:"Combo Name",value:x,onChange:e=>{let t=e.target.value;u(t),t?E(t):k("")},placeholder:"my-combo",error:v}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===h.length?(0,l.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,l.jsx)(i.Mp,{sensors:$,collisionDetection:i.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=M.findIndex(e=>e.uid===t.id),l=M.findIndex(e=>e.uid===s.id);-1!==e&&-1!==l&&b(t=>(0,n.be)(t,e,l))}},modifiers:[o.FN,o.gj],children:(0,l.jsx)(n.gB,{items:M.map(e=>e.uid),strategy:n._G,children:(0,l.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:M.map(({uid:e,model:t},s)=>(0,l.jsx)(N,{id:e,index:s,model:t,isFirst:0===s,isLast:s===M.length-1,onEdit:e=>{let t=[...h];t[s]=e,b(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...h];[t[e-1],t[e]]=[t[e],t[e-1]],b(t)})(s),onMoveDown:()=>(e=>{if(e===h.length-1)return;let t=[...h];[t[e],t[e+1]]=[t[e+1],t[e]],b(t)})(s),onRemove:()=>{b(h.filter((e,t)=>t!==s))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>g(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,l.jsx)(d.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(d.$n,{onClick:T,fullWidth:!0,size:"sm",disabled:!x.trim()||!!v||j,children:j?"Saving...":O?"Save":"Create"})]})]})}),f&&(0,l.jsx)(d.rq,{isOpen:f,onClose:()=>g(!1),onSelect:e=>{h.includes(e.value)||b([...h,e.value])},onDeselect:e=>{b(h.filter(t=>t!==e.value))},activeProviders:c,modelAliases:C,title:"Add Model to Combo",kindFilter:m,addedModelValues:h,closeOnSelect:!1})]})}},84680:(e,t,s)=>{"use strict";s.d(t,{PM:()=>l.PM,Sj:()=>l.Sj,Vy:()=>l.Vy,fF:()=>l.fF,sl:()=>l.sl,vL:()=>l.vL,y$:()=>l.y$,zM:()=>l.zM});var l=s(44923)}},e=>{e.O(0,[4614,5353,1321,5497,8441,3794,7358],()=>e(e.s=56836)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{13966:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),r=s(12115),l=s(35497),i=s(81127),o=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202),p=s(45496),u=s(73006);function h(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}function b(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[m,b]=(0,r.useState)(()=>h()),[g,f]=(0,r.useState)(!0),[y,j]=(0,r.useState)(!1),[N,w]=(0,r.useState)(!1),[v,S]=(0,r.useState)(!1),[C,k]=(0,r.useState)({fallbackStrategy:"fill-first"}),[I,L]=(0,r.useState)(!0),[A,P]=(0,r.useState)({current:"",new:"",confirm:""}),[O,M]=(0,r.useState)({type:"",message:""}),[T,E]=(0,r.useState)(!1),[R,D]=(0,r.useState)(!1),[U,$]=(0,r.useState)({type:"",message:""}),[F,J]=(0,r.useState)({open:!1,mode:"",password:""}),q=(0,r.useRef)(null),[B,_]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[H,z]=(0,r.useState)(""),[X,K]=(0,r.useState)({type:"",message:""}),[Z,W]=(0,r.useState)(!1),[G,Q]=(0,r.useState)(!1),[V,Y]=(0,r.useState)({type:"",message:""}),[ee,et]=(0,r.useState)(!1),es=window.location.origin,ea=es?`${es}/api/auth/oidc/callback`:"/api/auth/oidc/callback",er=es?`${es}/api/auth/saml/acs`:"/api/auth/saml/acs",el=es?`${es}/api/auth/saml/metadata`:"/api/auth/saml/metadata",[ei,eo]=(0,r.useState)("saml"),[en,ed]=(0,r.useState)({samlEntryPoint:"",samlIssuer:"urn:10router:sp",samlCert:"",samlLoginLabel:"Sign in with SAML SSO",samlAttributeEmail:"email",samlAttributeName:"name"}),[ec,em]=(0,r.useState)({type:"",message:""}),[ex,ep]=(0,r.useState)(!1),[eu,eh]=(0,r.useState)(!1),[eb,eg]=(0,r.useState)({type:"",message:""}),[ef,ey]=(0,r.useState)(!1),ej=(0,r.useRef)(null),eN=(0,r.useRef)(null),ew=(0,r.useRef)(null),ev=(0,r.useRef)(null),eS=(0,r.useRef)(null),[eC,ek]=(0,r.useState)({type:"",message:""}),[eI,eL]=(0,r.useState)(!1),[eA,eP]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[eO,eM]=(0,r.useState)({type:"",message:""}),[eT,eE]=(0,r.useState)(!1),[eR,eD]=(0,r.useState)(!1),[eU,e$]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e$(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]),(0,r.useEffect)(()=>{b(h()),f((0,p.i)())},[y]);let eF=async()=>{let e=!0!==C.modelJsonImport;try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({modelJsonImport:e})}),s=await t.json();t.ok&&k(e=>({...e,...s}))}catch(e){console.log("Error toggling model JSON import:",e)}},eJ=async()=>{let e=!0!==C.providerDisabledLastSort;try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerDisabledLastSort:e})}),s=await t.json();t.ok&&k(e=>({...e,...s}))}catch(e){console.log("Error toggling provider disabled-last sort:",e)}},eq=async()=>{let e=!1===C.showCommunityProviders;try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({showCommunityProviders:e})}),s=await t.json();t.ok&&k(e=>({...e,...s}))}catch(e){console.log("Error toggling show-community-providers:",e)}},eB=async()=>{let e=!0!==C.codeBuddyOAuthImport;try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({codeBuddyOAuthImport:e})}),s=await t.json();t.ok&&k(e=>({...e,...s}))}catch(e){console.log("Error toggling codebuddy OAuth import:",e)}},e_=async()=>{let e=!0!==C.codeBuddyCheckin;try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({codeBuddyCheckin:e})}),s=await t.json();t.ok&&k(e=>({...e,...s}))}catch(e){console.log("Error toggling codebuddy auto check-in:",e)}};(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{k(e),_({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),z(""),eo(e?.ssoType||"saml"),ed({samlEntryPoint:e?.samlEntryPoint||"",samlIssuer:e?.samlIssuer||"urn:10router:sp",samlCert:e?.samlCert||"",samlLoginLabel:e?.samlLoginLabel||"Sign in with SAML SSO",samlAttributeEmail:e?.samlAttributeEmail||"email",samlAttributeName:e?.samlAttributeName||"name"}),(e?.authMode==="sso"||e?.authMode==="saml"||e?.authMode==="oidc"||e?.authMode==="both")&&et(!0),eP({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),L(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),L(!1)})},[]);let eH=async e=>{if(e.preventDefault(),!0===C.outboundProxyEnabled){eE(!0),eM({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:eA.outboundProxyUrl,outboundNoProxy:eA.outboundNoProxy})}),t=await e.json();e.ok?(k(e=>({...e,...t})),eM({type:"success",message:"Proxy settings applied"})):eM({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){eM({type:"error",message:"An error occurred"})}finally{eE(!1)}}},ez=async()=>{if(!0!==C.outboundProxyEnabled)return;let e=(eA.outboundProxyUrl||"").trim();if(!e)return void eM({type:"error",message:"Please enter a Proxy URL to test"});eD(!0),eM({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?eM({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):eM({type:"error",message:s?.error||"Proxy test failed"})}catch(e){eM({type:"error",message:"An error occurred"})}finally{eD(!1)}},eX=async e=>{eE(!0),eM({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(k(e=>({...e,...s})),eP(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),eM({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):eM({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){eM({type:"error",message:"An error occurred"})}finally{eE(!1)}},eK=async e=>{if(e.preventDefault(),A.new!==A.confirm)return void M({type:"error",message:"Passwords do not match"});E(!0),M({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:A.current,newPassword:A.new})}),t=await e.json();e.ok?(M({type:"success",message:"Password updated successfully"}),P({current:"",new:"",confirm:""})):M({type:"error",message:t.error||"Failed to update password"})}catch(e){M({type:"error",message:"An error occurred"})}finally{E(!1)}},eZ=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&k(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eW=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&k(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eG=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&k(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eQ=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&k(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eV=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&k(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},eY=(e,t)=>{_(s=>({...s,[e]:t}))},e0=async(e=B.authMode||"password")=>{let t=B.oidcIssuerUrl.trim(),s=B.oidcClientId.trim(),a=B.oidcScopes.trim(),r=B.oidcLoginLabel.trim(),l=H.trim();if("password"!==e&&(!t||!s||!l)&&!C.oidcConfigured)return void K({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});W(!0),K({type:"",message:""}),Y({type:"",message:""});try{let i={authMode:e,ssoType:"oidc",oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};l&&(i.oidcClientSecret=l);let o=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await o.json();o.ok?(k(e=>({...e,...n})),_({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),z(""),K({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):K({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){K({type:"error",message:"An error occurred"})}finally{W(!1)}},e1=async()=>{let e=B.oidcIssuerUrl.trim(),t=B.oidcClientId.trim(),s=B.oidcScopes.trim(),a=H.trim();if(!e||!t)return void Y({type:"error",message:"Issuer URL and client ID are required to test the connection."});Q(!0),K({type:"",message:""}),Y({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:B.authMode||C.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:B.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),l=await r.json().catch(()=>({}));if(!r.ok)return void Y({type:"error",message:l.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:l.oidcIssuerUrl||e,clientId:l.oidcClientId||t,scopes:l.oidcScopes||s||"openid profile email"})}),o=await i.json().catch(()=>({}));if(i.ok&&o?.ok){let e=o.clientSecretTested?!0===o.clientSecretValid?`Connection OK. Discovery loaded from ${o.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${o.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${o.issuerUrl}.`;Y({type:"success",message:e})}else Y({type:"error",message:o.error||"OIDC connection test failed"})}catch(e){Y({type:"error",message:"An error occurred"})}finally{Q(!1)}},e5=(e,t)=>{ed(s=>({...s,[e]:t}))},e2=async(e=B.authMode||"password")=>{ep(!0),em({type:"",message:""}),eg({type:"",message:""});try{let t={authMode:e,ssoType:"saml",samlEntryPoint:en.samlEntryPoint.trim(),samlIssuer:en.samlIssuer.trim()||"urn:10router:sp",samlCert:en.samlCert.trim(),samlLoginLabel:en.samlLoginLabel.trim()||"Sign in with SAML SSO",samlAttributeEmail:en.samlAttributeEmail.trim()||"email",samlAttributeName:en.samlAttributeName.trim()||"name"},s=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),a=await s.json();s.ok?(k(e=>({...e,...a})),ed({samlEntryPoint:a?.samlEntryPoint||t.samlEntryPoint,samlIssuer:a?.samlIssuer||t.samlIssuer,samlCert:a?.samlCert||t.samlCert,samlLoginLabel:a?.samlLoginLabel||t.samlLoginLabel,samlAttributeEmail:a?.samlAttributeEmail||t.samlAttributeEmail,samlAttributeName:a?.samlAttributeName||t.samlAttributeName}),em({type:"success",message:"sso"===e||"saml"===e?"SAML SSO login enabled":"both"===e?"Password and SAML SSO login enabled":"SAML 2.0 settings saved"})):em({type:"error",message:a.error||"Failed to save SAML settings"})}catch{em({type:"error",message:"An error occurred while saving SAML settings"})}finally{ep(!1)}},e4=async()=>{eh(!0),em({type:"",message:""}),eg({type:"",message:""});try{let e=await fetch("/api/auth/saml/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({samlEntryPoint:en.samlEntryPoint.trim(),samlIssuer:en.samlIssuer.trim(),samlCert:en.samlCert.trim()})}),t=await e.json();e.ok&&t.ok?eg({type:"success",message:t.message||"SAML configuration verified!"}):eg({type:"error",message:t.error||"SAML configuration test failed"})}catch{eg({type:"error",message:"An error occurred while testing SAML configuration"})}finally{eh(!1)}},e3=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&k(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},e6=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();k(t)}catch(e){console.error("Failed to reload settings:",e)}},e9=async e=>{D(!0),$({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),l=URL.createObjectURL(r),i=document.createElement("a"),o=new Date().toISOString().replace(/[.:]/g,"-");i.href=l,i.download=`10router-backup-${o}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(l),$({type:"success",message:"Database backup downloaded"})}catch(e){$({type:"error",message:e.message||"Failed to export database"})}finally{D(!1)}},e7=async(e,t=null)=>{eL(!0),ek({type:"",message:""});try{let s=new FormData;s.append("file",e);let a=await fetch("/api/settings/database/import-usage",{method:"POST",body:s,...t?{headers:{"x-9r-password":t}}:{}}),r=await a.json();if(!a.ok){if(401===a.status&&!t){eS.current=e,J({open:!0,mode:"usage-import",password:""});return}throw Error(r.error||"Failed to import usage")}ek({type:"success",message:`${(0,u.Tl)("Imported")} ${r.imported} ${(0,u.Tl)("usage records")} (${(0,u.Tl)("skipped")} ${r.skipped}, ${(0,u.Tl)("total")} ${r.total})`})}catch(e){ek({type:"error",message:e.message||"Failed to import usage"})}finally{eL(!1)}},e8=async e=>{let t=q.current;if(t){D(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),l=await r.json().catch(()=>({}));if(!r.ok)throw Error(l.error||"Failed to import database");await e6(),$({type:"success",message:"Database imported successfully"})}catch(e){$({type:"error",message:e.message||"Invalid backup file"})}finally{q.current=null,D(!1)}}},te=async()=>{let{mode:e,password:t}=F;if(J({open:!1,mode:"",password:""}),"export"===e)await e9(t);else if("import"===e)await e8(t);else if("usage-import"===e){let e=eS.current;eS.current=null,e&&await e7(e,t)}},tt=!0===C.enableObservability,ts=async()=>{S(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}S(!1),w(!1)},ta=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.10router/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(l.$n,{variant:"secondary",icon:"download",onClick:()=>J({open:!0,mode:"export",password:""}),loading:R,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(l.$n,{variant:"outline",icon:"upload",onClick:()=>ew.current?.click(),disabled:R,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)(l.$n,{variant:"outline",icon:"history",onClick:()=>ev.current?.click(),loading:eI,className:"w-full sm:w-auto",children:(0,u.Tl)("Import Usage")}),(0,a.jsx)("input",{ref:ew,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];ew.current&&(ew.current.value=""),t&&(q.current=t,$({type:"",message:""}),J({open:!0,mode:"import",password:""}))}}),(0,a.jsx)("input",{ref:ev,type:"file",accept:".sqlite,.db",className:"hidden",onChange:e=>{let t=e.target.files?.[0];ev.current&&(ev.current.value=""),t&&(/\.(sqlite|sqlite3|db)$/i.test(t.name)||"application/x-sqlite3"===t.type||"application/vnd.sqlite3"===t.type||"application/octet-stream"===t.type?e7(t):ek({type:"error",message:(0,u.Tl)("Only SQLite database files (.sqlite/.db) can be imported")}))}})]}),U.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===U.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:U.message}),eC.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===eC.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:eC.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Language")})]}),(0,a.jsxs)("button",{onClick:()=>j(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:(0,u.Tl)("Display language")}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[m]||"\uD83C\uDF10"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4 mt-3 p-3 rounded-lg bg-bg border border-border",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:(0,u.Tl)("Regional currency")}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Show costs in local currency (\xa5/NT$/₩/₫); off → $"})]}),(0,a.jsx)(l.lM,{checked:g,onChange:()=>{let e=!(0,p.i)();"u">typeof localStorage&&localStorage.setItem("useRegionalCurrency",e?"1":"0"),f(e)}})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Security")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:(0,u.Tl)("Require login")}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:(0,u.Tl)("When ON, dashboard requires password. When OFF, access without login.")})]}),(0,a.jsx)(l.lM,{checked:!0===C.requireLogin,onChange:()=>eV(!C.requireLogin),disabled:I})]}),!0===C.requireLogin&&(0,a.jsxs)("form",{onSubmit:eK,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[C.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Enter current password",value:A.current,onChange:e=>P({...A,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Enter new password",value:A.new,onChange:e=>P({...A,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Confirm new password",value:A.confirm,onChange:e=>P({...A,confirm:e.target.value}),required:!0})]})]}),O.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===O.type?"text-red-500":"text-green-500"}`,children:O.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(l.$n,{type:"submit",variant:"primary",loading:T,className:"w-full sm:w-auto",children:C.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>et(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Single Sign-On (SSO)")}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"sso"===C.authMode||"oidc"===C.authMode||"saml"===C.authMode?`${"saml"===C.ssoType?"SAML 2.0":"OIDC"} SSO active`:"both"===C.authMode?`Password + ${"saml"===C.ssoType?"SAML 2.0":"OIDC"} active`:"Optional SSO via Okta, Entra ID, Keycloak, or OIDC"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:ee?"expand_less":"expand_more"})]}),ee&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:(0,u.Tl)("Configure enterprise Single Sign-On (SSO) for dashboard access using SAML 2.0 or OIDC.")}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"SSO Protocol"}),(0,a.jsxs)("div",{className:"flex p-1 rounded-lg bg-black/5 dark:bg-white/5 border border-border",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eo("saml"),className:(0,d.cn)("flex-1 py-1.5 px-3 rounded-md font-medium text-xs sm:text-sm transition-all text-center","saml"===ei?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:"SAML 2.0"}),(0,a.jsx)("button",{type:"button",onClick:()=>eo("oidc"),className:(0,d.cn)("flex-1 py-1.5 px-3 rounded-md font-medium text-xs sm:text-sm transition-all text-center","oidc"===ei?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:"OIDC"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep legacy password login."},{value:"sso",title:`${"saml"===ei?"SAML":"OIDC"} only`,desc:"Require SSO for dashboard access."},{value:"both",title:"Both",desc:"Allow password or SSO login."}].map(e=>{let t=B.authMode,s="password"===e.value?"password"===t:"sso"===e.value?"sso"===t||"saml"===t||"oidc"===t:"both"===t;return(0,a.jsxs)("button",{type:"button",onClick:()=>eY("authMode",e.value),className:(0,d.cn)("text-left rounded-lg border p-3 transition-colors",s?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:I||Z||ex,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),"saml"===ei?(0,a.jsxs)("div",{className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg/80 overflow-hidden",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>ey(e=>!e),className:"w-full p-3 flex items-center justify-between gap-2 text-left hover:bg-surface/50 transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-lg",children:"menu_book"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-xs sm:text-sm text-text-main",children:"IdP Setup Guidelines & Provider Configuration Instructions"}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:"Click to view setup steps for AWS IAM Identity Center, Okta, Entra ID, Keycloak, & Authentik"})]})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted transition-transform text-lg",style:{transform:ef?"rotate(180deg)":"none"},children:"expand_more"})]}),ef&&(0,a.jsxs)("div",{className:"p-4 border-t border-border bg-surface/30 text-xs text-text-main flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"p-2.5 rounded border border-primary/20 bg-primary/5 text-primary text-xs",children:[(0,a.jsx)("p",{className:"font-semibold mb-1",children:"\uD83D\uDD11 Required Service Provider (SP) Values for your IdP Setup:"}),(0,a.jsxs)("ul",{className:"list-disc pl-4 space-y-1 font-mono text-[11px]",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Assertion Consumer Service (ACS) URL:"})," ",(0,a.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded break-all",children:er})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"SP Entity ID / Audience URI:"})," ",(0,a.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded break-all",children:en.samlIssuer||"urn:10router:sp"})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"NameID Format:"})," ",(0,a.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded",children:"EmailAddress"})," or ",(0,a.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded",children:"Unspecified"})]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 pt-1",children:[(0,a.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,a.jsxs)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:[(0,a.jsx)("span",{children:"☁️"})," AWS IAM Identity Center"]}),(0,a.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,a.jsxs)("li",{children:["Applications → ",(0,a.jsx)("b",{children:"Add application"})," → Select ",(0,a.jsx)("b",{children:"Add custom SAML 2.0 application"}),"."]}),(0,a.jsxs)("li",{children:["Set ",(0,a.jsx)("b",{children:"Application ACS URL"})," to ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:er}),"."]}),(0,a.jsxs)("li",{children:["Set ",(0,a.jsx)("b",{children:"Application SAML audience"})," to ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:en.samlIssuer||"urn:10router:sp"}),"."]}),(0,a.jsxs)("li",{children:["Under ",(0,a.jsx)("i",{children:"Attribute mappings"}),", map ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:"Subject"})," or ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:"email"})," to ",(0,a.jsxs)("code",{className:"text-text-main font-mono",children:["$","{user:email}"]}),"."]}),(0,a.jsxs)("li",{children:["Download ",(0,a.jsx)("b",{children:"IAM Identity Center SAML metadata XML"})," file and use 1-Click Import below!"]})]})]}),(0,a.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,a.jsxs)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:[(0,a.jsx)("span",{children:"\uD83D\uDD37"})," Microsoft Entra ID (Azure AD)"]}),(0,a.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,a.jsxs)("li",{children:["Enterprise Applications → ",(0,a.jsx)("b",{children:"New application"})," → ",(0,a.jsx)("b",{children:"Create your own application"}),"."]}),(0,a.jsxs)("li",{children:["Select ",(0,a.jsx)("b",{children:"Single sign-on"})," → ",(0,a.jsx)("b",{children:"SAML"}),"."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Identifier (Entity ID):"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:en.samlIssuer||"urn:10router:sp"})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Reply URL (ACS):"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:er})]}),(0,a.jsxs)("li",{children:["Download ",(0,a.jsx)("b",{children:"Federation Metadata XML"})," and import or copy X.509 Certificate."]})]})]}),(0,a.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,a.jsxs)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:[(0,a.jsx)("span",{children:"\uD83D\uDFE2"})," Okta / Auth0"]}),(0,a.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,a.jsxs)("li",{children:["Applications → ",(0,a.jsx)("b",{children:"Create App Integration"})," → Select ",(0,a.jsx)("b",{children:"SAML 2.0"}),"."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Single Sign-On URL:"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:er})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Audience URI (SP Entity ID):"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:en.samlIssuer||"urn:10router:sp"})]}),(0,a.jsxs)("li",{children:["Name ID format: ",(0,a.jsx)("i",{children:"EmailAddress"}),"."]}),(0,a.jsx)("li",{children:"Download Identity Provider metadata XML or copy the X.509 cert."})]})]}),(0,a.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,a.jsxs)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:[(0,a.jsx)("span",{children:"\uD83D\uDEE1️"})," Keycloak / Authentik"]}),(0,a.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,a.jsxs)("li",{children:["Clients → ",(0,a.jsx)("b",{children:"Create client"})," → Select ",(0,a.jsx)("b",{children:"SAML"}),"."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Client ID:"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:en.samlIssuer||"urn:10router:sp"})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Master SAML Processing URL:"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:er})]}),(0,a.jsx)("li",{children:"Export SAML Descriptor XML or copy IDP Certificate PEM."})]})]})]})]})]}),(0,a.jsxs)("div",{className:"p-3 rounded-lg border border-dashed border-primary/40 bg-primary/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm text-text-main",children:"1-Click IdP Metadata XML Import"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Auto-fill SSO URL, Issuer & Cert from XML metadata"})]}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",size:"sm",icon:"upload_file",onClick:()=>ej.current?.click(),children:"Upload Metadata XML"}),(0,a.jsx)("input",{ref:ej,type:"file",accept:".xml,application/xml,text/xml",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(ej.current&&(ej.current.value=""),!t)return;let s=new FileReader;s.onload=e=>{try{let t=e.target?.result||"",s=new DOMParser().parseFromString(t,"text/xml");if(s.querySelector("parsererror"))return void em({type:"error",message:"Unable to parse valid SAML IdP metadata from XML file"});let a=s.documentElement.getAttribute("entityID")||"",r=Array.from(s.querySelectorAll("SingleSignOnService, *|SingleSignOnService")),l="";for(let e of r){let t=e.getAttribute("Binding")||"",s=e.getAttribute("Location")||"";if(s&&(l=s,t.includes("HTTP-Redirect")))break}let i=Array.from(s.querySelectorAll("X509Certificate, *|X509Certificate")),o="";i.length>0&&(o=i[0].textContent.trim()),ed(e=>({...e,samlEntryPoint:l||e.samlEntryPoint,samlIssuer:e.samlIssuer||"urn:10router:sp",samlCert:o||e.samlCert})),em({type:"success",message:`IdP Metadata imported! (SSO URL: ${l?"found":"not found"}, EntityID: ${a?"found":"not found"}, Cert: ${o?"found":"not found"})`})}catch(e){em({type:"error",message:"Error reading IdP Metadata XML file"})}},s.readAsText(t)}})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Single Sign-On Service URL (samlEntryPoint)"}),(0,a.jsx)(l.pd,{placeholder:"https://idp.example.com/app/saml/sso/...",value:en.samlEntryPoint,onChange:e=>e5("samlEntryPoint",e.target.value),disabled:I||ex})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"SP Entity ID / Audience (samlIssuer)"}),(0,a.jsx)(l.pd,{placeholder:"urn:10router:sp",value:en.samlIssuer,onChange:e=>e5("samlIssuer",e.target.value),disabled:I||ex})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"IdP X.509 Certificate (samlCert)"}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",size:"sm",icon:"file_upload",onClick:()=>eN.current?.click(),children:"Upload Certificate"}),(0,a.jsx)("input",{ref:eN,type:"file",accept:".crt,.pem,.cer,text/plain",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(eN.current&&(eN.current.value=""),!t)return;let s=new FileReader;s.onload=e=>{let t=e.target?.result||"";ed(e=>({...e,samlCert:t.trim()})),em({type:"success",message:"Certificate file loaded into configuration."})},s.readAsText(t)}})]}),(0,a.jsx)("textarea",{rows:4,placeholder:"-----BEGIN CERTIFICATE-----\nMIIC...\n-----END CERTIFICATE-----",value:en.samlCert,onChange:e=>e5("samlCert",e.target.value),className:"w-full p-2.5 rounded-lg border border-border bg-bg text-xs font-mono text-text-main focus:outline-none focus:border-primary",disabled:I||ex}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Paste raw Base64 certificate or PEM block."})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(l.pd,{placeholder:"Sign in with SAML SSO",value:en.samlLoginLabel,onChange:e=>e5("samlLoginLabel",e.target.value),disabled:I||ex})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Email Claim Attribute"}),(0,a.jsx)(l.pd,{placeholder:"email",value:en.samlAttributeEmail,onChange:e=>e5("samlAttributeEmail",e.target.value),disabled:I||ex})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Display Name Claim"}),(0,a.jsx)(l.pd,{placeholder:"name",value:en.samlAttributeName,onChange:e=>e5("samlAttributeName",e.target.value),disabled:I||ex})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 p-3 rounded-lg border border-border bg-bg text-xs sm:text-sm text-text-muted",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main",children:"ACS Callback URL"}),(0,a.jsx)("code",{className:"block break-all font-mono text-xs",children:er})]}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",size:"sm",icon:"content_copy",onClick:()=>{navigator.clipboard.writeText(er),em({type:"success",message:"ACS URL copied to clipboard!"})},children:"Copy"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main",children:"SP XML Metadata"}),(0,a.jsx)("code",{className:"block break-all font-mono text-xs",children:el})]}),(0,a.jsxs)("a",{href:el,target:"_blank",rel:"noopener noreferrer",download:"10router-sp-metadata.xml",className:"inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"download"}),"Download XML"]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(l.$n,{type:"button",variant:"primary",loading:ex,onClick:()=>e2(B.authMode),className:"w-full sm:w-auto",children:"Save SAML settings"}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",loading:eu,onClick:e4,className:"w-full sm:w-auto",children:"Test SAML settings"})]}),eb.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===eb.type?"text-red-500":"text-green-500"}`,children:eb.message}),ec.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ec.type?"text-red-500":"text-green-500"}`,children:ec.message})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(l.pd,{placeholder:"https://auth.example.com/application/o/10router/",value:B.oidcIssuerUrl,onChange:e=>eY("oidcIssuerUrl",e.target.value),disabled:I||Z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(l.pd,{placeholder:"10router-dashboard",value:B.oidcClientId,onChange:e=>eY("oidcClientId",e.target.value),disabled:I||Z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:H,onChange:e=>z(e.target.value),disabled:I||Z}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(l.pd,{placeholder:"openid profile email",value:B.oidcScopes,onChange:e=>eY("oidcScopes",e.target.value),disabled:I||Z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(l.pd,{placeholder:"Sign in with OIDC",value:B.oidcLoginLabel,onChange:e=>eY("oidcLoginLabel",e.target.value),disabled:I||Z})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:ea})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(l.$n,{type:"button",variant:"primary",loading:Z,onClick:()=>e0(),className:"w-full sm:w-auto",children:"Save OIDC settings"}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",loading:G,onClick:e1,className:"w-full sm:w-auto",children:"Test connection"})]}),V.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===V.type?"text-red-500":"text-green-500"}`,children:V.message}),X.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===X.type?"text-red-500":"text-green-500"}`,children:X.message})]}),"oidc"===C.authMode||"saml"===C.authMode||"sso"===C.authMode?(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:["SSO login (","saml"===C.ssoType?"SAML 2.0":"OIDC",") is currently active. Password login is disabled until you switch back."]}):null,"both"===C.authMode&&(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:["Password and SSO login (","saml"===C.ssoType?"SAML 2.0":"OIDC",") are both active."]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(l.lM,{checked:"round-robin"===C.fallbackStrategy,onChange:()=>eZ("round-robin"===C.fallbackStrategy?"fill-first":"round-robin"),disabled:I})]}),"round-robin"===C.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(l.pd,{type:"number",min:"1",max:"10",value:C.stickyRoundRobinLimit||3,onChange:e=>eG(e.target.value),disabled:I,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(l.lM,{checked:"round-robin"===C.comboStrategy,onChange:()=>eW("round-robin"===C.comboStrategy?"fallback":"round-robin"),disabled:I})]}),"round-robin"===C.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(l.pd,{type:"number",min:"1",max:"100",value:C.comboStickyRoundRobinLimit||1,onChange:e=>eQ(e.target.value),disabled:I,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===C.fallbackStrategy?`Currently distributing requests across all available accounts with ${C.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===C.comboStrategy?` Combos rotate after ${C.comboStickyRoundRobinLimit||1} call${1===(C.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-cyan-500/10 text-cyan-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"device_hub"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Providers")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:(0,u.Tl)("Disabled providers sort last")}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Push providers with all connections disabled behind those with no connections"})]}),(0,a.jsx)(l.lM,{checked:!0===C.providerDisabledLastSort,onChange:eJ})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:(0,u.Tl)("Show community welfare providers")}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Show free community gateways with no recharge entry (GoRouter / TaBiAI)"})]}),(0,a.jsx)(l.lM,{checked:!1!==C.showCommunityProviders,onChange:eq})]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-amber-500/10 text-amber-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"science"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Experimental")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:(0,u.Tl)("Fetch models from GitHub JSON")}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Show a Fetch Models button on providers that publish a model JSON catalog"})]}),(0,a.jsx)(l.lM,{checked:!0===C.modelJsonImport,onChange:eF})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:(0,u.Tl)("CodeBuddy CN OAuth import / export")}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:(0,u.Tl)("Show Import / Export buttons on the CodeBuddy CN page (experimental)")})]}),(0,a.jsx)(l.lM,{checked:!0===C.codeBuddyOAuthImport,onChange:eB})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:(0,u.Tl)("CodeBuddy CN auto daily check-in")}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:(0,u.Tl)("Automatically check in accounts once a day (random 00:00–06:00 local)")})]}),(0,a.jsx)(l.lM,{checked:!0===C.codeBuddyCheckin,onChange:e_})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:(0,u.Tl)("When enabled, the Import / Export buttons on the CodeBuddy CN page are replaced")})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Network")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(l.lM,{checked:!0===C.outboundProxyEnabled,onChange:()=>eX(!0!==C.outboundProxyEnabled),disabled:I||eT})]}),!0===C.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:eH,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(l.pd,{placeholder:"http://127.0.0.1:7897",value:eA.outboundProxyUrl,onChange:e=>eP(t=>({...t,outboundProxyUrl:e.target.value})),disabled:I||eT}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(l.pd,{placeholder:"localhost,127.0.0.1",value:eA.outboundNoProxy,onChange:e=>eP(t=>({...t,outboundNoProxy:e.target.value})),disabled:I||eT}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(l.$n,{type:"button",variant:"secondary",loading:eR,disabled:I||eT,onClick:ez,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(l.$n,{type:"submit",variant:"primary",loading:eT,className:"w-full sm:w-auto",children:"Apply"})]})]}),eO.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===eO.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:eO.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Observability")})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(l.lM,{checked:tt,onChange:e3,disabled:I})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(l.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>w(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(l.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:ta,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:eU?"Remote Mode":"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(o.default,{hideTrigger:!0,isOpen:y,onClose:e=>{j(!1),b(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:N,onClose:()=>w(!1),onConfirm:ts,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:v}),(0,a.jsxs)(i.default,{isOpen:F.open,onClose:()=>J({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.$n,{variant:"ghost",onClick:()=>J({open:!1,mode:"",password:""}),disabled:R,children:"Cancel"}),(0,a.jsx)(l.$n,{variant:"primary",onClick:te,loading:R,disabled:!F.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===F.mode?"export":"import"," the database."]}),(0,a.jsx)(l.pd,{type:"password",value:F.password,onChange:e=>J(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&F.password&&te()},placeholder:"Current password",autoFocus:!0})]})]})}}},e=>{e.O(0,[4614,1321,5497,8441,3794,7358],()=>e(e.s=13966)),_N_E=e.O()}]);
@@ -1,14 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{51745:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>B});var i=s(95155),a=s(12115),l=s(73321),o=s(98500),n=s.n(o),r=s(5772),d=s(8247),c=s(35497),m=s(88105),p=s(28777),u=s(990),x=s(62630);s(67468);let h=["none","low","medium","high"],f=["none","thinking"],g=["none","low","medium","high","max"],y={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":g,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":h,zai:f,qwen:h,kimi:g,deepseek:["none","high","max"],minimax:f,hunyuan:h,step:h},b=["none","minimal","low","medium","high","xhigh","max"],v=[{provider:"codex",pattern:"*gpt-6*",levels:b},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...b,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...b,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:b},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{provider:"codebuddy-cn",pattern:"glm-5.3*",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]}];function j(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let s=t.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!s)return null;let[,i,a]=s,l=Number(i),o=void 0===a?null:Number(a);return l<4||4===l&&(null===o||o<=5||null!==o&&o>=1e3)?null:"output_config"}(t))return null;let s=(0,u.nl)(e,t);if(!s.reasoning)return null;let i=v.find(s=>(!s.provider||s.provider===e)&&(0,x.gH)(s.pattern,t)),a=i?.levels||y[s.thinkingFormat]||h;return!1===s.thinkingCanDisable&&(a=a.filter(e=>"none"!==e)),a}var w=s(11059),k=s(929),N=s(73006),C=s(65921);let S=new Map;async function T(e){if(!e?.url||!e?.type)return[];let t=S.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let i=(await s.json()).data??[];return S.set(e.url,{data:i,expiresAt:Date.now()+6e5}),i}catch{return[]}}function $({customModels:e=[],modelAliases:t={},providerAlias:s,builtInModels:i=[],type:a="llm",includeLegacyAliases:l=!0}){let o=new Set(i.map(e=>e.id)),n=new Set,r=[];for(let t of e){if(!t?.id||t.providerAlias!==s)continue;let e=t?.kind||t?.type||"llm";if(a&&e!==a||o.has(t.id))continue;let i=`${s}/${t.id}`;n.has(i)||(n.add(i),r.push({id:t.id,name:t.name||t.id,fullModel:i,source:"custom",type:e,enabled:!1!==t.enabled,...void 0===t.vision?{}:{vision:t.vision},...void 0===t.reasoning?{}:{reasoning:t.reasoning},...void 0===t.contextWindow?{}:{contextWindow:t.contextWindow},...void 0===t.maxOutput?{}:{maxOutput:t.maxOutput}}))}if(!l)return r;let d=`${s}/`;for(let[e,s]of Object.entries(t||{})){if("string"!=typeof s||!s.startsWith(d))continue;let t=s.slice(d.length);!t||o.has(t)||n.has(s)||(n.add(s),r.push({id:t,alias:e,fullModel:s,source:"legacyAlias",type:a||"llm"}))}return r}var A=s(14051),O=s.n(A);function P({model:e,fullModel:t,alias:s,copied:a,onCopy:l,testStatus:o,isCustom:n,isFree:r,onDeleteAlias:d,onTest:m,isTesting:p,onDisable:u,caps:x,thinkingSuffix:h}){let f=h?`${t}(${h})`:t,g="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,i.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:g?{color:g}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,i.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:f}),(0,i.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,i.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,i.jsx)(c.nh,{caps:x,colorOverride:"text-text-muted/70",size:12})]})]}),m&&(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:m,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:p?"Testing...":"Test"})]}),(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:()=>l(f,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:a===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,i.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,i.jsx)("button",{onClick:u,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function E({modelId:e,fullModel:t,copied:s,onCopy:a,onDeleteAlias:l,onTest:o,testStatus:n,isTesting:r}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,i.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,i.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,i.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:()=>a(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),o&&(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:o,disabled:r,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:r?{animation:"spin 1s linear infinite"}:void 0,children:r?"progress_activity":"science"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:r?"Testing...":"Test"})]})]})]}),(0,i.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function I({modelId:e,fullModel:t,copied:s,onCopy:a,onToggle:l,enabled:o,onTest:n,testStatus:r,isTesting:d}){let c="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,i.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50 ${o?"":"opacity-60"}`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:c?{color:c}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,i.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,i.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:()=>a(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),n&&(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:n,disabled:d,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:d?{animation:"spin 1s linear infinite"}:void 0,children:d?"progress_activity":"science"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:d?"Testing...":"Test"})]})]})]}),(0,i.jsx)("button",{onClick:l,className:`p-1 rounded ${o?"text-amber-500 hover:bg-amber-50 dark:hover:bg-amber-500/10":"text-green-600 hover:bg-green-50 dark:hover:bg-green-500/10"}`,title:o?"Disable model":"Activate model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:o?"block":"restart_alt"})})]})}function U({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:l,copied:o,onCopy:n,onDeleteAlias:r,onAddCustomModel:d,onDeleteCustomModel:m,connections:p,isAnthropic:u,jsonModels:x,importingJsonModels:h,onImportJsonModels:f,onToggleJsonModel:g,onBulkJsonModels:y,useJsonCatalog:b}){let v=(0,C.i)(),[j,w]=(0,a.useState)(""),[k,N]=(0,a.useState)(!1),[S,T]=(0,a.useState)(!1),[A,O]=(0,a.useState)(null),[P,R]=(0,a.useState)({}),D=async t=>{if(!A){O(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),i=await s.json();R(e=>({...e,[t]:i.ok?"ok":"error"}))}catch{R(e=>({...e,[t]:"error"}))}finally{O(null)}}},J=$({customModels:l,modelAliases:s,providerAlias:e,type:"llm"}),M=async()=>{if(!j.trim()||k)return;let e=j.trim();if(J.some(t=>t.id===e))return void v.warning("Model already exists for this provider.");N(!0);try{await d(e),w("")}catch(e){console.log("Error adding model:",e)}finally{N(!1)}},_=async()=>{if(S)return;let e=p.find(e=>!1!==e.isActive);if(e){T(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void v.error(s.error||"Failed to import models");let i=s.models||[];if(0===i.length)return void v.warning("No models returned from /models.");let a=0;for(let e of i){let t=e.id||e.name||e.model;t&&(J.some(e=>e.id===t)||(await d(t),a+=1))}0===a&&v.warning("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{T(!1)}}},q=p.some(e=>!1!==e.isActive),z=Array.isArray(x),F=z?x.filter(e=>!1!==e.enabled):[],K=z?x.filter(e=>!1===e.enabled):[],L=b&&F.length>0;return(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",u?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,i.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,i.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,i.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,i.jsx)("input",{id:"new-compatible-model-input",type:"text",value:j,onChange:e=>w(e.target.value),onKeyDown:e=>"Enter"===e.key&&M(),placeholder:u?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:M,disabled:!j.trim()||k,children:k?"Adding...":"Add"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:_,disabled:!q||S,children:S?"Importing...":"Import from /models"})]}),!q&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),z&&(0,i.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:f,disabled:!q||h,children:h?"Fetching...":"Fetch Models from JSON"}),L&&K.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>y(!0),children:"Active All"}),L&&F.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>y(!1),children:"Disable All"})]}),L&&(0,i.jsx)("div",{className:"flex flex-col gap-3",children:F.map(e=>(0,i.jsx)(I,{modelId:e.id,fullModel:`${t}/${e.id}`,copied:o,onCopy:n,enabled:!0,onToggle:()=>g(e.id,!1)},`json-${e.id}`))}),!L&&J.length>0&&(0,i.jsx)("div",{className:"flex flex-col gap-3",children:J.map(({id:s,alias:a,source:l})=>(0,i.jsx)(E,{modelId:s,fullModel:`${t}/${s}`,copied:o,onCopy:n,onDeleteAlias:()=>"custom"===l?m(s):r(a),onTest:p.length>0?()=>D(s):void 0,testStatus:P[s],isTesting:A===s},`${l}-${e}/${s}`))}),b&&K.length>0&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Disabled (activate to expose again):"}),K.map(e=>(0,i.jsx)(I,{modelId:e.id,fullModel:`${t}/${e.id}`,copied:o,onCopy:n,enabled:!1,onToggle:()=>g(e.id,!0)},`json-disabled-${e.id}`))]})]})}P.propTypes={model:O().shape({id:O().string.isRequired}).isRequired,fullModel:O().string.isRequired,alias:O().string,copied:O().string,onCopy:O().func.isRequired,testStatus:O().oneOf(["ok","error"]),isCustom:O().bool,isFree:O().bool,onDeleteAlias:O().func,onTest:O().func,isTesting:O().bool,onDisable:O().func,caps:O().object,thinkingSuffix:O().string},O().string.isRequired,O().string.isRequired,O().string,O().func.isRequired,O().func.isRequired,O().func,O().oneOf(["ok","error"]),O().bool,O().string.isRequired,O().object.isRequired,O().arrayOf(O().object),O().string,O().func.isRequired,O().func.isRequired,O().func.isRequired,O().func.isRequired,U.propTypes={providerStorageAlias:O().string.isRequired,providerDisplayAlias:O().string.isRequired,modelAliases:O().object.isRequired,customModels:O().arrayOf(O().object),copied:O().string,onCopy:O().func.isRequired,onDeleteAlias:O().func.isRequired,onAddCustomModel:O().func.isRequired,onDeleteCustomModel:O().func.isRequired,connections:O().arrayOf(O().shape({id:O().string,isActive:O().bool})).isRequired,isAnthropic:O().bool,jsonModels:O().arrayOf(O().object),importingJsonModels:O().bool,onImportJsonModels:O().func,onToggleJsonModel:O().func,onBulkJsonModels:O().func,useJsonCatalog:O().bool};var R=s(70217);function D({until:e}){let[t,s]=(0,a.useState)("");return((0,a.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let i=Math.floor(t/1e3);if(i<60)s(`${i}s`);else if(i<3600)s(`${Math.floor(i/60)}m ${i%60}s`);else{let e=Math.floor(i/3600),t=Math.floor(i%3600/60);s(`${e}h ${t}m`)}};t();let i=setInterval(t,1e3);return()=>clearInterval(i)},[e]),t)?(0,i.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function J({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:o,onMoveUp:n,onMoveDown:r,onToggleActive:d,onUpdateProxy:m,onEdit:p,onDelete:u,oneByOneStatus:x=null,autoPing:h=null}){let[f,g]=(0,a.useState)(!1),[y,b]=(0,a.useState)(!1),v=(0,a.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),w=e.providerSpecificData?.proxyPoolId||null,k=w?j.get(w):null,C=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,S=!!w||C,T=k?`Pool: ${k.name}`:w?`Pool: ${w} (inactive/missing)`:C?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",$=h?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",A="";if(k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);A=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{A=t}}let O=k?.noProxy||e.providerSpecificData?.connectionNoProxy||"",P="default";k?.isActive===!0?P="success":(w||C)&&(P="error"),(0,a.useEffect)(()=>{if(!f)return;let e=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let E=async e=>{b(!0);try{await m("__none__"===e?null:e)}finally{b(!1),g(!1)}},I=e.authType||(s?"oauth":"apikey"),U="oauth"===I,M="cookie"===I,_=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(U?"OAuth Account":M?"Cookie Account":"API Key"),q=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[z,F]=(0,a.useState)(!1),K=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,a.useEffect)(()=>{let t=()=>{F(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=K?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[K]);let L="unavailable"!==e.testStatus||z?e.testStatus:"active",W=()=>x?"queued"===x.state?(0,N.Tl)("queued"):"testing"===x.state?(0,N.Tl)("testing"):"success"===x.state?(0,N.Tl)("success"):"failed"===x.state?x.error?`${(0,N.Tl)("failed")}: ${x.error}`:(0,N.Tl)("failed"):null:null;return(0,i.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,i.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,i.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,i.jsx)("button",{onClick:r,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:M?"cookie":U?"lock":"key"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:_}),q&&(0,i.jsx)("p",{className:"text-xs text-text-muted truncate",children:q}),(0,i.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,i.jsx)(c.Ex,{variant:(0,R.g)(e.isActive,L),size:"sm",dot:!0,children:!1===e.isActive?(0,N.Tl)("disabled"):L||(0,N.Tl)("Unknown")}),(0,i.jsx)(c.Ex,{variant:"default",size:"sm",children:U?"OAuth":M?"Cookie":"API Key"}),S&&(0,i.jsx)(c.Ex,{variant:P,size:"sm",children:"Proxy"}),z&&!1!==e.isActive&&(0,i.jsx)(D,{until:K}),e.lastError&&!1!==e.isActive&&(0,i.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),W()&&(0,i.jsx)(c.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:W()})]}),S&&(0,i.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,i.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:T,children:T}),A&&(0,i.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:A}),O&&(0,i.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:O,children:["no_proxy: ",O]})]})]})]}),(0,i.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,i.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,i.jsxs)("div",{className:"relative",ref:v,children:[(0,i.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${S?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,i.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,i.jsx)("button",{onClick:()=>E("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,i.jsx)("button",{onClick:()=>E(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,i.jsx)(c.m_,{text:$,children:(0,i.jsxs)("button",{onClick:()=>h.onToggle(!h.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,i.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,i.jsxs)("button",{onClick:u,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,i.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}D.propTypes={until:O().string.isRequired},J.propTypes={connection:O().shape({id:O().string,name:O().string,email:O().string,displayName:O().string,modelLockUntil:O().string,testStatus:O().string,isActive:O().bool,lastError:O().string,priority:O().number,globalPriority:O().number}).isRequired,proxyPools:O().arrayOf(O().shape({id:O().string,name:O().string,proxyUrl:O().string,noProxy:O().string,isActive:O().bool})),isOAuth:O().bool.isRequired,isFirst:O().bool.isRequired,isLast:O().bool.isRequired,onMoveUp:O().func.isRequired,onMoveDown:O().func.isRequired,onToggleActive:O().func.isRequired,onUpdateProxy:O().func,onEdit:O().func.isRequired,onDelete:O().func.isRequired,oneByOneStatus:O().shape({state:O().string,error:O().string}),autoPing:O().shape({on:O().bool,onToggle:O().func,provider:O().string})};let M=`name1|sk-key1
2
- name2|sk-key2
3
- sk-key-only-auto-named`;function _({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:o,authType:n,authHint:r,website:d,proxyPools:p,error:u,existingNames:x,onSave:h,onBulkDone:f,onClose:g}){let y="__none__",b="ollama-local"===t,v="cookie"===n,j="xai"===t&&!v,w=v?"Cookie Value":"qoder"===t?"Personal Access Token (PAT)":"API Key",k="azure"===t,N="cloudflare-ai"===t,C=m.Q2?.[t]?.regions||null,S=m.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[T,$]=(0,a.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:y,ollamaHostUrl:""}),[A,O]=(0,a.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[P,E]=(0,a.useState)({accountId:""}),[I,U]=(0,a.useState)(S),[R,D]=(0,a.useState)(!1),[J,q]=(0,a.useState)(null),[z,F]=(0,a.useState)(null),[K,L]=(0,a.useState)(!1),[W,B]=(0,a.useState)(!1),H=N?`name1|sk-key1|acc123456
4
- name2|sk-key2|def789012
5
- sk-key-only-auto-named`:"qoder"===t?`name1|pt-xxxxx
6
- name2|pt-yyyyy
7
- pt-only-auto-named`:M,[G,V]=(0,a.useState)("single"),[Q,Z]=(0,a.useState)(""),[Y,X]=(0,a.useState)(null),ee=()=>b&&T.ollamaHostUrl.trim()?{baseUrl:T.ollamaHostUrl.trim()}:k?{azureEndpoint:A.azureEndpoint,apiVersion:A.apiVersion,deployment:A.deployment,organization:A.organization}:N?{accountId:P.accountId}:C&&I?{region:I}:void 0,et=async()=>{D(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:ee()})}),s=await e.json();q(s.valid?"success":"failed"),F(s.valid?null:s.error||null),L(!!s.maintenance)}catch{q("failed"),F(null),L(!1)}finally{D(!1)}},es=async()=>{if(t&&(b||T.apiKey)&&(b||T.name)&&(!l||T.defaultModel.trim())){B(!0);try{let e=!1;try{D(!0),q(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:ee()})});e=!!(await s.json()).valid,q(e?"success":"failed")}catch{q("failed")}finally{D(!1)}await h({name:T.name||(b?"Ollama Local":""),apiKey:T.apiKey,defaultModel:l?T.defaultModel.trim():void 0,priority:T.priority,proxyPoolId:T.proxyPoolId===y?null:T.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:ee()})}finally{B(!1)}}},ei=async()=>{let e=Q.split("\n");if(!e.length)return;let s=function(e,t,s={}){let{isCloudflareAi:i=!1}=s,a=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),l=[];for(let t of e){let e,s="string"==typeof t?t.trim():"";if(!s)continue;let o=function(e,t={}){let{isCloudflareAi:s=!1}=t,i=e.split("|");if(s&&i.length>=3){let e=i[0].trim();return{baseName:e||"Key",apiKey:i.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:i[i.length-1].trim()}}}return i.length>=2?{baseName:i[0].trim()||"Key",apiKey:i.slice(1).join("|").trim()}:{baseName:"Key",apiKey:i[0].trim()}}(s,{isCloudflareAi:i});if(!o||!o.apiKey)continue;let n=o.baseName,r=1;for(;e=`${n} ${r}`,a.has(e.toLowerCase());)r+=1;a.add(e.toLowerCase());let d={name:e,apiKey:o.apiKey,skipped:!1};o.providerSpecificData&&(d.providerSpecificData=o.providerSpecificData),l.push(d)}return l}(e,x,{isCloudflareAi:N});if(!s.length)return;B(!0),X(null);let i=0,a=0;for(let e of s)try{let s=!1;try{let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});s=!!(await i.json().catch(()=>({}))).valid}catch{s=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey,name:e.name,priority:1,testStatus:s?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?i++:a++}catch{a++}B(!1),X({success:i,failed:a}),i>0&&f&&f()};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Add ${s||t} ${w}`,onClose:g,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{size:"sm",variant:"single"===G?"primary":"ghost",onClick:()=>{V("single"),X(null)},children:"Single"}),(0,i.jsx)(c.$n,{size:"sm",variant:"bulk"===G?"primary":"ghost",onClick:()=>{V("bulk"),X(null)},children:"Bulk Add"})]}),"bulk"===G&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:N?(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===t?(0,i.jsxs)(i.Fragment,{children:["One PAT per line. Format: ",(0,i.jsx)("code",{children:"name|pt-..."})," or just ",(0,i.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,i.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:H,value:Q,onChange:e=>Z(e.target.value)}),Y&&(0,i.jsxs)("div",{className:`text-sm font-medium ${Y.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",Y.success," added",Y.failed>0?`, ✗ ${Y.failed} failed`:""]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:ei,fullWidth:!0,disabled:W||!Q.trim(),children:W?"Adding...":"Add All Keys"}),(0,i.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===G&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.pd,{label:"Name",value:T.name,onChange:e=>$({...T,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),b&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:"Ollama Host URL",value:T.ollamaHostUrl,onChange:e=>$({...T,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:et,disabled:R||W,variant:"secondary",children:R?"Checking...":"Check"})})]}),!b&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:w,type:v?"text":"password",value:T.apiKey,onChange:e=>$({...T,apiKey:e.target.value}),placeholder:v?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"qoder"===t?"pt-...":"",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:et,disabled:!T.apiKey||R||W,variant:"secondary",children:R?"Checking...":"Check"})})]}),j&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),v&&r&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:[r,d&&(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",d.replace(/^https?:\/\//,"")]})]})]}),C&&(0,i.jsx)(c.l6,{label:"Region",value:I,onChange:e=>U(e.target.value),options:C.map(e=>({value:e.id,label:e.label}))}),l&&(0,i.jsx)(c.pd,{label:"Default Model",value:T.defaultModel,onChange:e=>$({...T,defaultModel:e.target.value}),placeholder:o?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),b&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,i.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,i.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),J&&(0,i.jsx)(c.Ex,{variant:"success"===J?"success":K?"warning":"error",children:"success"===J?"Valid":K?"Check endpoint":"Invalid"}),K&&z&&(0,i.jsx)("p",{className:"text-xs text-amber-500 break-words",children:z}),u&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:u}),l&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),N&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,i.jsx)(c.pd,{label:"Account ID",value:P.accountId,onChange:e=>E({...P,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,i.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(c.pd,{label:"Azure Endpoint",value:A.azureEndpoint,onChange:e=>O({...A,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,i.jsx)(c.pd,{label:"Deployment Name",value:A.deployment,onChange:e=>O({...A,deployment:e.target.value}),placeholder:"gpt-4"}),(0,i.jsx)(c.pd,{label:"API Version",value:A.apiVersion,onChange:e=>O({...A,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,i.jsx)(c.pd,{label:"Organization",value:A.organization,onChange:e=>O({...A,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,i.jsx)(c.pd,{label:"Priority",type:"number",value:T.priority,onChange:e=>$({...T,priority:Number.parseInt(e.target.value)||1})}),(0,i.jsx)(c.l6,{label:"Proxy Pool",value:T.proxyPoolId,onChange:e=>$({...T,proxyPoolId:e.target.value}),options:[{value:y,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:es,fullWidth:!0,disabled:W||!b&&(!T.name||!T.apiKey)||l&&!T.defaultModel.trim()||k&&(!A.azureEndpoint||!A.deployment||!A.organization)||N&&!P.accountId,children:W?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function q({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:o}){let[n,r]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1",modelsJsonUrl:"",fallbackModelsJsonUrl:""}),[d,m]=(0,a.useState)(!1),[p,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),[f,g]=(0,a.useState)(!1),[y,b]=(0,a.useState)(null);(0,a.useEffect)(()=>{t&&r({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(o?"https://api.anthropic.com/v1":"https://api.openai.com/v1"),modelsJsonUrl:t.modelsJsonUrl||"",fallbackModelsJsonUrl:t.fallbackModelsJsonUrl||""})},[t,o]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl,modelsJsonUrl:n.modelsJsonUrl,fallbackModelsJsonUrl:n.fallbackModelsJsonUrl};o||(e.apiType=n.apiType),await s(e)}finally{m(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:p,type:o?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Edit ${o?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(c.pd,{label:"Name",value:n.name,onChange:e=>r({...n,name:e.target.value}),placeholder:`${o?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,i.jsx)(c.pd,{label:"Prefix",value:n.prefix,onChange:e=>r({...n,prefix:e.target.value}),placeholder:o?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!o&&(0,i.jsx)(c.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>r({...n,apiType:e.target.value})}),(0,i.jsx)(c.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>r({...n,baseUrl:e.target.value}),placeholder:o?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${o?"Anthropic":"OpenAI"}-compatible API.`}),(0,i.jsx)(c.pd,{label:"Model JSON URL (optional)",value:n.modelsJsonUrl,onChange:e=>r({...n,modelsJsonUrl:e.target.value}),placeholder:"https://example.com/models.json",hint:"Optional. A {models:[...]} or {data:[...]} JSON listing — enables Fetch Models with per-model enable/disable instead of add-only. Non-GitHub sources are sent the connection's API key as Bearer."}),(0,i.jsx)(c.pd,{label:"Fallback Model JSON URL (optional)",value:n.fallbackModelsJsonUrl,onChange:e=>r({...n,fallbackModelsJsonUrl:e.target.value}),placeholder:"https://mirror.example.com/models.json",hint:"Optional. Mirror used when the primary Model JSON URL is unreachable."}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>u(e.target.value),className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:j,disabled:!p||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,i.jsx)(c.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,i.jsx)(c.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function z({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:o}){let[n,r]=(0,a.useState)(""),[d,m]=(0,a.useState)(null),[p,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&(r(""),m(null),u(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(n.trim());if(e){m("testing"),u("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),i=await s.json();m(i.ok?"ok":"error"),u(i.error||"")}catch(e){m("error"),u(e.message)}}},y=async()=>{let e=f(n.trim());if(e&&!x){h(!0);try{await l(e)}finally{h(!1)}}};return(0,i.jsx)(c.aF,{isOpen:e,onClose:o,title:"Add Custom Model",children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)("input",{type:"text",value:n,onChange:e=>{r(e.target.value),m(null),u("")},onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,i.jsx)(c.$n,{variant:"secondary",icon:"science",loading:"testing"===d,onClick:g,disabled:!n.trim()||"testing"===d,children:"testing"===d?"Testing...":"Test"})]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,i.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===d&&(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===d&&(0,i.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,i.jsx)("span",{children:p||"Model not reachable"})]}),(0,i.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,i.jsx)(c.$n,{onClick:o,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,i.jsx)(c.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!n.trim()||x,children:x?"Adding...":"Add Model"})]})]})})}_.propTypes={isOpen:O().bool.isRequired,provider:O().string,providerName:O().string,isCompatible:O().bool,isAnthropic:O().bool,authType:O().string,authHint:O().string,website:O().string,proxyPools:O().arrayOf(O().shape({id:O().string,name:O().string})),error:O().string,existingNames:O().arrayOf(O().string),onSave:O().func.isRequired,onBulkDone:O().func,onClose:O().func.isRequired},q.propTypes={isOpen:O().bool.isRequired,node:O().shape({id:O().string,name:O().string,prefix:O().string,apiType:O().string,baseUrl:O().string,modelsJsonUrl:O().string,fallbackModelsJsonUrl:O().string}),onSave:O().func.isRequired,onClose:O().func.isRequired,isAnthropic:O().bool},z.propTypes={isOpen:O().bool.isRequired,providerAlias:O().string.isRequired,providerDisplayAlias:O().string.isRequired,onSave:O().func.isRequired,onClose:O().func.isRequired};let F=`[
8
- {
9
- "accessToken": "eyJhbGc...",
10
- "refreshToken": "rt_...",
11
- "idToken": "eyJhbGc...",
12
- "email": "user@example.com"
13
- }
14
- ]`;function K({isOpen:e,onClose:t,onSuccess:s}){let[l,o]=(0,a.useState)(""),[n,r]=(0,a.useState)(!1),[d,m]=(0,a.useState)(""),[p,u]=(0,a.useState)(null),x=()=>{n||(o(""),m(""),u(null),t())},h=async()=>{var e;let t;m(""),u(null);let i=l.trim();if(!i)return;try{t=JSON.parse(i)}catch(e){m(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`);return}let a=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!a||0===a.length)return void m((0,N.Tl)("No accounts found in input"));r(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:a})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,N.Tl)("Request failed"))}finally{r(!1)}},f=p?.results?.filter(e=>!e.ok)||[];return(0,i.jsx)(c.aF,{isOpen:e,title:(0,N.Tl)("Bulk Add Codex Accounts"),onClose:x,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:(0,N.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,i.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:F,value:l,onChange:e=>o(e.target.value),disabled:n}),d&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,N.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,N.Tl)("failed")}`:""]}),f.length>0&&(0,i.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:h,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,N.Tl)("Importing..."):(0,N.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:x,variant:"ghost",fullWidth:!0,disabled:n,children:(0,N.Tl)("Close")})]})]})})}function L({isOpen:e,onClose:t,onSuccess:s,password:l=""}){let[o,n]=(0,a.useState)(""),[r,d]=(0,a.useState)(""),[m,p]=(0,a.useState)(!1),[u,x]=(0,a.useState)(""),[h,f]=(0,a.useState)(null),g=(0,a.useRef)(null),y=()=>{m||(n(""),d(""),x(""),f(null),g.current&&(g.current.value=""),t())},b=async()=>{let e;x(""),f(null);let t=o.trim();if(!t)return;try{e=JSON.parse(t)}catch(e){x(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void x((0,N.Tl)("No accounts found in input"));p(!0);try{let e=await fetch("/api/oauth/codebuddy-cn/bulk-import",{method:"POST",headers:{"Content-Type":"application/json",...l?{"x-9r-password":l}:{}},body:JSON.stringify({accounts:i})}),t=await e.json();if(!e.ok)return void x(401===e.status?(0,N.Tl)("Invalid password"):t?.error||`Request failed: ${e.status}`);f(t),(t.imported>0||t.updated>0)&&"function"==typeof s&&s()}catch(e){x(e.message||(0,N.Tl)("Request failed"))}finally{p(!1)}},v=h?.results?.filter(e=>!e.ok)||[],j=h?.skipped??0;return(0,i.jsx)(c.aF,{isOpen:e,title:(0,N.Tl)("Import CodeBuddy CN Accounts"),onClose:y,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsx)(c.$n,{variant:"secondary",fullWidth:!0,icon:"upload_file",onClick:()=>g.current?.click(),disabled:m,children:r||(0,N.Tl)("Choose JSON file...")}),(0,i.jsx)("input",{ref:g,type:"file",accept:".json,application/json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(!t)return;d(t.name),x(""),f(null);let s=new FileReader;s.onload=()=>n(String(s.result||"")),s.onerror=()=>x((0,N.Tl)("Failed to read file")),s.readAsText(t)}})]}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)("div",{className:"absolute -top-2 left-2 bg-sidebar px-1 text-[10px] text-text-muted",children:(0,N.Tl)("Or paste JSON")}),(0,i.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 pt-4 text-sm font-mono resize-y min-h-[160px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:'[{ "access_token": "eyJ...", "refresh_token": "eyJ...", "nickname": "<nickname>" }]',value:o,onChange:e=>n(e.target.value),disabled:m})]}),u&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:u}),h&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:`text-sm font-medium ${h.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",h.imported," ",(0,N.Tl)("added"),", ",h.updated," ",(0,N.Tl)("updated"),j>0?`, ${j} ${(0,N.Tl)("skipped")}`:"",h.failed>0?`, ✗ ${h.failed} ${(0,N.Tl)("failed")}`:""]}),v.length>0&&(0,i.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:v.map(e=>(0,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:b,fullWidth:!0,disabled:m||!o.trim(),children:m?(0,N.Tl)("Importing..."):(0,N.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:y,variant:"ghost",fullWidth:!0,disabled:m,children:(0,N.Tl)("Close")})]})]})})}K.propTypes={isOpen:O().bool.isRequired,onClose:O().func.isRequired,onSuccess:O().func},L.propTypes={isOpen:O().bool.isRequired,onClose:O().func.isRequired,onSuccess:O().func,password:O().string};let W={claude:"claudeAutoPing",codex:"codexAutoPing"};function B(){let e,t,s,o,u,x,h=(0,l.useParams)(),f=(0,l.useRouter)(),g=h.id,{getCaps:y}=(0,k.y)(),b=(0,C.i)(),[v,S]=(0,a.useState)([]),[A,O]=(0,a.useState)(!0),[E,I]=(0,a.useState)(null),[R,D]=(0,a.useState)([]),[M,F]=(0,a.useState)(!1),[B,H]=(0,a.useState)(!1),[G,V]=(0,a.useState)(!1),[Q,Z]=(0,a.useState)(""),[Y,X]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(!1),[es,ei]=(0,a.useState)(!1),[ea,el]=(0,a.useState)(!1),[eo,en]=(0,a.useState)(!1),[er,ed]=(0,a.useState)(null),[ec,em]=(0,a.useState)({}),[ep,eu]=(0,a.useState)([]),[ex,eh]=(0,a.useState)(()=>{try{let e=window.localStorage.getItem(`jsonModels_${h.id}`);return e?JSON.parse(e):null}catch{return null}}),[ef,eg]=(0,a.useState)(!1),[ey,eb]=(0,a.useState)(!1),[ev,ej]=(0,a.useState)(!1),[ew,ek]=(0,a.useState)(!1),[eN,eC]=(0,a.useState)({open:!1,action:null,value:""}),[eS,eT]=(0,a.useState)(""),[e$,eA]=(0,a.useState)(!1),[eO,eP]=(0,a.useState)({}),[eE,eI]=(0,a.useState)(""),[eU,eR]=(0,a.useState)(()=>new Set),[eD,eJ]=(0,a.useState)(!1),[eM,e_]=(0,a.useState)([]),[eq,ez]=(0,a.useState)("__none__"),[eF,eK]=(0,a.useState)(!1),[eL,eW]=(0,a.useState)(null),[eB,eH]=(0,a.useState)(""),[eG,eV]=(0,a.useState)("auto"),[eQ,eZ]=(0,a.useState)({enabled:!1,connections:{}}),[eY,eX]=(0,a.useState)([]),[e0,e1]=(0,a.useState)([]),[e5,e2]=(0,a.useState)([]),[e4,e3]=(0,a.useState)([]),[e6,e7]=(0,a.useState)(null),[e8,e9]=(0,a.useState)(!1),[te,tt]=(0,a.useState)(!1),[ts,ti]=(0,a.useState)(!1),[ta,tl]=(0,a.useState)(null),[to,tn]=(0,a.useState)({}),[tr,td]=(0,a.useState)(null),tc=(0,a.useRef)(!1),[tm,tp]=(0,a.useState)(!1),[tu,tx]=(0,a.useState)(!1),{copied:th,copy:tf}=(0,w.C)(),tg="ag_risk_confirmed",ty=()=>{F(!0)},tb=()=>{"antigravity"===g&&"true"!==window.localStorage.getItem(tg)?e9(!0):tO?ty():(Z(""),V(!0))},tv=()=>{Z(""),V(!0)},tj=()=>{tO?tb():tv()},tw=async()=>{let{action:e,value:t}=eN;eC({open:!1,action:null,value:""}),"export"===e?await tN(t):"import"===e&&(eT(t),et(!0))},tk=e=>{eT(""),eC({open:!0,action:e,value:""})},tN=async e=>{try{let t=await fetch("/api/oauth/codebuddy-cn/export",{cache:"no-store",headers:e?{"x-9r-password":e}:{}}),s=await t.json();if(!t.ok){if(401===t.status)throw Error((0,N.Tl)("Invalid password"));throw Error(s?.error||`Request failed: ${t.status}`)}let i=Array.isArray(s)?s:[];if(0===i.length)return void b.warning((0,N.Tl)("No CodeBuddy CN connections to export"));let a=new Blob([JSON.stringify(i,null,2)],{type:"application/json"}),l=URL.createObjectURL(a),o=document.createElement("a");o.href=l,o.download=`codebuddy-cn-accounts-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(l),1e3),b.success(`${i.length} ${(0,N.Tl)("accounts exported")}`)}catch(e){b.error((0,N.Tl)("Export failed")+": "+e.message)}},tC=async()=>{ek(!0);try{let e=await fetch("/api/oauth/codebuddy-cn/checkin",{method:"POST",cache:"no-store"}),t=await e.json();if(!e.ok)throw Error(t?.error||`Request failed: ${e.status}`);let s=Array.isArray(t?.results)?t.results:[];if(0===s.length)return void b.warning((0,N.Tl)("No CodeBuddy CN connections to check in"));let i=s.filter(e=>"checked-in"===e.status).length,a=s.filter(e=>"already"===e.status).length,l=s.filter(e=>"failed"===e.status).length;0===l?b.success(`${(0,N.Tl)("Check-in complete")}: ${i} ${(0,N.Tl)("checked-in")}, ${a} ${(0,N.Tl)("already checked in")}`):b.error(`${(0,N.Tl)("Check-in complete with errors")}: ${l} ${(0,N.Tl)("failed")}`)}catch(e){b.error((0,N.Tl)("Check-in failed")+": "+e.message)}finally{ek(!1)}},tS=()=>(0,i.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:(0,i.jsx)(c.$n,{size:"sm",icon:"calendar_today",onClick:tC,disabled:ew,className:"w-full sm:w-auto",title:(0,N.Tl)("CodeBuddy CN auto-checks in daily (00:00–06:00 local time)"),children:ew?(0,N.Tl)("Checking in..."):(0,N.Tl)("Check in now")})}),tT=E?{id:E.id,name:E.name||("anthropic-compatible"===E.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===E.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===E.type?"AC":"OC",apiType:E.apiType,baseUrl:E.baseUrl,type:E.type,modelsJsonUrl:E.modelsJsonUrl||void 0,fallbackModelsJsonUrl:E.fallbackModelsJsonUrl||void 0}:m.zN[g]||m.fg[g]||m.IS[g]||m.nJ[g]||m.br[g],t$=tT?.modelsJsonUrl,tA=tT?.authModes||[],tO=!!m.zN[g]||!!m.IS[g]||tA.includes("oauth"),tP=!!m.fg[g]||tA.includes("apikey"),tE=!!m.IS[g]?.noAuth,tI="codebuddy-cn"===g,tU=tI&&ey,tR=tI&&ev,tD=(0,p.KC)(g),tJ="cursor"===g&&e0.length>0?e0:tD,tM=(0,m.wG)(g),t_=(0,m.mq)(g),tq=(0,m.gb)(g),tz=t_||tq,tF=!tz&&tO&&tP,tK="xai"===g?"Grok Build OAuth":"grok-cli"===g?"Grok CLI Device Login":"kimi"===g?"Kimi Coding OAuth":"OAuth",tL="xai"===g?"xAI API Key":"kimi"===g?"Kimi API Key":"qoder"===g?"PAT":"API Key",tW=e=>{if(!eG||"auto"===eG)return null;let t=j(g,e);return t&&t.includes(eG)?eG:null},tB=tz?g:tM,tH=(()=>{let e=new Set,t=new Set,s=s=>{if(!s||t.has(s))return;t.add(s);let i=j(g,s);i&&i.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of tJ)s(e.id);for(let e of e5)s(e.id);for(let e of ep)e.providerAlias===tB&&"llm"===(e.kind||e.type||"llm")&&s(e.id);return e.size?["auto",...e]:null})(),tG=tz?E?.prefix||g:tM,tV=(0,a.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tB)}`,{cache:"no-store"}),t=await e.json();e.ok&&e3(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tB]),tQ=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tB,ids:[e]})})).ok&&await tV()}catch(e){console.log("Error disabling model:",e)}},tZ=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tB)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tV()}catch(e){console.log("Error enabling model:",e)}},tY=async e=>{e.length&&e7({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{e7(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tB,ids:e})})).ok&&await tV()}catch(e){console.log("Error disabling all models:",e)}}})},tX=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tB)}`,{method:"DELETE"})).ok&&await tV()}catch(e){console.log("Error enabling all models:",e)}},t0=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&em(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),t1=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&eu(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]),t5=(0,a.useCallback)(async()=>{if(t$)try{let e=await fetch(`/api/providers/${g}/json-models`,{cache:"no-store"}),t=await e.json();if(e.ok){eh(t.models||[]);try{window.localStorage.setItem(`jsonModels_${g}`,JSON.stringify(t.models||[]))}catch{}}}catch(e){console.log("Error fetching provider JSON models:",e)}},[g,t$]);(0,a.useEffect)(()=>{"kilocode"===g&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&e2(e.models)}).catch(()=>{})},[g]);let t2=(0,a.useCallback)(async()=>{try{let[e,t,s,i]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),a=await e.json(),l=await t.json(),o=await s.json(),n=i.ok?await i.json():{};if(e.ok){let e=(a.connections||[]).filter(e=>e.provider===g);S(e)}s.ok&&D(o.proxyPools||[]);let r=(n.providerStrategies||{})[g]||{};eW(r.fallbackStrategy||null),eH(null!=r.stickyRoundRobinLimit?String(r.stickyRoundRobinLimit):"1");let d=(n.providerThinking||{})[g]||{};eV(d.mode||"auto");let c=W[g],m=c&&n[c]||{};if(eZ({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===g)||null;if(!e&&tz)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===g)||null))break}I(e)}}catch(e){console.log("Error fetching connections:",e)}finally{O(!1)}},[g,tz]),t4=async e=>{try{let t=await fetch(`/api/provider-nodes/${g}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(I(s.node),await t2(),el(!1))}catch(e){console.log("Error updating provider node:",e)}},t3=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),i=(s.ok?await s.json():{}).providerStrategies||{},a={};e&&(a.fallbackStrategy=e),"round-robin"===e&&""!==t&&(a.stickyRoundRobinLimit=Number(t)||3);let l={...i};0===Object.keys(a).length?delete l[g]:l[g]=a,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},t6=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[g]={mode:e}:delete s[g],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}},t7=async e=>{let t=W[g];if(t){eZ(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,a.useEffect)(()=>{t2(),t0(),t1(),tV(),t5()},[t2,t0,t1,tV,t5]),(0,a.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.json()).then(e=>{"boolean"==typeof e.modelJsonImport&&eg(e.modelJsonImport),"boolean"==typeof e.codeBuddyOAuthImport&&eb(e.codeBuddyOAuthImport),"boolean"==typeof e.codeBuddyCheckin&&ej(e.codeBuddyCheckin)}).catch(e=>console.log("Error reading settings:",e))},[]),(0,a.useEffect)(()=>{if("cursor"!==g)return void e1([]);let e=v.find(e=>!1!==e.isActive);if(!e?.id)return void e1([]);let t=!1;return fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json()})).then(({ok:e,data:s})=>{!t&&e&&Array.isArray(s.models)&&s.models.length>0&&e1(s.models)}).catch(()=>{}),()=>{t=!0}},[g,v]),(0,a.useEffect)(()=>{let e=(m.zN[g]||m.fg[g]||m.IS[g]||m.nJ[g])?.modelsFetcher;e&&T(e).then(eX)},[g]);let t8=async(e,t,s=tM)=>{let i=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:i,alias:t})});if(e.ok)await t0();else{let t=await e.json();b.error(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},t9=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await t0()}catch(e){console.log("Error deleting alias:",e)}},se=async(e,t="llm",s=tB,i={},a)=>{try{let l={providerAlias:s,id:e,type:t};if(void 0!==a&&(l.enabled=a),i&&"object"==typeof i)for(let e of["vision","reasoning","contextWindow","maxOutput","thinkingFormat"])void 0!==i[e]&&(l[e]=i[e]);let o=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(o.ok)await t1(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await o.json();b.error(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},st=async(e,t="llm",s=tB)=>{try{let i=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${i}`,{method:"DELETE"})).ok&&(await t1(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},ss=async()=>{if(tm)return;let e=v.find(e=>!1!==e.isActive);if(!e)return void b.warning((0,N.Tl)("Please add an active Qoder connection first"));tp(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void b.error(s.error||(0,N.Tl)("Failed to fetch models"));let i=s.models||[];if(0===i.length)return void b.warning((0,N.Tl)("No models returned"));let a=0;for(let e of i){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,"");ep.some(e=>e.providerAlias===tB&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(ec).includes(`${tB}/${s}`)||(await se(s,"llm",tB),a+=1)}0===a?b.warning((0,N.Tl)("All models already exist, no new models added")):b.success((0,N.Tl)("Successfully added")+` ${a} `+(0,N.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),b.error((0,N.Tl)("Error fetching models")+": "+e.message)}finally{tp(!1)}},si=async()=>{if(!tu){tx(!0);try{let e=await fetch(`/api/providers/${g}/json-models`,{method:"POST"}),t=await e.json();if(!e.ok)return void b.error(t.error||(0,N.Tl)("Failed to fetch models"));await t5();let s=t.total||t.models?.length||0;b.success((0,N.Tl)("Sync complete")+` (${s} ${(0,N.Tl)("models")})`)}catch(e){console.log("Error importing models from JSON:",e),b.error((0,N.Tl)("Error fetching models")+": "+e.message)}finally{tx(!1)}}},sa=async(e,t)=>{try{(await fetch(`/api/providers/${g}/json-models`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({modelId:e,enabled:t})})).ok&&await t5()}catch(e){console.log("Error toggling JSON model:",e)}},sl=async e=>{try{(await fetch(`/api/providers/${g}/json-models`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({all:!0,enabled:e})})).ok&&await t5()}catch(e){console.log("Error bulk-toggling JSON models:",e)}},so=async()=>{if(te||0===v.length)return;let e=Object.fromEntries(v.map(e=>[e.id,{state:"queued",error:null}]));tc.current=!1,tt(!0),ti(!1),tl(null),tn(e),td({total:v.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<v.length;e+=1){if(tc.current){td({total:v.length,completed:e,passed:t,failed:s,stopped:!0});break}let i=v[e];tl(i.id),tn(e=>({...e,[i.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${i.id}/test`,{method:"POST"}),a=await e.json(),l=!!a.valid;l?t+=1:s+=1,tn(e=>({...e,[i.id]:{state:l?"success":"failed",error:l?null:a.error||null}}))}catch(e){s+=1,tn(t=>({...t,[i.id]:{state:"failed",error:e.message||"Test failed"}}))}td({total:v.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<v.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{tl(null),tt(!1),ti(!1),tc.current=!1}},sn=async e=>{e7({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{e7(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&S(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},sr=()=>{t2(),F(!1)},sd=async e=>{Z("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:g,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await t2(),V(!1);return}Z(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),Z("Failed to save connection")}},sc=async e=>{try{(await fetch(`/api/providers/${er.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await t2(),ei(!1))}catch(e){console.log("Error updating connection:",e)}},sm=async(e,t)=>{try{(await fetch(`/api/providers/${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 updating connection status:",e)}},sp=async(e,t)=>{let s=[...v];[s[e],s[t]]=[s[t],s[e]],S(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await t2()}},su=v.filter(e=>eM.includes(e.id)),sx=v.length>0&&eM.length===v.length;(0,a.useEffect)(()=>{e_(e=>e.filter(e=>v.some(t=>t.id===e)))},[v]),(()=>{if(0===su.length)return;let e=new Set(su.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=R.find(e=>e.id===t);return s?.name}})();let sh=()=>{eF||en(!1)},sf=async e=>{eK(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:i}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:i})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await t2(),en(!1)}finally{eK(!1)}},sg=e=>sf(v.map(t=>({connectionId:t.id,proxyPoolId:e}))),sy=(0,i.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:v.map((e,t)=>{let s;return(0,i.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,i.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,i.jsx)("input",{type:"checkbox",checked:(s=e.id,eM.includes(s)),onChange:()=>{var t;return t=e.id,void e_(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,i.jsx)("div",{className:"flex-1 min-w-0",children:(0,i.jsx)(J,{connection:e,proxyPools:R,isOAuth:tO,isFirst:0===t,isLast:t===v.length-1,onMoveUp:()=>sp(t,t-1),onMoveDown:()=>sp(t,t+1),onToggleActive:t=>sm(e.id,t),autoPing:W[g]&&"oauth"===e.authType?{on:!0===eQ.connections[e.id],onToggle:t=>{var s;return s=e.id,void t7({...eQ,connections:{...eQ.connections,[s]:t}})},provider:g}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&S(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ed(e),ei(!0)},onDelete:()=>sn(e.id),oneByOneStatus:to[e.id]||null})})]},e.id)})}),sb=R.filter(e=>!0===e.isActive),sv=(0,i.jsx)(c.aF,{isOpen:eo,onClose:sh,title:`Apply Proxy (${v.length} connections)`,children:(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)("button",{onClick:()=>{let e=R.filter(e=>!0===e.isActive);return 0===e.length?void b.warning("No active proxy pools available."):sf(v.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eF||0===sb.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,i.jsxs)("button",{onClick:()=>sg(null),disabled:eF,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),R.map(e=>(0,i.jsxs)("button",{onClick:()=>sg(e.id),disabled:eF||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,i.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,i.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eF&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,i.jsx)(c.$n,{onClick:sh,variant:"ghost",fullWidth:!0,disabled:eF,children:"Cancel"})]})}),sj=async e=>{if(!eU.has(e)){eR(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tB}/${e}`})}),s=await t.json();eP(t=>({...t,[e]:s.ok?"ok":"error"})),eI(s.ok?"":s.error||"Model not reachable")}catch{eP(t=>({...t,[e]:"error"})),eI("Network error")}finally{eR(t=>{let s=new Set(t);return s.delete(e),s})}}};if(A)return(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsx)(c.Qv,{}),(0,i.jsx)(c.Qv,{})]});if(!tT)return(0,i.jsxs)("div",{className:"text-center py-20",children:[(0,i.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,i.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let sw=()=>t_&&tT.apiType?"responses"===tT.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tq?"/providers/anthropic-m.png":(0,d.HY)(tT.id);return(0,i.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,i.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${tT.color}15`},children:e$||!sw()?(0,i.jsx)("span",{className:"text-sm font-bold",style:{color:tT.color},children:tT.textIcon||tT.id.slice(0,2).toUpperCase()}):(0,i.jsx)(r.default,{src:sw(),alt:tT.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,d.Kw)(tT.id),eA(!0)},loading:"lazy",decoding:"async"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,i.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:tT.name}),(tT.notice?.apiKeyUrl||tT.notice?.signupUrl||tT.website)&&(0,i.jsxs)("a",{href:tT.notice?.apiKeyUrl||tT.notice?.signupUrl||tT.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),tT.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]}),(0,i.jsx)(c.N5,{code:tT.notice?.inviteCode})]}),(0,i.jsxs)("p",{className:"text-text-muted",children:[v.length," connection",1===v.length?"":"s"]})]})]})]}),tT.deprecated&&(0,i.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,i.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:tT.deprecationNotice})]}),tT.notice?.text&&!tT.deprecated&&(0,i.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,i.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:tT.notice.text}),tT.notice.apiKeyUrl&&(0,i.jsx)("a",{href:tT.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"}),(0,i.jsx)(c.N5,{code:tT.notice?.inviteCode})]}),tz&&E&&(0,i.jsx)(c.Zp,{children:(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:tq?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,i.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tq?"Messages API":"responses"===E.apiType?"Responses API":"Chat Completions"," \xb7 ",(E.baseUrl||"").replace(/\/$/,""),"/",tq?"messages":"responses"===E.apiType?"responses":"chat/completions"]})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{Z(""),V(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>el(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{e7({title:"Delete Compatible Node",message:`Delete this ${tq?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{e7(null);try{(await fetch(`/api/provider-nodes/${g}`,{method:"DELETE"})).ok&&f.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tE?(0,i.jsx)(c.gw,{providerId:g}):(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[v.length>0&&R.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>en(!0),children:"Apply Proxy"}),v.length>0&&(0,i.jsxs)(i.Fragment,{children:[eM.length>0&&(0,i.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eM.length;0!==e&&e7({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{e7(null);let e=0,t=[...eM];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}S(e=>e.filter(e=>!t.includes(e.id))),e_([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eM.length,")"]}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:so,disabled:te,children:te?(0,N.Tl)("Testing Connection One-by-One..."):(0,N.Tl)("Test Connection One-by-One")}),te&&(0,i.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{te&&(tc.current=!0,ti(!0))},disabled:ts,children:ts?(0,N.Tl)("Stopping..."):(0,N.Tl)("Stop")})]}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted font-medium",children:(0,N.Tl)("Round Robin")}),(0,i.jsx)(c.lM,{checked:"round-robin"===eL,onChange:e=>{let t=e?"round-robin":null,s=e?eB||"1":eB;e&&!eB&&eH("1"),eW(t),t3(t,s)}}),"round-robin"===eL&&(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted",children:(0,N.Tl)("Sticky:")}),(0,i.jsx)("input",{type:"number",min:1,value:eB,onChange:e=>{var t;eH(t=e.target.value),t3("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===v.length?(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tO?"lock":"key"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tF&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tK," or ",tL,"."]})]})]}),(0,i.jsx)("div",{className:"flex gap-2",children:tF?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tb,children:tK}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:tv,children:tL}),tU&&!tR&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>tk("export"),children:(0,N.Tl)("Export")}),(0,i.jsx)(c.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>tk("import"),children:(0,N.Tl)("Import")})]}),tR&&tS()]}):(0,i.jsxs)(i.Fragment,{children:[!tz&&"iflow"===g&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>H(!0),children:"Cookie"}),"codex"===g&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),children:(0,N.Tl)("Bulk Add")}),(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:tj,children:tz?"Add API Key":"iflow"===g?"OAuth":"Add Connection"})]})})]}):(0,i.jsxs)(i.Fragment,{children:[tr&&(0,i.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,i.jsxs)("span",{children:[(0,N.Tl)("Total:")," ",tr.total]}),(0,i.jsxs)("span",{children:[(0,N.Tl)("Completed:")," ",tr.completed]}),(0,i.jsxs)("span",{children:[(0,N.Tl)("Passed:")," ",tr.passed]}),(0,i.jsxs)("span",{children:[(0,N.Tl)("Failed:")," ",tr.failed]}),tr.stopped&&(0,i.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:(0,N.Tl)("Stopped")}),te&&ta&&(0,i.jsxs)("span",{children:[(0,N.Tl)("Running:")," ",v.find(e=>e.id===ta)?.name||ta]})]})}),v.length>0&&(0,i.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,i.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,i.jsx)("input",{type:"checkbox",checked:sx,onChange:()=>{sx?e_([]):e_(v.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),sy,!tz&&(0,i.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===g&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>H(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===g&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),title:(0,N.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,N.Tl)("Bulk Add")}),tF?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tb,className:"w-full sm:w-auto",children:tK}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:tv,className:"w-full sm:w-auto",children:tL}),tU&&!tR&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>tk("export"),className:"w-full sm:w-auto",children:(0,N.Tl)("Export")}),(0,i.jsx)(c.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>tk("import"),className:"w-full sm:w-auto",children:(0,N.Tl)("Import")})]}),tR&&tS()]}):(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:tj,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),tH&&(0,i.jsx)("select",{value:eG,onChange:e=>{var t;eV(t=e.target.value),t6(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:tH.map(e=>(0,i.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!tz&&(e=ef&&!!t$,t=(ex||[]).filter(e=>!1!==e.enabled).length,s=(ex||[]).length-t,o=[...tJ,...e5.filter(e=>!tJ.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!e4.includes(e)),u=e?s>0:e4.length>0,x=e?t>0:o.length>0,(0,i.jsxs)("div",{className:"flex gap-2",children:[u&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>e?sl(!0):tX(),children:"Active All"}),x&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>e?sl(!1):tY(o),children:"Disable All"})]}))]}),!!eE&&(0,i.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:eE}),(()=>{let e,t,s;if(tz)return(0,i.jsx)(U,{providerStorageAlias:tB,providerDisplayAlias:tG,modelAliases:ec,customModels:ep,copied:th,onCopy:tf,onSetAlias:t8,onDeleteAlias:t9,onAddCustomModel:e=>se(e,"llm",tB),onDeleteCustomModel:e=>st(e,"llm",tB),connections:v,isAnthropic:tq,jsonModels:t$?ex:null,importingJsonModels:tu,onImportJsonModels:si,onToggleJsonModel:sa,onBulkJsonModels:sl,useJsonCatalog:ef&&!!t$});let a=[...tJ,...e5.filter(e=>!tJ.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}),l=new Set(e4),o=ef&&!!t$,n=o?(ex||[]).filter(e=>!1!==e.enabled):[],r=o?(ex||[]).filter(e=>!1===e.enabled):[],d=o?[]:a.filter(e=>!l.has(e.id)),c=o?[]:a.filter(e=>l.has(e.id)),m=$({customModels:ep,modelAliases:ec,providerAlias:tB,builtInModels:tJ,type:"llm"});return(0,i.jsxs)("div",{className:"flex flex-wrap gap-3",children:[m.filter(e=>!1!==e.enabled).map(e=>(0,i.jsx)(P,{model:{id:e.id,name:e.name},fullModel:`${tG}/${e.id}`,alias:e.alias,copied:th,onCopy:tf,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?st(e.id,"llm",tB):t9(e.alias)},testStatus:eO[e.id],onTest:v.length>0||tE?()=>sj(e.id):void 0,isTesting:eU.has(e.id),isCustom:!0,isFree:!1,caps:{...y(`${g}/${e.id}`)||{},...void 0===e.vision?{}:{vision:e.vision},...void 0===e.reasoning?{}:{reasoning:e.reasoning},...void 0===e.contextWindow?{}:{contextWindow:e.contextWindow},...void 0===e.maxOutput?{}:{maxOutput:e.maxOutput}},thinkingSuffix:tW(e.id)},`${e.source}-${e.fullModel}`)),n.map(e=>(0,i.jsx)(P,{model:{id:e.id,name:e.name},fullModel:`${tG}/${e.id}`,copied:th,onCopy:tf,testStatus:eO[e.id],onTest:v.length>0||tE?()=>sj(e.id):void 0,isTesting:eU.has(e.id),onDisable:()=>sa(e.id,!1),isFree:!1,caps:{...y(`${g}/${e.id}`)||{},...void 0===e.vision?{}:{vision:e.vision},...void 0===e.reasoning?{}:{reasoning:e.reasoning},...void 0===e.contextWindow?{}:{contextWindow:e.contextWindow},...void 0===e.maxOutput?{}:{maxOutput:e.maxOutput}},thinkingSuffix:tW(e.id)},`json-${e.id}`)),d.map(e=>{let t=`${tB}/${e.id}`,s=`${g}/${e.id}`,a=Object.entries(ec).find(([,e])=>e===t||e===s)?.[0];return(0,i.jsx)(P,{model:e,fullModel:`${tG}/${e.id}`,alias:a,copied:th,onCopy:tf,onSetAlias:t=>t8(e.id,t,tB),onDeleteAlias:()=>t9(a),testStatus:eO[e.id],onTest:v.length>0||tE?()=>sj(e.id):void 0,isTesting:eU.has(e.id),isFree:e.isFree,onDisable:()=>tQ(e.id),caps:y(`${g}/${e.id}`),thinkingSuffix:tW(e.id)},e.id)}),(0,i.jsxs)("button",{onClick:()=>eJ(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===g&&v.some(e=>!1!==e.isActive)&&(0,i.jsxs)("button",{onClick:ss,disabled:tm,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:tm?{animation:"spin 1s linear infinite"}:void 0,children:tm?"progress_activity":"download"}),tm?(0,N.Tl)("Fetching..."):(0,N.Tl)("Fetch Qoder Models")]}),ef&&t$&&v.some(e=>!1!==e.isActive)&&(0,i.jsxs)("button",{onClick:si,disabled:tu,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:tu?{animation:"spin 1s linear infinite"}:void 0,children:tu?"progress_activity":"download"}),tu?(0,N.Tl)("Fetching..."):(0,N.Tl)("Fetch Models")]}),eY.length>0&&(e=new Set([...Object.values(ec),...m.map(e=>e.fullModel)]),t=new Set(tJ.map(e=>e.id)),0===(s=eY.filter(s=>!e.has(`${tB}/${s.id}`)&&!t.has(s.id))).length?null:(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,i.jsxs)("button",{onClick:async()=>{await se(e.id,"llm",tB)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),(r.length>0||c.length>0)&&(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",r.length+c.length,"):"]}),(0,i.jsxs)("div",{className:"flex flex-wrap gap-2",children:[r.map(e=>(0,i.jsxs)("button",{onClick:()=>sa(e.id,!0),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},`json-${e.id}`)),c.map(e=>(0,i.jsxs)("button",{onClick:()=>tZ(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))]})]})]})})()]}),sv,"kiro"===g?(0,i.jsx)(c.Mh,{isOpen:M,providerInfo:tT,onSuccess:sr,onClose:()=>F(!1)}):"cursor"===g?(0,i.jsx)(c.G9,{isOpen:M,onSuccess:sr,onClose:()=>F(!1)}):"gitlab"===g?(0,i.jsx)(c.vj,{isOpen:M,providerInfo:tT,onSuccess:sr,onClose:()=>F(!1)}):(0,i.jsx)(c.LF,{isOpen:M,provider:g,providerInfo:tT,onSuccess:sr,onClose:()=>F(!1)}),"iflow"===g&&(0,i.jsx)(c.vE,{isOpen:B,onSuccess:()=>{t2(),H(!1)},onClose:()=>H(!1)}),(0,i.jsx)(_,{isOpen:G,provider:g,providerName:tT.name,isCompatible:tz,isAnthropic:tq,authType:tT?.authType,authHint:tT?.authHint,website:tT?.website,proxyPools:R,error:Q,existingNames:v.map(e=>e.name).filter(Boolean),onSave:sd,onBulkDone:t2,onClose:()=>{Z(""),V(!1)}}),(0,i.jsx)(c.wI,{isOpen:es,connection:er,proxyPools:R,onSave:sc,onClose:()=>ei(!1)}),tz&&(0,i.jsx)(q,{isOpen:ea,node:E,onSave:t4,onClose:()=>el(!1),isAnthropic:tq}),!tz&&(0,i.jsx)(z,{isOpen:eD,providerAlias:tB,providerDisplayAlias:tG,onSave:async e=>{await se(e,"llm",tB),eJ(!1)},onClose:()=>eJ(!1)}),"codex"===g&&(0,i.jsx)(K,{isOpen:Y,onClose:()=>X(!1),onSuccess:t2}),"codebuddy-cn"===g&&(0,i.jsx)(L,{isOpen:ee,password:eS,onClose:()=>et(!1),onSuccess:t2}),(0,i.jsxs)(c.aF,{isOpen:eN.open,onClose:()=>eC({open:!1,action:null,value:""}),title:(0,N.Tl)("Confirm Password"),size:"sm",footer:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{variant:"ghost",onClick:()=>eC({open:!1,action:null,value:""}),children:(0,N.Tl)("Cancel")}),(0,i.jsx)(c.$n,{variant:"primary",onClick:tw,disabled:!eN.value,children:(0,N.Tl)("Confirm")})]}),children:[(0,i.jsx)("p",{className:"text-text-muted mb-3 text-sm",children:(0,N.Tl)("export"===eN.action?"Enter your current password to export CodeBuddy CN accounts.":"Enter your current password to import CodeBuddy CN accounts.")}),(0,i.jsx)(c.pd,{type:"password",autoFocus:!0,value:eN.value,onChange:e=>eC(t=>({...t,value:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&eN.value&&tw()},placeholder:(0,N.Tl)("Password")})]}),(0,i.jsx)(c.uo,{isOpen:e8,onClose:()=>e9(!1),onConfirm:()=>{(window.localStorage.setItem(tg,"true"),e9(!1),tO)?ty():tv()},title:"Risk Notice",message:tT?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,i.jsx)(c.uo,{isOpen:!!e6,onClose:()=>e7(null),onConfirm:e6?.onConfirm,title:e6?.title||"Confirm",message:e6?.message,variant:"danger"})]})}},70217:(e,t,s)=>{"use strict";function i(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>i})},93578:(e,t,s)=>{Promise.resolve().then(s.bind(s,51745))}},e=>{e.O(0,[4614,5772,1321,5497,8441,3794,7358],()=>e(e.s=93578)),_N_E=e.O()}]);