@techysy/10router 1.1.1 → 1.1.2

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 (993) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +7 -5
  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 +12 -0
  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 +3 -3
  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 +2 -2
  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 +2 -2
  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 +5 -5
  88. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  89. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  90. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  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 +1 -1
  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 +2 -2
  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/auth/verify-password/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  124. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
  138. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/network/egress-region/route.js +1 -0
  210. package/app/.next-cli-build/server/app/api/network/egress-region/route.js.nft.json +1 -0
  211. package/app/.next-cli-build/server/app/api/network/egress-region/route_client-reference-manifest.js +1 -0
  212. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  251. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  285. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  287. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  293. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  295. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  297. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  299. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  301. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  303. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  305. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  307. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  325. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  347. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js +1 -0
  355. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js.nft.json +1 -0
  356. package/app/.next-cli-build/server/app/api/usage/dashboard/route_client-reference-manifest.js +1 -0
  357. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  418. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  424. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  426. package/app/.next-cli-build/server/app/callback.html +1 -1
  427. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  428. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  429. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  430. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  431. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  433. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  434. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  435. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  436. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  437. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  438. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
  439. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  440. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  441. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  443. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
  444. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  445. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  446. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  447. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  448. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  449. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  450. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  451. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  452. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  453. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
  454. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  455. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  456. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  457. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  458. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
  459. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  460. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  461. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  463. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
  464. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  465. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  466. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  467. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  468. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
  469. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  470. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  473. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
  474. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  475. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  476. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  478. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
  479. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  480. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
  483. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
  484. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
  485. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  486. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  487. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  488. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
  489. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  490. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  491. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  496. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  497. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  498. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  499. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  501. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
  502. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  503. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  504. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  506. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
  507. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  508. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  511. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
  512. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  513. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  514. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  516. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
  517. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  518. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  519. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  520. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  521. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  522. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  523. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  524. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  525. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  526. package/app/.next-cli-build/server/app/index.html +1 -1
  527. package/app/.next-cli-build/server/app/index.rsc +5 -5
  528. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  529. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  530. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  531. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  532. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  533. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  534. package/app/.next-cli-build/server/app/landing.html +1 -1
  535. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  536. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  537. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  538. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +6 -6
  539. package/app/.next-cli-build/server/app/login/page.js +1 -1
  540. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  541. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  542. package/app/.next-cli-build/server/app/login.html +1 -1
  543. package/app/.next-cli-build/server/app/login.rsc +6 -6
  544. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  545. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
  547. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  548. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/page.js +1 -1
  550. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  551. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  552. package/app/.next-cli-build/server/app-paths-manifest.json +7 -5
  553. package/app/.next-cli-build/server/chunks/1159.js +5 -1
  554. package/app/.next-cli-build/server/chunks/1281.js +1 -0
  555. package/app/.next-cli-build/server/chunks/1377.js +1 -1
  556. package/app/.next-cli-build/server/chunks/1937.js +1 -1
  557. package/app/.next-cli-build/server/chunks/1968.js +1 -0
  558. package/app/.next-cli-build/server/chunks/2112.js +1 -1
  559. package/app/.next-cli-build/server/chunks/2120.js +1 -1
  560. package/app/.next-cli-build/server/chunks/2132.js +1 -1
  561. package/app/.next-cli-build/server/chunks/2179.js +1 -1
  562. package/app/.next-cli-build/server/chunks/2268.js +1 -0
  563. package/app/.next-cli-build/server/chunks/3395.js +1 -0
  564. package/app/.next-cli-build/server/chunks/3651.js +9 -9
  565. package/app/.next-cli-build/server/chunks/3662.js +1 -1
  566. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  567. package/app/.next-cli-build/server/chunks/3962.js +1 -1
  568. package/app/.next-cli-build/server/chunks/4037.js +1 -1
  569. package/app/.next-cli-build/server/chunks/4055.js +1 -1
  570. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  571. package/app/.next-cli-build/server/chunks/4531.js +1 -0
  572. package/app/.next-cli-build/server/chunks/4848.js +1 -0
  573. package/app/.next-cli-build/server/chunks/4862.js +1 -1
  574. package/app/.next-cli-build/server/chunks/4985.js +1 -1
  575. package/app/.next-cli-build/server/chunks/5330.js +9 -3
  576. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  577. package/app/.next-cli-build/server/chunks/5781.js +1 -1
  578. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  579. package/app/.next-cli-build/server/chunks/615.js +1 -1
  580. package/app/.next-cli-build/server/chunks/6212.js +1 -1
  581. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  582. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  583. package/app/.next-cli-build/server/chunks/6520.js +1 -0
  584. package/app/.next-cli-build/server/chunks/653.js +1 -1
  585. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  586. package/app/.next-cli-build/server/chunks/6871.js +1 -1
  587. package/app/.next-cli-build/server/chunks/6960.js +1 -1
  588. package/app/.next-cli-build/server/chunks/7239.js +1 -1
  589. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  590. package/app/.next-cli-build/server/chunks/7805.js +12 -3
  591. package/app/.next-cli-build/server/chunks/7843.js +1 -1
  592. package/app/.next-cli-build/server/chunks/808.js +1 -0
  593. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  594. package/app/.next-cli-build/server/chunks/8410.js +1 -1
  595. package/app/.next-cli-build/server/chunks/8546.js +1 -1
  596. package/app/.next-cli-build/server/chunks/8635.js +1 -1
  597. package/app/.next-cli-build/server/chunks/869.js +1 -1
  598. package/app/.next-cli-build/server/chunks/877.js +1 -1
  599. package/app/.next-cli-build/server/chunks/8838.js +1 -1
  600. package/app/.next-cli-build/server/chunks/8895.js +5 -5
  601. package/app/.next-cli-build/server/chunks/8910.js +1 -1
  602. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  603. package/app/.next-cli-build/server/chunks/8988.js +1 -0
  604. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  605. package/app/.next-cli-build/server/chunks/9927.js +1 -0
  606. package/app/.next-cli-build/server/instrumentation.js +1 -1
  607. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  608. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  609. package/app/.next-cli-build/server/middleware.js +5 -5
  610. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  611. package/app/.next-cli-build/server/pages/404.html +1 -1
  612. package/app/.next-cli-build/server/pages/500.html +1 -1
  613. package/app/.next-cli-build/static/0UB55QZoHsERFCcuezqF6/_buildManifest.js +1 -0
  614. package/app/.next-cli-build/static/chunks/1321-c260dcc02a05636e.js +1 -0
  615. package/app/.next-cli-build/static/chunks/5497-5558a45da400f48e.js +7 -0
  616. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-df8dac9c150f9f1e.js → page-b0d4fedb7b84fe8a.js} +8 -8
  617. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-df0197fa38b2dd6d.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-6fa55fa547594c8c.js +14 -0
  619. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-e5e78bb5f4aa4063.js → page-c44ffd57ebec461e.js} +1 -1
  620. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c640efd5ea8efb38.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-bf55da31ba675aa9.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/_global-error/page-f2f9b74f8844db3a.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-f2f9b74f8844db3a.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f2f9b74f8844db3a.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f2f9b74f8844db3a.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f2f9b74f8844db3a.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f2f9b74f8844db3a.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-f2f9b74f8844db3a.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-f2f9b74f8844db3a.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-f2f9b74f8844db3a.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-f2f9b74f8844db3a.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-f2f9b74f8844db3a.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-f2f9b74f8844db3a.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-f2f9b74f8844db3a.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f2f9b74f8844db3a.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f2f9b74f8844db3a.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f2f9b74f8844db3a.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f2f9b74f8844db3a.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f2f9b74f8844db3a.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f2f9b74f8844db3a.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f2f9b74f8844db3a.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f2f9b74f8844db3a.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f2f9b74f8844db3a.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f2f9b74f8844db3a.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f2f9b74f8844db3a.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-f2f9b74f8844db3a.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f2f9b74f8844db3a.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-f2f9b74f8844db3a.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f2f9b74f8844db3a.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f2f9b74f8844db3a.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f2f9b74f8844db3a.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f2f9b74f8844db3a.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f2f9b74f8844db3a.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f2f9b74f8844db3a.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/combos/route-f2f9b74f8844db3a.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-f2f9b74f8844db3a.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-f2f9b74f8844db3a.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-f2f9b74f8844db3a.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-f2f9b74f8844db3a.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-f2f9b74f8844db3a.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-f2f9b74f8844db3a.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/health/route-f2f9b74f8844db3a.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/init/route-f2f9b74f8844db3a.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f2f9b74f8844db3a.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-f2f9b74f8844db3a.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/keys/route-f2f9b74f8844db3a.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/locale/route-f2f9b74f8844db3a.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f2f9b74f8844db3a.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f2f9b74f8844db3a.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f2f9b74f8844db3a.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f2f9b74f8844db3a.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f2f9b74f8844db3a.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f2f9b74f8844db3a.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f2f9b74f8844db3a.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-f2f9b74f8844db3a.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-f2f9b74f8844db3a.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-f2f9b74f8844db3a.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-f2f9b74f8844db3a.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f2f9b74f8844db3a.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/models/route-f2f9b74f8844db3a.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/models/test/route-f2f9b74f8844db3a.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-f2f9b74f8844db3a.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f2f9b74f8844db3a.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-f2f9b74f8844db3a.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-f2f9b74f8844db3a.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-f2f9b74f8844db3a.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-f2f9b74f8844db3a.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f2f9b74f8844db3a.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f2f9b74f8844db3a.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f2f9b74f8844db3a.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f2f9b74f8844db3a.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f2f9b74f8844db3a.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-f2f9b74f8844db3a.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f2f9b74f8844db3a.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f2f9b74f8844db3a.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-f2f9b74f8844db3a.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f2f9b74f8844db3a.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f2f9b74f8844db3a.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-f2f9b74f8844db3a.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-f2f9b74f8844db3a.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-f2f9b74f8844db3a.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-f2f9b74f8844db3a.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/pricing/route-f2f9b74f8844db3a.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f2f9b74f8844db3a.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f2f9b74f8844db3a.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f2f9b74f8844db3a.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f2f9b74f8844db3a.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f2f9b74f8844db3a.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f2f9b74f8844db3a.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f2f9b74f8844db3a.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-f2f9b74f8844db3a.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f2f9b74f8844db3a.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/providers/route-f2f9b74f8844db3a.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f2f9b74f8844db3a.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f2f9b74f8844db3a.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f2f9b74f8844db3a.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f2f9b74f8844db3a.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f2f9b74f8844db3a.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f2f9b74f8844db3a.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f2f9b74f8844db3a.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f2f9b74f8844db3a.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f2f9b74f8844db3a.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-f2f9b74f8844db3a.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-f2f9b74f8844db3a.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-f2f9b74f8844db3a.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-f2f9b74f8844db3a.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-f2f9b74f8844db3a.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-f2f9b74f8844db3a.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-f2f9b74f8844db3a.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-f2f9b74f8844db3a.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-f2f9b74f8844db3a.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-f2f9b74f8844db3a.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f2f9b74f8844db3a.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f2f9b74f8844db3a.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/settings/route-f2f9b74f8844db3a.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-f2f9b74f8844db3a.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/tags/route-f2f9b74f8844db3a.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f2f9b74f8844db3a.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f2f9b74f8844db3a.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-f2f9b74f8844db3a.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-f2f9b74f8844db3a.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-f2f9b74f8844db3a.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f2f9b74f8844db3a.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f2f9b74f8844db3a.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f2f9b74f8844db3a.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f2f9b74f8844db3a.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f2f9b74f8844db3a.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f2f9b74f8844db3a.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f2f9b74f8844db3a.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f2f9b74f8844db3a.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-f2f9b74f8844db3a.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f2f9b74f8844db3a.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f2f9b74f8844db3a.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-f2f9b74f8844db3a.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-f2f9b74f8844db3a.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-f2f9b74f8844db3a.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f2f9b74f8844db3a.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f2f9b74f8844db3a.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f2f9b74f8844db3a.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f2f9b74f8844db3a.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f2f9b74f8844db3a.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f2f9b74f8844db3a.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f2f9b74f8844db3a.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f2f9b74f8844db3a.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f2f9b74f8844db3a.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f2f9b74f8844db3a.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f2f9b74f8844db3a.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f2f9b74f8844db3a.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f2f9b74f8844db3a.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f2f9b74f8844db3a.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f2f9b74f8844db3a.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f2f9b74f8844db3a.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-f2f9b74f8844db3a.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f2f9b74f8844db3a.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f2f9b74f8844db3a.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/v1/route-f2f9b74f8844db3a.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-f2f9b74f8844db3a.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-f2f9b74f8844db3a.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-f2f9b74f8844db3a.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-f2f9b74f8844db3a.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-f2f9b74f8844db3a.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f2f9b74f8844db3a.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f2f9b74f8844db3a.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f2f9b74f8844db3a.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/version/route-f2f9b74f8844db3a.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f2f9b74f8844db3a.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/version/update/route-f2f9b74f8844db3a.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/landing/page-3c92a951f3cc5eee.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f2f9b74f8844db3a.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/page-f2f9b74f8844db3a.js +1 -0
  791. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f2f9b74f8844db3a.js +1 -0
  792. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f2f9b74f8844db3a.js +1 -0
  793. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f2f9b74f8844db3a.js +1 -0
  794. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f2f9b74f8844db3a.js +1 -0
  795. package/app/.next-cli-build/static/css/246bebea1dda73a2.css +1 -0
  796. package/app/package.json +1 -1
  797. package/app/public/i18n/changelog/en.md +15 -0
  798. package/app/public/i18n/changelog/zh-CN.md +15 -0
  799. package/app/public/i18n/changelog/zh-TW.md +15 -0
  800. package/app/public/i18n/literals/zh-CN.json +1755 -1699
  801. package/app/public/i18n/literals/zh-TW.json +578 -537
  802. package/app/public/providers/siliconflow-cn.png +0 -0
  803. package/app/src/lib/oauth/xiaomiIdentity.js +41 -0
  804. package/package.json +1 -1
  805. package/app/.next-cli-build/server/chunks/3879.js +0 -1
  806. package/app/.next-cli-build/server/chunks/3901.js +0 -1
  807. package/app/.next-cli-build/server/chunks/4049.js +0 -1
  808. package/app/.next-cli-build/server/chunks/4840.js +0 -1
  809. package/app/.next-cli-build/server/chunks/5612.js +0 -1
  810. package/app/.next-cli-build/server/chunks/937.js +0 -1
  811. package/app/.next-cli-build/server/chunks/9679.js +0 -1
  812. package/app/.next-cli-build/static/ZVF_AsRusUqo_O-OyJWPo/_buildManifest.js +0 -1
  813. package/app/.next-cli-build/static/chunks/1321-ad1ba3dfb4f417dd.js +0 -1
  814. package/app/.next-cli-build/static/chunks/5497-8b67dd598415a05b.js +0 -7
  815. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-d8fb1a26657cc67f.js +0 -1
  816. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f9d2dd98fde8ba67.js +0 -14
  817. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-1ce31613b04ec926.js +0 -1
  818. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-a442053054654766.js +0 -1
  819. package/app/.next-cli-build/static/chunks/app/_global-error/page-73a852c9be713797.js +0 -1
  820. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-73a852c9be713797.js +0 -1
  821. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-73a852c9be713797.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-73a852c9be713797.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-73a852c9be713797.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-73a852c9be713797.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-73a852c9be713797.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-73a852c9be713797.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-73a852c9be713797.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-73a852c9be713797.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-73a852c9be713797.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-73a852c9be713797.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-73a852c9be713797.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-73a852c9be713797.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-73a852c9be713797.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-73a852c9be713797.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-73a852c9be713797.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-73a852c9be713797.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-73a852c9be713797.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-73a852c9be713797.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-73a852c9be713797.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-73a852c9be713797.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-73a852c9be713797.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-73a852c9be713797.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-73a852c9be713797.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-73a852c9be713797.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-73a852c9be713797.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-73a852c9be713797.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-73a852c9be713797.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-73a852c9be713797.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-73a852c9be713797.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-73a852c9be713797.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-73a852c9be713797.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/combos/route-73a852c9be713797.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-73a852c9be713797.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-73a852c9be713797.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-73a852c9be713797.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-73a852c9be713797.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-73a852c9be713797.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-73a852c9be713797.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/health/route-73a852c9be713797.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/init/route-73a852c9be713797.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-73a852c9be713797.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-73a852c9be713797.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/keys/route-73a852c9be713797.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/locale/route-73a852c9be713797.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-73a852c9be713797.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-73a852c9be713797.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-73a852c9be713797.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-73a852c9be713797.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-73a852c9be713797.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-73a852c9be713797.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-73a852c9be713797.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-73a852c9be713797.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-73a852c9be713797.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-73a852c9be713797.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-73a852c9be713797.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-73a852c9be713797.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/models/route-73a852c9be713797.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/models/test/route-73a852c9be713797.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-73a852c9be713797.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-73a852c9be713797.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-73a852c9be713797.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-73a852c9be713797.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-73a852c9be713797.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-73a852c9be713797.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-73a852c9be713797.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-73a852c9be713797.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-73a852c9be713797.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-73a852c9be713797.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-73a852c9be713797.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-73a852c9be713797.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-73a852c9be713797.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-73a852c9be713797.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-73a852c9be713797.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-73a852c9be713797.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-73a852c9be713797.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-73a852c9be713797.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-73a852c9be713797.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-73a852c9be713797.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/pricing/route-73a852c9be713797.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-73a852c9be713797.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-73a852c9be713797.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-73a852c9be713797.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-73a852c9be713797.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-73a852c9be713797.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-73a852c9be713797.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-73a852c9be713797.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-73a852c9be713797.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-73a852c9be713797.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/providers/route-73a852c9be713797.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-73a852c9be713797.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-73a852c9be713797.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-73a852c9be713797.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-73a852c9be713797.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-73a852c9be713797.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-73a852c9be713797.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-73a852c9be713797.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-73a852c9be713797.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-73a852c9be713797.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-73a852c9be713797.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-73a852c9be713797.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-73a852c9be713797.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-73a852c9be713797.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-73a852c9be713797.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-73a852c9be713797.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-73a852c9be713797.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-73a852c9be713797.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-73a852c9be713797.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-73a852c9be713797.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-73a852c9be713797.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-73a852c9be713797.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/settings/route-73a852c9be713797.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-73a852c9be713797.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/tags/route-73a852c9be713797.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-73a852c9be713797.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-73a852c9be713797.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-73a852c9be713797.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-73a852c9be713797.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-73a852c9be713797.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-73a852c9be713797.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-73a852c9be713797.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-73a852c9be713797.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-73a852c9be713797.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-73a852c9be713797.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-73a852c9be713797.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-73a852c9be713797.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-73a852c9be713797.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-73a852c9be713797.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-73a852c9be713797.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-73a852c9be713797.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-73a852c9be713797.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-73a852c9be713797.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-73a852c9be713797.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-73a852c9be713797.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-73a852c9be713797.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-73a852c9be713797.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-73a852c9be713797.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-73a852c9be713797.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-73a852c9be713797.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-73a852c9be713797.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-73a852c9be713797.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-73a852c9be713797.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-73a852c9be713797.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-73a852c9be713797.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-73a852c9be713797.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-73a852c9be713797.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-73a852c9be713797.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-73a852c9be713797.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-73a852c9be713797.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-73a852c9be713797.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-73a852c9be713797.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/v1/route-73a852c9be713797.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-73a852c9be713797.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-73a852c9be713797.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-73a852c9be713797.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-73a852c9be713797.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-73a852c9be713797.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-73a852c9be713797.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-73a852c9be713797.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-73a852c9be713797.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/version/route-73a852c9be713797.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-73a852c9be713797.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/version/update/route-73a852c9be713797.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/landing/page-da7215e0796dbf9b.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-73a852c9be713797.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/page-73a852c9be713797.js +0 -1
  986. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-73a852c9be713797.js +0 -1
  987. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-73a852c9be713797.js +0 -1
  988. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-73a852c9be713797.js +0 -1
  989. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-73a852c9be713797.js +0 -1
  990. package/app/.next-cli-build/static/css/adecbbef384db8e1.css +0 -1
  991. package/app/public/providers/gorouter.svg +0 -1
  992. package/app/public/providers/tabiauto.svg +0 -1
  993. /package/app/.next-cli-build/static/{ZVF_AsRusUqo_O-OyJWPo → 0UB55QZoHsERFCcuezqF6}/_ssgManifest.js +0 -0
@@ -1,14 +1,14 @@
1
- (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={643:a=>{"use strict";a.exports=require("node:perf_hooks")},924:(a,b,c)=>{"use strict";function d(a,b=Date.now()){let c=function(a){let b=a?.promoFreeUntil;if("string"!=typeof b||""===b.trim())return null;let c=Date.parse(b);return Number.isFinite(c)?c:null}(a);return null!==c&&b<c}c.d(b,{s:()=>d})},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},7066:a=>{"use strict";a.exports=require("node:tty")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},9422:(a,b,c)=>{Promise.resolve().then(c.bind(c,83380))},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},18753:(a,b,c)=>{"use strict";function d({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:e=[],type:f="llm",includeLegacyAliases:g=!0}){let h=new Set(e.map(a=>a.id)),i=new Set,j=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(f&&a!==f||h.has(b.id))continue;let d=`${c}/${b.id}`;i.has(d)||(i.add(d),j.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a,enabled:!1!==b.enabled,...void 0===b.vision?{}:{vision:b.vision},...void 0===b.reasoning?{}:{reasoning:b.reasoning},...void 0===b.contextWindow?{}:{contextWindow:b.contextWindow},...void 0===b.maxOutput?{}:{maxOutput:b.maxOutput}}))}if(!g)return j;let k=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(k))continue;let b=c.slice(k.length);!b||h.has(b)||i.has(c)||(i.add(c),j.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:f||"llm"}))}return j}c.d(b,{R:()=>d})},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20773:(a,b,c)=>{"use strict";c.d(b,{A:()=>g});var d=c(48249),e=c(67484),f=c(49885);function g({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}g.propTypes={until:c.n(f)().string.isRequired}},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},34714:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>x,handler:()=>z,routeModule:()=>y});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,57529))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,93110))),"F:\\Files\\GitHub Files\\10router\\src\\app\\(dashboard)\\dashboard\\providers\\[id]\\page.js"]}]},{"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"F:\\Files\\GitHub Files\\10router\\src\\app\\(dashboard)\\layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"F:\\Files\\GitHub Files\\10router\\src\\app\\layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,w=(0,e.H)({tree:v,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),x=w.__next_app__,y=w.routeModule,z=w.handler},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38331:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>p});var e=c(48249),f=c(67484),g=c(74875),h=c(99258),i=c(73813),j=c(50377),k=c(49885),l=c.n(k),m=c(94579),n=c(20773),o=a([m]);function p({connection:a,proxyPools:b,isOAuth:c,isFirst:d,isLast:k,onMoveUp:l,onMoveDown:o,onToggleActive:q,onUpdateProxy:r,onEdit:s,onDelete:t,oneByOneStatus:u=null,autoPing:v=null}){let[w,x]=(0,f.useState)(!1),[y,z]=(0,f.useState)(!1),A=(0,f.useRef)(null),B=new Map((b||[]).map(a=>[a.id,a])),C=a.providerSpecificData?.proxyPoolId||null,D=C?B.get(C):null,E=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,F=!!C||E,G=D?`Pool: ${D.name}`:C?`Pool: ${C} (inactive/missing)`:E?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",H=v?.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.",I="";if(D?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=D?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);I=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{I=b}}let J=D?.noProxy||a.providerSpecificData?.connectionNoProxy||"",K="default";D?.isActive===!0?K="success":(C||E)&&(K="error");let L=async a=>{z(!0);try{await r("__none__"===a?null:a)}finally{z(!1),x(!1)}},M=a.authType||(c?"oauth":"apikey"),N="oauth"===M,O="cookie"===M,P=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(N?"OAuth Account":O?"Cookie Account":"API Key"),Q=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[R,S]=(0,f.useState)(!1),T=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,U="unavailable"!==a.testStatus||R?a.testStatus:"active",V=!1!==a.isActive?(0,i.O)(a.lastError):null,{copied:W,copy:X}=(0,j.C)(),Y=()=>u?"queued"===u.state?(0,h.Tl)("queued"):"testing"===u.state?(0,h.Tl)("testing"):"success"===u.state?(0,h.Tl)("success"):"failed"===u.state?u.error?`${(0,h.Tl)("failed")}: ${u.error}`:(0,h.Tl)("failed"):null:null;return(0,e.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===a.isActive?"opacity-60":""}`,children:[(0,e.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,e.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,e.jsx)("button",{onClick:l,disabled:d,className:`p-0.5 rounded ${d?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,e.jsx)("button",{onClick:o,disabled:k,className:`p-0.5 rounded ${k?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,e.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:O?"cookie":N?"lock":"key"}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("p",{className:"text-sm font-medium truncate",children:P}),Q&&(0,e.jsx)("p",{className:"text-xs text-text-muted truncate",children:Q}),(0,e.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,e.jsx)(m.Ex,{variant:(0,g.g)(a.isActive,U),size:"sm",dot:!0,children:!1===a.isActive?(0,h.Tl)("disabled"):U||(0,h.Tl)("Unknown")}),(0,e.jsx)(m.Ex,{variant:"default",size:"sm",children:N?"OAuth":O?"Cookie":"API Key"}),F&&(0,e.jsx)(m.Ex,{variant:K,size:"sm",children:"Proxy"}),a.earliestPackageExpiry&&(0,e.jsxs)(m.Ex,{variant:"outline",size:"sm",title:`${(0,h.Tl)("Earliest package")}: ${a.earliestPackageName||(0,h.Tl)("Quota package")} (${new Date(a.earliestPackageExpiry).toLocaleString()})`,children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-[12px] mr-1",children:"schedule"}),function(a){if(!a)return"";let b=new Date(a).getTime()-Date.now();if(b<=0)return(0,h.Tl)("expired");let c=Math.floor(b/36e5);if(c<24)return`${c}h`;let d=Math.floor(c/24);return d<30?`${d}d`:new Date(a).toLocaleDateString()}(a.earliestPackageExpiry)]}),R&&!1!==a.isActive&&(0,e.jsx)(n.A,{until:T}),a.lastError&&!1!==a.isActive&&(0,e.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),V&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("a",{href:V,target:"_blank",rel:"noopener noreferrer",title:(0,h.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"shrink-0 text-xs text-blue-500 underline hover:text-blue-400",children:(0,h.Tl)("Verify your account")}),(0,e.jsx)("button",{type:"button",onClick:()=>X(V,"verification"),title:(0,h.Tl)("Copy link"),className:"shrink-0 text-xs text-text-muted hover:text-primary",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm align-middle",children:"verification"===W?"check":"content_copy"})})]}),(0,e.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,e.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),Y()&&(0,e.jsx)(m.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:Y()})]}),F&&(0,e.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,e.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:G,children:G}),I&&(0,e.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:I}),J&&(0,e.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:J,children:["no_proxy: ",J]})]})]})]}),(0,e.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,e.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,e.jsxs)("div",{className:"relative",ref:A,children:[(0,e.jsxs)("button",{onClick:()=>x(a=>!a),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${F?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,e.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),w&&(0,e.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,e.jsx)("button",{onClick:()=>L("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!C?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,e.jsx)("button",{onClick:()=>L(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${C===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),v&&(0,e.jsx)(m.m_,{text:H,children:(0,e.jsxs)("button",{onClick:()=>v.onToggle(!v.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 ${v.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,e.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,e.jsxs)("button",{onClick:s,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,e.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,e.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,e.jsxs)("button",{onClick:t,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,e.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,e.jsx)(m.lM,{size:"sm",checked:a.isActive??!0,onChange:q,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}m=(o.then?(await o)():o)[0],p.propTypes={connection:l().shape({id:l().string,name:l().string,email:l().string,displayName:l().string,modelLockUntil:l().string,testStatus:l().string,isActive:l().bool,lastError:l().string,priority:l().number,globalPriority:l().number}).isRequired,proxyPools:l().arrayOf(l().shape({id:l().string,name:l().string,proxyUrl:l().string,noProxy:l().string,isActive:l().bool})),isOAuth:l().bool.isRequired,isFirst:l().bool.isRequired,isLast:l().bool.isRequired,onMoveUp:l().func.isRequired,onMoveDown:l().func.isRequired,onToggleActive:l().func.isRequired,onUpdateProxy:l().func,onEdit:l().func.isRequired,onDelete:l().func.isRequired,oneByOneStatus:l().shape({state:l().string,error:l().string}),autoPing:l().shape({on:l().bool,onToggle:l().func,provider:l().string})},d()}catch(a){d(a)}})},38522:a=>{"use strict";a.exports=require("node:zlib")},39968:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>k});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=a([i]);function k({isOpen:a,node:b,onSave:c,onClose:d,isAnthropic:g}){let[h,j]=(0,f.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[l,m]=(0,f.useState)(!1),[n,o]=(0,f.useState)(""),[p,q]=(0,f.useState)(""),[r,s]=(0,f.useState)(!1),[t,u]=(0,f.useState)(null),v=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){m(!0);try{let a={name:h.name,prefix:h.prefix,baseUrl:h.baseUrl};g||(a.apiType=h.apiType),await c(a)}finally{m(!1)}}},w=async()=>{s(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:n,type:g?"anthropic-compatible":"openai-compatible",modelId:p.trim()||void 0})}),b=await a.json();u(b.valid?"success":"failed")}catch{u("failed")}finally{s(!1)}};return b?(0,e.jsx)(i.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:d,children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsx)(i.pd,{label:"Name",value:h.name,onChange:a=>j({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,e.jsx)(i.pd,{label:"Prefix",value:h.prefix,onChange:a=>j({...h,prefix:a.target.value}),placeholder:g?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!g&&(0,e.jsx)(i.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>j({...h,apiType:a.target.value})}),(0,e.jsx)(i.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>j({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.pd,{label:"API Key (for Check)",type:"password",value:n,onChange:a=>o(a.target.value),className:"flex-1"}),(0,e.jsx)("div",{className:"pt-6",children:(0,e.jsx)(i.$n,{onClick:w,disabled:!n||r||!h.baseUrl.trim(),variant:"secondary",children:r?"Checking...":"Check"})})]}),(0,e.jsx)(i.pd,{label:"Model ID (optional)",value:p,onChange:a=>q(a.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),t&&(0,e.jsx)(i.Ex,{variant:"success"===t?"success":"error",children:"success"===t?"Valid":"Invalid"}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||l,children:l?"Saving...":"Save"}),(0,e.jsx)(i.$n,{onClick:d,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}i=(j.then?(await j)():j)[0],k.propTypes={isOpen:h().bool.isRequired,node:h().shape({id:h().string,name:h().string,prefix:h().string,apiType:h().string,baseUrl:h().string}),onSave:h().func.isRequired,onClose:h().func.isRequired,isAnthropic:h().bool},d()}catch(a){d(a)}})},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},42076:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>n});var e=c(48249),f=c(49885),g=c.n(f),h=c(67484),i=c(94579),j=c(924),k=c(94317),l=c(99258),m=a([i]);function n({model:a,fullModel:b,alias:c,copied:d,onCopy:f,testStatus:g,isCustom:m,isFree:o,onDeleteAlias:p,onTest:q,isTesting:r,onDisable:s,onEnable:t,caps:u,thinkingSuffix:v}){let w=function(){let[a,b]=(0,h.useState)(()=>new Date().getHours());return a}(),x=v?`${b}(${v})`:b,y="number"==typeof a.rateMultiplier?a.rateMultiplier:null,z=(0,k.X)(w,a.nightFree),A=null!==y&&y>0&&(0,j.s)(a),B=A?0:y,C=z||0===B,D="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,e.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,e.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,e.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:D?{color:D}:void 0,children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,e.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,e.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:x}),(0,e.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,e.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,e.jsx)(i.nh,{caps:u,colorOverride:"text-text-muted/70",size:12}),(null!==B||z)&&(0,e.jsx)(i.m_,{text:z?`${(0,l.Tl)("Night-free window")} (23:00–08:00) — ${(0,l.Tl)("rides the free quota")}`:A?(0,l.Tl)("Credit multiplier")+`: ${y}x — `+(0,l.Tl)("promo free until")+` ${a.promoFreeUntil}`:0===B?(0,l.Tl)("Credit multiplier")+": 0x — "+(0,l.Tl)("rides the free quota"):(0,l.Tl)("Credit multiplier")+`: ${B}x`,children:(0,e.jsx)(i.Ex,{size:"sm",variant:C?"success":"default",className:`shrink-0 cursor-help leading-none${C?"":" font-mono"}`,children:C?"free":`${B.toFixed(2)}x`})})]})]}),q&&(0,e.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,e.jsx)("button",{onClick:q,disabled:r,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${r?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",style:r?{animation:"spin 1s linear infinite"}:void 0,children:r?"progress_activity":"science"})}),(0,e.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:r?"Testing...":"Test"})]}),(0,e.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,e.jsx)("button",{onClick:()=>f(x,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:d===`model-${a.id}`?"check":"content_copy"})}),(0,e.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:d===`model-${a.id}`?"Copied!":"Copy"})]}),m?(0,e.jsx)("button",{onClick:p,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,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):t?(0,e.jsx)("button",{onClick:t,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-green-500/10 hover:text-green-500",title:(0,l.Tl)("Enable this model"),children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"})}):s?(0,e.jsx)("button",{onClick:s,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,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}i=(m.then?(await m)():m)[0],n.propTypes={model:g().shape({id:g().string.isRequired,rateMultiplier:g().number,nightFree:g().shape({from:g().number,to:g().number})}).isRequired,fullModel:g().string.isRequired,alias:g().string,copied:g().string,onCopy:g().func.isRequired,testStatus:g().oneOf(["ok","error"]),isCustom:g().bool,isFree:g().bool,onDeleteAlias:g().func,onTest:g().func,isTesting:g().bool,onDisable:g().func,onEnable:g().func,caps:g().object,thinkingSuffix:g().string},d()}catch(a){d(a)}})},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},72022:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>l});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=c(99258),k=a([i]);function l({isOpen:a,mode:b,provider:c,providerName:d,dashboardPassword:g,onClose:h,onSuccess:k}){let[m,n]=(0,f.useState)(""),[o,p]=(0,f.useState)(""),[q,r]=(0,f.useState)(!1),[s,t]=(0,f.useState)(""),[u,v]=(0,f.useState)(null),[w,x]=(0,f.useState)(""),[y,z]=(0,f.useState)(null),A=(0,f.useRef)(null),B={"Content-Type":"application/json","x-9r-password":g||""},C=async()=>{if(t(""),m.length<4)return void t((0,j.Tl)("Passphrase must be at least 4 characters"));if(m!==o)return void t((0,j.Tl)("Passphrases do not match"));r(!0);try{let a=await fetch("/api/oauth/transfer/export",{method:"POST",headers:B,body:JSON.stringify({provider:c,passphrase:m})}),b=await a.json();if(!a.ok)throw Error(b?.error||`Request failed: ${a.status}`);let d=JSON.stringify(b.blob,null,2),e=URL.createObjectURL(new Blob([d],{type:"application/json"})),f=document.createElement("a");f.href=e,f.download=`oauth-${c}-transfer-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(f),f.click(),f.remove(),setTimeout(()=>URL.revokeObjectURL(e),1e3),v({exported:b.count})}catch(a){t(a.message||(0,j.Tl)("Export failed"))}finally{r(!1)}},D=async()=>{if(t(""),v(null),!y)return void t((0,j.Tl)("Pick a transfer file first"));if(!m)return void t((0,j.Tl)("Transfer passphrase required"));r(!0);try{let a=await fetch("/api/oauth/transfer/import",{method:"POST",headers:B,body:JSON.stringify({provider:c,passphrase:m,blob:y})}),b=await a.json();if(!a.ok){if(401===a.status&&/passphrase/i.test(b?.error||""))throw Error((0,j.Tl)("Wrong passphrase"));throw Error(b?.error||`Request failed: ${a.status}`)}v(b),"function"==typeof k&&k()}catch(a){t(a.message||(0,j.Tl)("Import failed"))}finally{r(!1)}};return(0,e.jsx)(i.aF,{isOpen:a,title:"export"===b?(0,j.Tl)("Export OAuth accounts"):(0,j.Tl)("Import OAuth accounts"),onClose:()=>{q||(n(""),p(""),r(!1),t(""),v(null),x(""),z(null),A.current&&(A.current.value=""),h())},children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,j.Tl)("Provider"),": ",(0,e.jsx)("span",{className:"font-medium text-text-main",children:d||c})]}),"export"===b?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.pd,{type:"password",label:(0,j.Tl)("Transfer passphrase"),value:m,onChange:a=>n(a.target.value),placeholder:"••••••••"}),(0,e.jsx)(i.pd,{type:"password",label:(0,j.Tl)("Confirm passphrase"),value:o,onChange:a=>p(a.target.value),placeholder:"••••••••"})]}),(0,e.jsx)("p",{className:"text-xs text-text-muted",children:(0,j.Tl)("The file is encrypted with this passphrase — it is required again at import, and cannot be recovered.")}),s&&(0,e.jsx)("p",{className:"text-xs text-red-500",children:s}),u&&(0,e.jsxs)("p",{className:"text-xs text-green-600",children:[(0,j.Tl)("Export complete")," — ",u.exported," ",(0,j.Tl)("accounts exported")]}),(0,e.jsx)(i.$n,{onClick:C,disabled:q,fullWidth:!0,children:(0,j.Tl)("Export encrypted file")})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i.pd,{label:(0,j.Tl)("Transfer file"),value:w,readOnly:!0,placeholder:(0,j.Tl)("Pick a transfer file first"),className:"cursor-pointer",onClick:()=>A.current?.click()}),(0,e.jsx)("input",{ref:A,type:"file",accept:".json,application/json",className:"hidden",onChange:a=>{let b=a.target.files?.[0];if(!b)return;x(b.name),t(""),v(null);let c=new FileReader;c.onload=()=>{try{let a=JSON.parse(String(c.result||""));if(a?.format!=="10router-oauth-secure-v1"){t((0,j.Tl)("Unrecognized transfer file (expected an encrypted OAuth transfer)")),z(null);return}z(a)}catch(a){t(`${(0,j.Tl)("Invalid JSON")}: ${a.message}`),z(null)}},c.onerror=()=>t((0,j.Tl)("Failed to read file")),c.readAsText(b)}}),(0,e.jsx)(i.pd,{type:"password",label:(0,j.Tl)("Transfer passphrase"),value:m,onChange:a=>n(a.target.value),placeholder:"••••••••"}),s&&(0,e.jsx)("p",{className:"text-xs text-red-500",children:s}),u&&(0,e.jsx)("div",{className:"text-xs text-text-muted",children:(0,e.jsxs)("p",{children:[(0,j.Tl)("Import complete"),": ",u.imported||0," ",(0,j.Tl)("imported"),", ",u.updated||0," ",(0,j.Tl)("updated"),(u.failed||0)>0?`, ${u.failed} ${(0,j.Tl)("failed")}`:""]})}),(0,e.jsx)(i.$n,{onClick:D,disabled:q,fullWidth:!0,children:(0,j.Tl)("Import connections")})]})]})})}i=(k.then?(await k)():k)[0],l.propTypes={isOpen:h().bool.isRequired,mode:h().oneOf(["export","import"]).isRequired,provider:h().string.isRequired,providerName:h().string,dashboardPassword:h().string,onClose:h().func.isRequired,onSuccess:h().func},d()}catch(a){d(a)}})},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},73813:(a,b,c)=>{"use strict";c.d(b,{O:()=>e});let d=/https:\/\/accounts\.google\.com\/signin\/continue[^\s"'<>)\]]+/;function e(a){if("string"!=typeof a)return null;let b=d.exec(a);return b?b[0]:null}},74075:a=>{"use strict";a.exports=require("zlib")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},74918:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},80445:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>k});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=a([i]);function k({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:d,onClose:g}){let[h,j]=(0,f.useState)(""),[l,m]=(0,f.useState)(null),[n,o]=(0,f.useState)(""),[p,q]=(0,f.useState)(!1),r=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},s=async()=>{let a=r(h.trim());if(a){m("testing"),o("");try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();m(d.ok?"ok":"error"),o(d.error||"")}catch(a){m("error"),o(a.message)}}},t=async()=>{let a=r(h.trim());if(a&&!p){q(!0);try{await d(a)}finally{q(!1)}}};return(0,e.jsx)(i.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)("input",{type:"text",value:h,onChange:a=>{j(a.target.value),m(null),o("")},onKeyDown:a=>{"Enter"===a.key&&s()},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,e.jsx)(i.$n,{variant:"secondary",icon:"science",loading:"testing"===l,onClick:s,disabled:!h.trim()||"testing"===l,children:"testing"===l?"Testing...":"Test"})]}),(0,e.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,e.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:r(h.trim())||"model-id"})]})]}),"ok"===l&&(0,e.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===l&&(0,e.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,e.jsx)("span",{children:n||"Model not reachable"})]}),(0,e.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,e.jsx)(i.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,e.jsx)(i.$n,{onClick:t,fullWidth:!0,size:"sm",disabled:!h.trim()||p,children:p?"Adding...":"Add Model"})]})]})})}i=(j.then?(await j)():j)[0],k.propTypes={isOpen:h().bool.isRequired,providerAlias:h().string.isRequired,providerDisplayAlias:h().string.isRequired,onSave:h().func.isRequired,onClose:h().func.isRequired},d()}catch(a){d(a)}})},81330:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>l});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=c(99258),k=a([i]);i=(k.then?(await k)():k)[0];let m=`[
1
+ (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={643:a=>{"use strict";a.exports=require("node:perf_hooks")},924:(a,b,c)=>{"use strict";function d(a,b=Date.now()){let c=function(a){let b=a?.promoFreeUntil;if("string"!=typeof b||""===b.trim())return null;let c=Date.parse(b);return Number.isFinite(c)?c:null}(a);return null!==c&&b<c}c.d(b,{s:()=>d})},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},7066:a=>{"use strict";a.exports=require("node:tty")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},9422:(a,b,c)=>{Promise.resolve().then(c.bind(c,83380))},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},18753:(a,b,c)=>{"use strict";function d({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:e=[],type:f="llm",includeLegacyAliases:g=!0}){let h=new Set(e.map(a=>a.id)),i=new Set,j=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(f&&a!==f||h.has(b.id))continue;let d=`${c}/${b.id}`;i.has(d)||(i.add(d),j.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a,enabled:!1!==b.enabled,...void 0===b.vision?{}:{vision:b.vision},...void 0===b.reasoning?{}:{reasoning:b.reasoning},...void 0===b.contextWindow?{}:{contextWindow:b.contextWindow},...void 0===b.maxOutput?{}:{maxOutput:b.maxOutput}}))}if(!g)return j;let k=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(k))continue;let b=c.slice(k.length);!b||h.has(b)||i.has(c)||(i.add(c),j.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:f||"llm"}))}return j}c.d(b,{R:()=>d})},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20773:(a,b,c)=>{"use strict";c.d(b,{A:()=>h});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f);function h({until:a,inline:b=!1}){let[c,f]=(0,e.useState)("");return c?b?(0,d.jsxs)("span",{className:"shrink-0 text-xs text-orange-500 font-mono",children:[(0,d.jsx)("span",{className:"text-[0.85em] leading-none",children:"⏱"})," ",c]}):(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:[(0,d.jsx)("span",{className:"text-[0.85em] leading-none",children:"⏱"})," ",c]}):null}h.propTypes={until:g().string.isRequired,inline:g().bool}},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38331:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>q});var e=c(48249),f=c(67484),g=c(74875),h=c(99258),i=c(73813),j=c(51543),k=c(50377),l=c(49885),m=c.n(l),n=c(94579),o=c(20773),p=a([n]);function q({connection:a,proxyPools:b,isOAuth:c,isFirst:d,isLast:l,onMoveUp:m,onMoveDown:p,onToggleActive:r,onUpdateProxy:s,onEdit:t,onDelete:u,oneByOneStatus:v=null,autoPing:w=null}){let[x,y]=(0,f.useState)(!1),[z,A]=(0,f.useState)(!1),B=(0,f.useRef)(null),C=new Map((b||[]).map(a=>[a.id,a])),D=a.providerSpecificData?.proxyPoolId||null,E=D?C.get(D):null,F=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,G=!!D||F,H=E?`Pool: ${E.name}`:D?`Pool: ${D} (inactive/missing)`:F?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",I=w?.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.",J="";if(E?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=E?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);J=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{J=b}}let K=E?.noProxy||a.providerSpecificData?.connectionNoProxy||"",L="default";E?.isActive===!0?L="success":(D||F)&&(L="error");let M=async a=>{A(!0);try{await s("__none__"===a?null:a)}finally{A(!1),y(!1)}},N=a.authType||(c?"oauth":"apikey"),O="oauth"===N,P="cookie"===N,Q=a.providerSpecificData?.authMethod,R="string"==typeof a.accessToken?a.accessToken:"",S=a.hasDesktopSession??!!a.providerSpecificData?.mimoPassToken,T=a.hasAccessToken??(R.length>0&&!R.startsWith("mimo-desktop-session")),U="desktop-session"===Q||S&&!T,V=S&&T,W=!V&&!U&&"oauth"===Q,X=U||V?(0,h.Tl)("Desktop Session"):W?(0,h.Tl)("Browser sign-in"):O?"OAuth":P?"Cookie":"API Key",Y=V?(0,h.Tl)("Browser sign-in"):null,Z=a.providerSpecificData?.mimoUserId||a.providerSpecificData?.uid||null,$=("xiaomi-mimo"===a.provider||"xiaomi-tokenplan"===a.provider)&&Z?`MiMo ${Z}`:null,_=a.name?.trim()||$||a.email?.trim()||a.displayName?.trim()||(O?"OAuth Account":P?"Cookie Account":"API Key"),aa=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()||$&&a.email?.trim()&&a.email.trim()!==$?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[ab,ac]=(0,f.useState)(!1),ad=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,ae="unavailable"!==a.testStatus||ab?a.testStatus:"active",af=!1!==a.isActive?(0,i.O)(a.lastError):null,{copied:ag,copy:ah}=(0,k.C)(),ai=()=>v?"queued"===v.state?(0,h.Tl)("queued"):"testing"===v.state?(0,h.Tl)("testing"):"success"===v.state?(0,h.Tl)("success"):"failed"===v.state?v.error?`${(0,h.Tl)("failed")}: ${v.error}`:(0,h.Tl)("failed"):null:null;return(0,e.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===a.isActive?"opacity-60":""}`,children:[(0,e.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,e.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,e.jsx)("button",{onClick:m,disabled:d,className:`p-0.5 rounded ${d?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,e.jsx)("button",{onClick:p,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,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,e.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:S?"computer":W?"login":P?"cookie":O?"lock":"key"}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("p",{className:"text-sm font-medium truncate",children:_}),aa&&(0,e.jsx)("p",{className:"text-xs text-text-muted truncate",children:aa}),(0,e.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,e.jsx)(n.Ex,{variant:(0,g.g)(a.isActive,ae),size:"sm",dot:!0,children:!1===a.isActive?(0,h.Tl)("disabled"):ae||(0,h.Tl)("Unknown")}),(0,e.jsx)(n.Ex,{variant:"default",size:"sm",children:X}),Y&&(0,e.jsx)(n.Ex,{variant:"default",size:"sm",children:Y}),G&&(0,e.jsx)(n.Ex,{variant:L,size:"sm",children:"Proxy"}),a.earliestPackageExpiry&&(0,e.jsxs)(n.Ex,{variant:"outline",size:"sm",title:`${(0,h.Tl)("Earliest package")}: ${a.earliestPackageName||(0,h.Tl)("Quota package")} (${new Date(a.earliestPackageExpiry).toLocaleString()})`,children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-[12px] mr-1",children:"schedule"}),function(a){if(!a)return"";let b=new Date(a).getTime()-Date.now();if(b<=0)return(0,h.Tl)("expired");let c=Math.floor(b/36e5);if(c<24)return`${c}h`;let d=Math.floor(c/24);return d<30?`${d}d`:new Date(a).toLocaleDateString()}(a.earliestPackageExpiry)]}),ab&&!1!==a.isActive&&!a.lastError&&(0,e.jsx)(o.A,{until:ad}),a.lastError&&!1!==a.isActive&&(0,e.jsxs)("span",{className:"inline-flex items-center gap-1 max-w-full truncate text-xs text-red-500 sm:max-w-[380px]",title:(0,j.DY)(a.lastError),children:[ab&&(0,e.jsx)(o.A,{until:ad,inline:!0}),(0,j.DY)(a.lastError)]}),af&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("a",{href:af,target:"_blank",rel:"noopener noreferrer",title:(0,h.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"shrink-0 text-xs text-blue-500 underline hover:text-blue-400",children:(0,h.Tl)("Verify your account")}),(0,e.jsx)("button",{type:"button",onClick:()=>ah(af,"verification"),title:(0,h.Tl)("Copy link"),className:"shrink-0 text-xs text-text-muted hover:text-primary",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm align-middle",children:"verification"===ag?"check":"content_copy"})})]}),(0,e.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,e.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),ai()&&(0,e.jsx)(n.Ex,{variant:v?"success"===v.state?"success":"failed"===v.state?"error":"testing"===v.state?"primary":"default":"default",size:"sm",children:ai()})]}),G&&(0,e.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,e.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:H,children:H}),J&&(0,e.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:J}),K&&(0,e.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:K,children:["no_proxy: ",K]})]})]})]}),(0,e.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,e.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,e.jsxs)("div",{className:"relative",ref:B,children:[(0,e.jsxs)("button",{onClick:()=>y(a=>!a),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${G?"text-primary":"text-text-muted hover:text-primary"}`,disabled:z,children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:z?"progress_activity":"lan"}),(0,e.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),x&&(0,e.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,e.jsx)("button",{onClick:()=>M("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!D?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,e.jsx)("button",{onClick:()=>M(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${D===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),w&&(0,e.jsx)(n.m_,{text:I,children:(0,e.jsxs)("button",{onClick:()=>w.onToggle(!w.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 ${w.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,e.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,e.jsxs)("button",{onClick:t,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,e.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,e.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,e.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,e.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,e.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,e.jsx)(n.lM,{size:"sm",checked:a.isActive??!0,onChange:r,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}n=(p.then?(await p)():p)[0],q.propTypes={connection:m().shape({id:m().string,name:m().string,email:m().string,displayName:m().string,modelLockUntil:m().string,testStatus:m().string,isActive:m().bool,lastError:m().string,priority:m().number,globalPriority:m().number}).isRequired,proxyPools:m().arrayOf(m().shape({id:m().string,name:m().string,proxyUrl:m().string,noProxy:m().string,isActive:m().bool})),isOAuth:m().bool.isRequired,isFirst:m().bool.isRequired,isLast:m().bool.isRequired,onMoveUp:m().func.isRequired,onMoveDown:m().func.isRequired,onToggleActive:m().func.isRequired,onUpdateProxy:m().func,onEdit:m().func.isRequired,onDelete:m().func.isRequired,oneByOneStatus:m().shape({state:m().string,error:m().string}),autoPing:m().shape({on:m().bool,onToggle:m().func,provider:m().string})},d()}catch(a){d(a)}})},38522:a=>{"use strict";a.exports=require("node:zlib")},39968:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>k});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=a([i]);function k({isOpen:a,node:b,onSave:c,onClose:d,isAnthropic:g}){let[h,j]=(0,f.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[l,m]=(0,f.useState)(!1),[n,o]=(0,f.useState)(""),[p,q]=(0,f.useState)(""),[r,s]=(0,f.useState)(!1),[t,u]=(0,f.useState)(null),v=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){m(!0);try{let a={name:h.name,prefix:h.prefix,baseUrl:h.baseUrl};g||(a.apiType=h.apiType),await c(a)}finally{m(!1)}}},w=async()=>{s(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:n,type:g?"anthropic-compatible":"openai-compatible",modelId:p.trim()||void 0})}),b=await a.json();u(b.valid?"success":"failed")}catch{u("failed")}finally{s(!1)}};return b?(0,e.jsx)(i.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:d,children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsx)(i.pd,{label:"Name",value:h.name,onChange:a=>j({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,e.jsx)(i.pd,{label:"Prefix",value:h.prefix,onChange:a=>j({...h,prefix:a.target.value}),placeholder:g?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!g&&(0,e.jsx)(i.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>j({...h,apiType:a.target.value})}),(0,e.jsx)(i.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>j({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.pd,{label:"API Key (for Check)",type:"password",value:n,onChange:a=>o(a.target.value),className:"flex-1"}),(0,e.jsx)("div",{className:"pt-6",children:(0,e.jsx)(i.$n,{onClick:w,disabled:!n||r||!h.baseUrl.trim(),variant:"secondary",children:r?"Checking...":"Check"})})]}),(0,e.jsx)(i.pd,{label:"Model ID (optional)",value:p,onChange:a=>q(a.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),t&&(0,e.jsx)(i.Ex,{variant:"success"===t?"success":"error",children:"success"===t?"Valid":"Invalid"}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||l,children:l?"Saving...":"Save"}),(0,e.jsx)(i.$n,{onClick:d,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}i=(j.then?(await j)():j)[0],k.propTypes={isOpen:h().bool.isRequired,node:h().shape({id:h().string,name:h().string,prefix:h().string,apiType:h().string,baseUrl:h().string}),onSave:h().func.isRequired,onClose:h().func.isRequired,isAnthropic:h().bool},d()}catch(a){d(a)}})},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},42076:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>n});var e=c(48249),f=c(49885),g=c.n(f),h=c(67484),i=c(94579),j=c(924),k=c(94317),l=c(99258),m=a([i]);function n({model:a,fullModel:b,alias:c,copied:d,onCopy:f,testStatus:g,isCustom:m,isFree:o,onDeleteAlias:p,onTest:q,isTesting:r,onDisable:s,onEnable:t,caps:u,thinkingSuffix:v}){let w=function(){let[a,b]=(0,h.useState)(()=>new Date().getHours());return a}(),x=v?`${b}(${v})`:b,y="number"==typeof a.rateMultiplier?a.rateMultiplier:null,z=(0,k.X)(w,a.nightFree),A=null!==y&&y>0&&(0,j.s)(a),B=A?0:y,C=z||0===B,D="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,e.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,e.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,e.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:D?{color:D}:void 0,children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,e.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,e.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:x}),(0,e.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,e.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,e.jsx)(i.nh,{caps:u,colorOverride:"text-text-muted/70",size:12}),(null!==B||z)&&(0,e.jsx)(i.m_,{text:z?`${(0,l.Tl)("Night-free window")} (23:00–08:00) — ${(0,l.Tl)("rides the free quota")}`:A?(0,l.Tl)("Credit multiplier")+`: ${y}x — `+(0,l.Tl)("promo free until")+` ${a.promoFreeUntil}`:0===B?(0,l.Tl)("Credit multiplier")+": 0x — "+(0,l.Tl)("rides the free quota"):(0,l.Tl)("Credit multiplier")+`: ${B}x`,children:(0,e.jsx)(i.Ex,{size:"sm",variant:C?"success":"default",className:`shrink-0 cursor-help leading-none${C?"":" font-mono"}`,children:C?"free":`${B.toFixed(2)}x`})})]})]}),q&&(0,e.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,e.jsx)("button",{onClick:q,disabled:r,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${r?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",style:r?{animation:"spin 1s linear infinite"}:void 0,children:r?"progress_activity":"science"})}),(0,e.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:r?"Testing...":"Test"})]}),(0,e.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,e.jsx)("button",{onClick:()=>f(x,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:d===`model-${a.id}`?"check":"content_copy"})}),(0,e.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:d===`model-${a.id}`?"Copied!":"Copy"})]}),m?(0,e.jsx)("button",{onClick:p,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,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):t?(0,e.jsx)("button",{onClick:t,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-green-500/10 hover:text-green-500",title:(0,l.Tl)("Enable this model"),children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"})}):s?(0,e.jsx)("button",{onClick:s,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,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}i=(m.then?(await m)():m)[0],n.propTypes={model:g().shape({id:g().string.isRequired,rateMultiplier:g().number,nightFree:g().shape({from:g().number,to:g().number})}).isRequired,fullModel:g().string.isRequired,alias:g().string,copied:g().string,onCopy:g().func.isRequired,testStatus:g().oneOf(["ok","error"]),isCustom:g().bool,isFree:g().bool,onDeleteAlias:g().func,onTest:g().func,isTesting:g().bool,onDisable:g().func,onEnable:g().func,caps:g().object,thinkingSuffix:g().string},d()}catch(a){d(a)}})},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},51543:(a,b,c)=>{"use strict";c.d(b,{DY:()=>f});var d=c(99258);function e(a,b){return(0,d.Tl)(a).replace("{n}",String(b))}function f(a){if(!a||"string"!=typeof a)return a??"";let b=(0,d.Tl)(a);if(b&&b!==a)return b;if(/Individual quota reached|QUOTA_EXHAUSTED|RESOURCE_EXHAUSTED/i.test(a)){let b,c,f,g,h,i,j,k,{delay:l,timestamp:m}=(b=String(a||""),c=null,f=null,g=/"quotaResetDelay"\s*:\s*"([^"]+)"/.exec(b),h=/\bResets in\s+([0-9hms.]+)/i.exec(b),c=g&&g[1]||h&&h[1]||null,i=/"quotaResetTimeStamp"\s*:\s*"([^"]+)"/.exec(b),j=/"quotaResetTimeStamp"\s*:\s*(".*?"|\S+)/.exec(b),(f=i&&i[1]||j&&j[1]||null)&&(f=f.replace(/^"|"$/g,"")),{delay:c,timestamp:f}),n=function(a){if(!a)return"";let{h:b,m:c,s:d}=a;d>=60&&(c+=Math.floor(d/60),d%=60),c>=60&&(b+=Math.floor(c/60),c%=60);let f=[];return b>0&&f.push(e("{n}h",b)),c>0&&f.push(e("{n}m",c)),(d>0||0===f.length)&&f.push(e("{n}s",d)),f.join(" ")}((k=/^(?:(\d+(?:\.\d+)?)h)?(?:(\d+(?:\.\d+)?)m)?(?:(\d+(?:\.\d+)?)s)?$/i.exec(String(l||"").trim()))&&(k[1]||k[2]||k[3])?{h:Math.floor(parseFloat(k[1]||0)),m:Math.floor(parseFloat(k[2]||0)),s:Math.round(parseFloat(k[3]||0))}:null),o=m?function(a){let b=new Date(a);if(Number.isNaN(b.getTime()))return a||"";try{return b.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return b.toISOString()}}(m):"",p=(0,d.Tl)("Individual quota reached. Resets at {time} (in {duration}).");return(p=p.replace("{time}",o||(0,d.Tl)("shortly"))).replace("{duration}",n||(0,d.Tl)("a short while"))}return b}},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},72022:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>l});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=c(99258),k=a([i]);function l({isOpen:a,mode:b,provider:c,providerName:d,dashboardPassword:g,onClose:h,onSuccess:k}){let[m,n]=(0,f.useState)(""),[o,p]=(0,f.useState)(""),[q,r]=(0,f.useState)(!1),[s,t]=(0,f.useState)(""),[u,v]=(0,f.useState)(null),[w,x]=(0,f.useState)(""),[y,z]=(0,f.useState)(null),A=(0,f.useRef)(null),B={"Content-Type":"application/json","x-9r-password":g||""},C=async()=>{if(t(""),m.length<4)return void t((0,j.Tl)("Passphrase must be at least 4 characters"));if(m!==o)return void t((0,j.Tl)("Passphrases do not match"));r(!0);try{let a=await fetch("/api/oauth/transfer/export",{method:"POST",headers:B,body:JSON.stringify({provider:c,passphrase:m})}),b=await a.json();if(!a.ok)throw Error(b?.error||`Request failed: ${a.status}`);let d=JSON.stringify(b.blob,null,2),e=URL.createObjectURL(new Blob([d],{type:"application/json"})),f=document.createElement("a");f.href=e,f.download=`oauth-${c}-transfer-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(f),f.click(),f.remove(),setTimeout(()=>URL.revokeObjectURL(e),1e3),v({exported:b.count})}catch(a){t(a.message||(0,j.Tl)("Export failed"))}finally{r(!1)}},D=async()=>{if(t(""),v(null),!y)return void t((0,j.Tl)("Pick a transfer file first"));if(!m)return void t((0,j.Tl)("Transfer passphrase required"));r(!0);try{let a=await fetch("/api/oauth/transfer/import",{method:"POST",headers:B,body:JSON.stringify({provider:c,passphrase:m,blob:y})}),b=await a.json();if(!a.ok){if(401===a.status&&/passphrase/i.test(b?.error||""))throw Error((0,j.Tl)("Wrong passphrase"));throw Error(b?.error||`Request failed: ${a.status}`)}v(b),"function"==typeof k&&k()}catch(a){t(a.message||(0,j.Tl)("Import failed"))}finally{r(!1)}};return(0,e.jsx)(i.aF,{isOpen:a,title:"export"===b?(0,j.Tl)("Export OAuth accounts"):(0,j.Tl)("Import OAuth accounts"),onClose:()=>{q||(n(""),p(""),r(!1),t(""),v(null),x(""),z(null),A.current&&(A.current.value=""),h())},children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,j.Tl)("Provider"),": ",(0,e.jsx)("span",{className:"font-medium text-text-main",children:d||c})]}),"export"===b?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.pd,{type:"password",label:(0,j.Tl)("Transfer passphrase"),value:m,onChange:a=>n(a.target.value),placeholder:"••••••••"}),(0,e.jsx)(i.pd,{type:"password",label:(0,j.Tl)("Confirm passphrase"),value:o,onChange:a=>p(a.target.value),placeholder:"••••••••"})]}),(0,e.jsx)("p",{className:"text-xs text-text-muted",children:(0,j.Tl)("The file is encrypted with this passphrase — it is required again at import, and cannot be recovered.")}),s&&(0,e.jsx)("p",{className:"text-xs text-red-500",children:s}),u&&(0,e.jsxs)("p",{className:"text-xs text-green-600",children:[(0,j.Tl)("Export complete")," — ",u.exported," ",(0,j.Tl)("accounts exported")]}),(0,e.jsx)(i.$n,{onClick:C,disabled:q,fullWidth:!0,children:(0,j.Tl)("Export encrypted file")})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i.pd,{label:(0,j.Tl)("Transfer file"),value:w,readOnly:!0,placeholder:(0,j.Tl)("Pick a transfer file first"),className:"cursor-pointer",onClick:()=>A.current?.click()}),(0,e.jsx)("input",{ref:A,type:"file",accept:".json,application/json",className:"hidden",onChange:a=>{let b=a.target.files?.[0];if(!b)return;x(b.name),t(""),v(null);let c=new FileReader;c.onload=()=>{try{let a=JSON.parse(String(c.result||""));if(a?.format!=="10router-oauth-secure-v1"){t((0,j.Tl)("Unrecognized transfer file (expected an encrypted OAuth transfer)")),z(null);return}z(a)}catch(a){t(`${(0,j.Tl)("Invalid JSON")}: ${a.message}`),z(null)}},c.onerror=()=>t((0,j.Tl)("Failed to read file")),c.readAsText(b)}}),(0,e.jsx)(i.pd,{type:"password",label:(0,j.Tl)("Transfer passphrase"),value:m,onChange:a=>n(a.target.value),placeholder:"••••••••"}),s&&(0,e.jsx)("p",{className:"text-xs text-red-500",children:s}),u&&(0,e.jsx)("div",{className:"text-xs text-text-muted",children:(0,e.jsxs)("p",{children:[(0,j.Tl)("Import complete"),": ",u.imported||0," ",(0,j.Tl)("imported"),", ",u.updated||0," ",(0,j.Tl)("updated"),(u.failed||0)>0?`, ${u.failed} ${(0,j.Tl)("failed")}`:""]})}),(0,e.jsx)(i.$n,{onClick:D,disabled:q,fullWidth:!0,children:(0,j.Tl)("Import connections")})]})]})})}i=(k.then?(await k)():k)[0],l.propTypes={isOpen:h().bool.isRequired,mode:h().oneOf(["export","import"]).isRequired,provider:h().string.isRequired,providerName:h().string,dashboardPassword:h().string,onClose:h().func.isRequired,onSuccess:h().func},d()}catch(a){d(a)}})},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},73813:(a,b,c)=>{"use strict";c.d(b,{O:()=>e});let d=/https:\/\/accounts\.google\.com\/signin\/continue[^\s"'<>)\]]+/;function e(a){if("string"!=typeof a)return null;let b=d.exec(a);return b?b[0]:null}},74075:a=>{"use strict";a.exports=require("zlib")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},74918:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},80445:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>k});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=a([i]);function k({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:d,onClose:g}){let[h,j]=(0,f.useState)(""),[l,m]=(0,f.useState)(null),[n,o]=(0,f.useState)(""),[p,q]=(0,f.useState)(!1),r=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},s=async()=>{let a=r(h.trim());if(a){m("testing"),o("");try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();m(d.ok?"ok":"error"),o(d.error||"")}catch(a){m("error"),o(a.message)}}},t=async()=>{let a=r(h.trim());if(a&&!p){q(!0);try{await d(a)}finally{q(!1)}}};return(0,e.jsx)(i.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)("input",{type:"text",value:h,onChange:a=>{j(a.target.value),m(null),o("")},onKeyDown:a=>{"Enter"===a.key&&s()},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,e.jsx)(i.$n,{variant:"secondary",icon:"science",loading:"testing"===l,onClick:s,disabled:!h.trim()||"testing"===l,children:"testing"===l?"Testing...":"Test"})]}),(0,e.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,e.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:r(h.trim())||"model-id"})]})]}),"ok"===l&&(0,e.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===l&&(0,e.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,e.jsx)("span",{children:n||"Model not reachable"})]}),(0,e.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,e.jsx)(i.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,e.jsx)(i.$n,{onClick:t,fullWidth:!0,size:"sm",disabled:!h.trim()||p,children:p?"Adding...":"Add Model"})]})]})})}i=(j.then?(await j)():j)[0],k.propTypes={isOpen:h().bool.isRequired,providerAlias:h().string.isRequired,providerDisplayAlias:h().string.isRequired,onSave:h().func.isRequired,onClose:h().func.isRequired},d()}catch(a){d(a)}})},81330:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>l});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=c(99258),k=a([i]);i=(k.then?(await k)():k)[0];let m=`[
2
2
  {
3
3
  "accessToken": "eyJhbGc...",
4
4
  "refreshToken": "rt_...",
5
5
  "idToken": "eyJhbGc...",
6
6
  "email": "user@example.com"
7
7
  }
8
- ]`;function l({isOpen:a,onClose:b,onSuccess:c}){let[d,g]=(0,f.useState)(""),[h,k]=(0,f.useState)(!1),[n,o]=(0,f.useState)(""),[p,q]=(0,f.useState)(null),r=()=>{h||(g(""),o(""),q(null),b())},s=async()=>{var a;let b;o(""),q(null);let e=d.trim();if(!e)return;try{b=JSON.parse(e)}catch(a){o(`${(0,j.Tl)("Invalid JSON")}: ${a.message}`);return}let f=(a=b,Array.isArray(a)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null);if(!f||0===f.length)return void o((0,j.Tl)("No accounts found in input"));k(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:f})}),b=await a.json();if(!a.ok)return void o(b?.error||`Request failed: ${a.status}`);q(b),b.success>0&&"function"==typeof c&&c()}catch(a){o(a.message||(0,j.Tl)("Request failed"))}finally{k(!1)}},t=p?.results?.filter(a=>!a.ok)||[];return(0,e.jsx)(i.aF,{isOpen:a,title:(0,j.Tl)("Bulk Add Codex Accounts"),onClose:r,children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsx)("p",{className:"text-xs text-text-muted",children:(0,j.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,e.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:m,value:d,onChange:a=>g(a.target.value),disabled:h}),n&&(0,e.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),p&&(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,j.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,j.Tl)("failed")}`:""]}),t.length>0&&(0,e.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:t.map(a=>(0,e.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{onClick:s,fullWidth:!0,disabled:h||!d.trim(),children:h?(0,j.Tl)("Importing..."):(0,j.Tl)("Import All")}),(0,e.jsx)(i.$n,{onClick:r,variant:"ghost",fullWidth:!0,disabled:h,children:(0,j.Tl)("Close")})]})]})})}l.propTypes={isOpen:h().bool.isRequired,onClose:h().func.isRequired,onSuccess:h().func},d()}catch(a){d(a)}})},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},83380:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{default:()=>G});var e=c(48249),f=c(67484),g=c(19099),h=c(2116),i=c.n(h),j=c(81220),k=c(29225),l=c(94579),m=c(92592),n=c(91431),o=c(83919),p=c(50377),q=c(29476),r=c(99258),s=c(41371);c(93848);var t=c(18753),u=c(73813),v=c(42076),w=c(95296),x=c(98376),y=c(38331),z=c(86266),A=c(39968),B=c(80445),C=c(81330),D=c(99548),E=c(72022),F=a([l,v,w,x,y,z,A,B,C,D,E]);[l,v,w,x,y,z,A,B,C,D,E]=F.then?(await F)():F;let H={claude:"claudeAutoPing",codex:"codexAutoPing"};function G(){let a,b,c,d,h,w,F,G=(0,g.useParams)(),I=(0,g.useRouter)(),J=G.id,{getCaps:K}=(0,q.y)(),L=(0,s.i)(),[M,N]=(0,f.useState)([]),[O,P]=(0,f.useState)(!0),[Q,R]=(0,f.useState)(null),[S,T]=(0,f.useState)([]),[U,V]=(0,f.useState)(!1),[W,X]=(0,f.useState)(!1),[Y,Z]=(0,f.useState)(!1),[$,_]=(0,f.useState)(!1),[aa,ab]=(0,f.useState)(""),[ac,ad]=(0,f.useState)(!1),[ae,af]=(0,f.useState)(!1),[ag,ah]=(0,f.useState)(!1),[ai,aj]=(0,f.useState)(!1),[ak,al]=(0,f.useState)(!1),[am,an]=(0,f.useState)(null),[ao,ap]=(0,f.useState)({}),[aq,ar]=(0,f.useState)([]),[as,at]=(0,f.useState)(!1),[au,av]=(0,f.useState)(!1),[aw,ax]=(0,f.useState)(!1),[ay,az]=(0,f.useState)({open:!1,action:null,value:""}),[aA,aB]=(0,f.useState)(!1),[aC,aD]=(0,f.useState)(""),[aE,aF]=(0,f.useState)(""),[aG,aH]=(0,f.useState)(!1),[aI,aJ]=(0,f.useState)({}),[aK,aL]=(0,f.useState)(""),[aM,aN]=(0,f.useState)(()=>new Set),[aO,aP]=(0,f.useState)(!1),[aQ,aR]=(0,f.useState)([]),[aS,aT]=(0,f.useState)("__none__"),[aU,aV]=(0,f.useState)(!1),[aW,aX]=(0,f.useState)(null),[aY,aZ]=(0,f.useState)(""),[a$,a_]=(0,f.useState)(!1),[a0,a1]=(0,f.useState)("auto"),[a2,a3]=(0,f.useState)({enabled:!1,connections:{}}),[a4,a5]=(0,f.useState)([]),[a6,a7]=(0,f.useState)(!1),[a8,a9]=(0,f.useState)([]),[ba,bb]=(0,f.useState)([]),[bc,bd]=(0,f.useState)([]),[be,bf]=(0,f.useState)(null),[bg,bh]=(0,f.useState)(!1),[bi,bj]=(0,f.useState)(!1),[bk,bl]=(0,f.useState)(!1),[bm,bn]=(0,f.useState)(null),[bo,bp]=(0,f.useState)({}),[bq,br]=(0,f.useState)(null),bs=(0,f.useRef)(!1),[bt,bu]=(0,f.useState)(!1),{copied:bv,copy:bw}=(0,p.C)(),bx=()=>{"xiaomi-mimo"===J?X(!0):V(!0)},by=()=>{bL?bx():(ab(""),_(!0))},bz=()=>{ab(""),_(!0)},bA=()=>{bL?by():bz()},bB=async()=>{if(!aA){aB(!0),aD("");try{let a=await fetch("/api/auth/verify-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:ay.value})});if(!a.ok){let b=await a.json().catch(()=>({}));aD(b?.error||(0,r.Tl)("Invalid password"));return}let{action:b}=ay;az({open:!1,action:null,value:""}),"export"===b&&(bG(b),bE(!0))}catch(a){aD(a.message||(0,r.Tl)("Invalid password"))}finally{aB(!1)}}},bC=a=>{aF(""),az({open:!0,action:a,value:""})},[bD,bE]=(0,f.useState)(!1),[bF,bG]=(0,f.useState)("export"),bH=async()=>{ax(!0);try{let a=await fetch("/api/oauth/codebuddy-cn/checkin",{method:"POST",cache:"no-store"}),b=await a.json();if(!a.ok)throw Error(b?.error||`Request failed: ${a.status}`);let c=Array.isArray(b?.results)?b.results:[];if(0===c.length)return void L.warning((0,r.Tl)("No CodeBuddy CN connections to check in"));let d=c.filter(a=>"checked-in"===a.status).length,e=c.filter(a=>"already"===a.status).length,f=c.filter(a=>"failed"===a.status).length;0===f?L.success(`${(0,r.Tl)("Check-in complete")}: ${d} ${(0,r.Tl)("checked-in")}, ${e} ${(0,r.Tl)("already checked in")}`):L.error(`${(0,r.Tl)("Check-in complete with errors")}: ${f} ${(0,r.Tl)("failed")}`)}catch(a){L.error((0,r.Tl)("Check-in failed")+": "+a.message)}finally{ax(!1)}},bI=()=>(0,e.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:(0,e.jsx)(l.$n,{size:"sm",icon:"calendar_today",onClick:bH,disabled:aw,className:"w-full sm:w-auto",title:(0,r.Tl)("CodeBuddy CN auto-checks in daily (retries all day until confirmed)"),children:aw?(0,r.Tl)("Checking in..."):(0,r.Tl)("Check in now")})}),bJ=Q?{id:Q.id,name:Q.name||("anthropic-compatible"===Q.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===Q.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===Q.type?"AC":"OC",apiType:Q.apiType,baseUrl:Q.baseUrl,type:Q.type}:m.zN[J]||m.fg[J]||m.IS[J]||m.nJ[J]||m.br[J],bK=bJ?.authModes||[],bL=!!m.zN[J]||!!m.IS[J]||bK.includes("oauth"),bM=!!m.fg[J]||bK.includes("apikey"),bN=!!m.IS[J]?.noAuth,bO="codebuddy-cn"===J,bP=bL&&bJ?.authModes?.includes("oauth")&&as,bQ=bO&&au,bR=(0,n.KC)(J),bS="cursor"===J&&a8.length>0?a8:bR,bT=(0,m.wG)(J),bU=(0,m.mq)(J),bV=(0,m.gb)(J),bW=bU||bV,bX=!bW&&bL&&bM,bY="xai"===J?"Grok Build OAuth":"grok-cli"===J?"Grok CLI Device Login":"kimi"===J?"Kimi Coding OAuth":"OAuth",bZ="xai"===J?"xAI API Key":"kimi"===J?"Kimi API Key":"qoder"===J?"PAT":"API Key",b$=a=>{if(!a0||"auto"===a0)return null;let b=(0,o.k)(J,a);return b&&b.includes(a0)?a0:null},b_=bW?J:bT,b0=(()=>{let a=new Set,b=new Set,c=c=>{if(!c||b.has(c))return;b.add(c);let d=(0,o.k)(J,c);d&&d.forEach(b=>{"none"!==b&&a.add(b)})};for(let a of bS)c(a.id);for(let a of ba)c(a.id);for(let a of aq)a.providerAlias===b_&&"llm"===(a.kind||a.type||"llm")&&c(a.id);return a.size?["auto",...a]:null})(),b1=bW?Q?.prefix||J:bT,b2=(0,f.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(b_)}`,{cache:"no-store"}),b=await a.json();a.ok&&bd(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[b_]),b3=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b_,ids:[a]})})).ok&&await b2()}catch(a){console.log("Error disabling model:",a)}},b4=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(b_)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await b2()}catch(a){console.log("Error enabling model:",a)}},b5=async(a,b)=>{await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b_,id:a,type:"llm",enabled:b})})},b6=async(a,b=[])=>{let c=a.length+b.length;c&&bf({title:"Disable All Models",message:`Disable all ${c} model(s)?`,onConfirm:async()=>{bf(null);try{for(let c of(a.length&&(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b_,ids:a})})).ok&&await b2(),b))await b5(c,!1);b.length&&await b9()}catch(a){console.log("Error disabling all models:",a)}}})},b7=async(a=[])=>{try{for(let b of((await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(b_)}`,{method:"DELETE"})).ok&&await b2(),a))await b5(b,!0);a.length&&await b9()}catch(a){console.log("Error enabling all models:",a)}},b8=(0,f.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&ap(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),b9=(0,f.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ar(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),ca=(0,f.useCallback)(async()=>{try{let[a,b,c,d]=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"})]),e=await a.json(),f=await b.json(),g=await c.json(),h=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===J);N(a)}c.ok&&T(g.proxyPools||[]);let i=(h.providerStrategies||{})[J]||{};aX(i.fallbackStrategy||null),aZ(null!=i.stickyRoundRobinLimit?String(i.stickyRoundRobinLimit):"1"),a_(!0===i.earliestExpiryFirst);let j=(h.providerThinking||{})[J]||{};a1(j.mode||"auto");let k=H[J],l=k&&h[k]||{};if(a3({enabled:!0===l.enabled,connections:l.connections||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===J)||null;if(!a&&bW)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===J)||null))break}R(a)}}catch(a){console.log("Error fetching connections:",a)}finally{P(!1)}},[J,bW]),cb=(0,f.useCallback)(async()=>{await ca(),await b2()},[ca,b2]),cc=async a=>{try{let b=await fetch(`/api/provider-nodes/${J}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(R(c.node),await ca(),aj(!1))}catch(a){console.log("Error updating provider node:",a)}},cd=async(a,b,c=a$)=>{try{let d=await fetch("/api/settings",{cache:"no-store"}),e=(d.ok?await d.json():{}).providerStrategies||{},f={...e[J]||{}};a?f.fallbackStrategy=a:delete f.fallbackStrategy,"round-robin"===a&&""!==b?f.stickyRoundRobinLimit=Number(b)||3:delete f.stickyRoundRobinLimit,c?f.earliestExpiryFirst=!0:delete f.earliestExpiryFirst;let g={...e};0===Object.keys(f).length?delete g[J]:g[J]=f,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:g})})}catch(a){console.log("Error saving provider strategy:",a)}},ce=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[J]={mode:a}:delete c[J],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},cf=async a=>{let b=H[J];if(b){a3(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},cg=async(a,b,c=bT)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await b8();else{let b=await a.json();L.error(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},ch=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await b8()}catch(a){console.log("Error deleting alias:",a)}},ci=async(a,b="llm",c=b_,d={},e)=>{try{let f={providerAlias:c,id:a,type:b};if(void 0!==e&&(f.enabled=e),d&&"object"==typeof d)for(let a of["vision","reasoning","contextWindow","maxOutput","thinkingFormat"])void 0!==d[a]&&(f[a]=d[a]);let g=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(g.ok)await b9();else{let a=await g.json();L.error(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},cj=async(a,b="llm",c=b_)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await b9()}catch(a){console.log("Error deleting custom model:",a)}},ck=async(a,b,c="llm")=>{try{(await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b_,id:a,type:c,enabled:b})})).ok&&await b9()}catch(a){console.log("Error toggling custom model:",a)}},cl=(a,b="llm")=>{bf({title:a?(0,r.Tl)("Enable all custom models?"):(0,r.Tl)("Disable all custom models?"),message:a?(0,r.Tl)("All custom models of this provider will be listed in /v1/models and exposed to clients."):(0,r.Tl)("All custom models of this provider will disappear from /v1/models until re-enabled. Clients will no longer see them."),onConfirm:async()=>{bf(null);try{(await fetch("/api/models/custom/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b_,type:b,enabled:a})})).ok&&await b9()}catch(a){console.log("Error bulk-updating custom models:",a)}}})},cm=async()=>{if(bt)return;let a=M.find(a=>!1!==a.isActive);if(!a)return void L.warning((0,r.Tl)("Please add an active Qoder connection first"));bu(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void L.error(c.error||(0,r.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void L.warning((0,r.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;if(!b)continue;let c=b.replace(/^qoder\//,"");aq.some(a=>a.providerAlias===b_&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(ao).includes(`${b_}/${c}`)||(await ci(c,"llm",b_,{},!1),e+=1)}0===e?L.warning((0,r.Tl)("All models already exist, no new models added")):L.success((0,r.Tl)("Successfully added")+` ${e} `+(0,r.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),L.error((0,r.Tl)("Error fetching models")+": "+a.message)}finally{bu(!1)}},cn="opencode-go"===J||"bai"===J,co=async()=>{if(a6)return;let a=M.find(a=>!1!==a.isActive);if(!a?.id)return void L.warning((0,r.Tl)("Add a connection to enable importing models."));a7(!0);try{let b=await fetch(`/api/providers/${a.id}/models`,{cache:"no-store"}),c=await b.json();if(!b.ok)throw Error(c?.error||`Request failed: ${b.status}`);let d=(Array.isArray(c.models)?c.models:[]).map(a=>{let b=a?.id||a?.name||a?.model;return b?{...a,id:String(b),name:a.name||String(b)}:null}).filter(Boolean);a5(d),L.success(`${(0,r.Tl)("Models refreshed")} (${d.length})`)}catch(a){L.error((0,r.Tl)("Failed to fetch models")+": "+a.message)}finally{a7(!1)}},cp=async()=>{if(bi||0===M.length)return;let a=Object.fromEntries(M.map(a=>[a.id,{state:"queued",error:null}]));bs.current=!1,bj(!0),bl(!1),bn(null),bp(a),br({total:M.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<M.length;a+=1){if(bs.current){br({total:M.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=M[a];bn(d.id),bp(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,bp(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,bp(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}br({total:M.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<M.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{bn(null),bj(!1),bl(!1),bs.current=!1}},cq=async a=>{bf({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{bf(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&N(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},cr=()=>{ca(),V(!1)},cs=async a=>{ab("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:J,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await cb(),_(!1);return}ab(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),ab("Failed to save connection")}},ct=async a=>{try{(await fetch(`/api/providers/${am.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await ca(),ah(!1))}catch(a){console.log("Error updating connection:",a)}},cu=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&N(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},cv=async(a,b)=>{let c=[...M];[c[a],c[b]]=[c[b],c[a]],N(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await ca()}},cw=M.filter(a=>aQ.includes(a.id)),cx=M.length>0&&aQ.length===M.length;(()=>{if(0===cw.length)return;let a=new Set(cw.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return;let c=S.find(a=>a.id===b);return c?.name}})();let cy=()=>{aU||al(!1)},cz=async a=>{aV(!0);try{let b=0;for(let{connectionId:c,proxyPoolId:d}of a)try{(await fetch(`/api/providers/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:d})})).ok||(b+=1)}catch(a){console.log("Error applying proxy for",c,a),b+=1}b>0&&alert(`Updated with ${b} failed request(s).`),await ca(),al(!1)}finally{aV(!1)}},cA=a=>{let b=M.map(b=>({connectionId:b.id,proxyPoolId:a}));return cz(b)},cB=(0,e.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:M.map((a,b)=>{let c;return(0,e.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,e.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,e.jsx)("input",{type:"checkbox",checked:(c=a.id,aQ.includes(c)),onChange:()=>{var b;return b=a.id,void aR(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,e.jsx)("div",{className:"flex-1 min-w-0",children:(0,e.jsx)(y.A,{connection:a,proxyPools:S,isOAuth:bL,isFirst:0===b,isLast:b===M.length-1,onMoveUp:()=>cv(b,b-1),onMoveDown:()=>cv(b,b+1),onToggleActive:b=>cu(a.id,b),autoPing:H[J]&&"oauth"===a.authType?{on:!0===a2.connections[a.id],onToggle:b=>{var c;return c=a.id,void cf({...a2,connections:{...a2.connections,[c]:b}})},provider:J}:null,onUpdateProxy:async b=>{try{(await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:b||null})})).ok&&N(c=>c.map(c=>c.id===a.id?{...c,providerSpecificData:{...c.providerSpecificData,proxyPoolId:b||null}}:c))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{an(a),ah(!0)},onDelete:()=>cq(a.id),oneByOneStatus:bo[a.id]||null})})]},a.id)})}),cC=S.filter(a=>!0===a.isActive),cD=(0,e.jsx)(l.aF,{isOpen:ak,onClose:cy,title:`Apply Proxy (${M.length} connections)`,children:(0,e.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,e.jsxs)("div",{className:"flex flex-col",children:[(0,e.jsxs)("button",{onClick:()=>{let a=S.filter(a=>!0===a.isActive);if(0===a.length)return void L.warning("No active proxy pools available.");let b=M.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id}));return cz(b)},disabled:aU||0===cC.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,e.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,e.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,e.jsxs)("button",{onClick:()=>cA(null),disabled:aU,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,e.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,e.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),S.map(a=>(0,e.jsxs)("button",{onClick:()=>cA(a.id),disabled:aU||!0!==a.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,e.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,e.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,e.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),aU&&(0,e.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,e.jsx)(l.$n,{onClick:cy,variant:"ghost",fullWidth:!0,disabled:aU,children:"Cancel"})]})}),cE=async a=>{if(!aM.has(a)){aN(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b_}/${a}`})}),c=await b.json();aJ(b=>({...b,[a]:c.ok?"ok":"error"})),aL(c.ok?"":c.error||"Model not reachable")}catch{aJ(b=>({...b,[a]:"error"})),aL("Network error")}finally{aN(b=>{let c=new Set(b);return c.delete(a),c})}}};if(O)return(0,e.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,e.jsx)(l.Qv,{}),(0,e.jsx)(l.Qv,{})]});if(!bJ)return(0,e.jsxs)("div",{className:"text-center py-20",children:[(0,e.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,e.jsx)(i(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let cF=()=>bU&&bJ.apiType?"responses"===bJ.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":bV?"/providers/anthropic-m.png":(0,k.HY)(bJ.id);return(0,e.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)(i(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,e.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,e.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${bJ.color}15`},children:aG||!cF()?(0,e.jsx)("span",{className:"text-sm font-bold",style:{color:bJ.color},children:bJ.textIcon||bJ.id.slice(0,2).toUpperCase()}):(0,e.jsx)(j.default,{src:cF(),alt:bJ.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,k.Kw)(bJ.id),aH(!0)},loading:"lazy",decoding:"async"})}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,e.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:bJ.name}),(bJ.notice?.webUrl||bJ.notice?.apiKeyUrl||bJ.notice?.signupUrl||bJ.website)&&(0,e.jsxs)("a",{href:bJ.notice?.webUrl||bJ.notice?.apiKeyUrl||bJ.notice?.signupUrl||bJ.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),bJ.notice?.webUrl?"Web console":bJ.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]}),(0,e.jsx)(l.N5,{code:bJ.notice?.inviteCode})]}),(0,e.jsxs)("p",{className:"text-text-muted",children:[M.length," connection",1===M.length?"":"s"]})]})]})]}),bJ.deprecated&&(0,e.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,e.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,e.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:bJ.deprecationNotice})]}),bJ.notice?.text&&!bJ.deprecated&&(0,e.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,e.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,e.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:(0,r.Tl)(bJ.notice.text)}),bJ.notice.apiKeyUrl&&(0,e.jsx)("a",{href:bJ.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:(0,r.Tl)("Get API Key →")}),(0,e.jsx)(l.N5,{code:bJ.notice?.inviteCode})]}),bW&&Q&&(0,e.jsx)(l.Zp,{children:(0,e.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:bV?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,e.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bV?"Messages API":"responses"===Q.apiType?"Responses API":"Chat Completions"," \xb7 ",(Q.baseUrl||"").replace(/\/$/,""),"/",bV?"messages":"responses"===Q.apiType?"responses":"chat/completions"]})]}),(0,e.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,e.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>{ab(""),_(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>aj(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{bf({title:"Delete Compatible Node",message:`Delete this ${bV?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{bf(null);try{(await fetch(`/api/provider-nodes/${J}`,{method:"DELETE"})).ok&&I.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bN?(0,e.jsx)(l.gw,{providerId:J}):(0,e.jsxs)(l.Zp,{children:[(0,e.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,e.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[M.length>0&&S.length>0&&(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>al(!0),children:"Apply Proxy"}),M.length>0&&(0,e.jsxs)(e.Fragment,{children:[aQ.length>0&&(0,e.jsxs)(l.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=aQ.length;0!==a&&bf({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{bf(null);let a=0,b=[...aQ];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}N(a=>a.filter(a=>!b.includes(a.id))),aR([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},children:["Delete Selected (",aQ.length,")"]}),(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:cp,disabled:bi,children:bi?(0,r.Tl)("Testing Connection One-by-One..."):(0,r.Tl)("Test Connection One-by-One")}),bi&&(0,e.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{bi&&(bs.current=!0,bl(!0))},disabled:bk,children:bk?(0,r.Tl)("Stopping..."):(0,r.Tl)("Stop")})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("span",{className:"text-xs text-text-muted font-medium",title:(0,r.Tl)("Prioritize accounts with quota packages that expire soonest"),children:(0,r.Tl)("Earliest Expiry First")}),(0,e.jsx)(l.lM,{checked:a$,onChange:a=>{a_(a),cd(aW,aY,a)}})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("span",{className:"text-xs text-text-muted font-medium",children:(0,r.Tl)("Round Robin")}),(0,e.jsx)(l.lM,{checked:"round-robin"===aW,onChange:a=>{let b=a?"round-robin":null,c=a?aY||"1":aY;a&&!aY&&aZ("1"),aX(b),cd(b,c,a$)}}),"round-robin"===aW&&(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)("span",{className:"text-xs text-text-muted",children:(0,r.Tl)("Sticky:")}),(0,e.jsx)("input",{type:"number",min:1,value:aY,onChange:a=>{var b;return b=a.target.value,void(aZ(b),cd("round-robin",b,a$))},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===M.length?(0,e.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:bL?"lock":"key"})}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bX&&(0,e.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bY," or ",bZ,"."]})]})]}),(0,e.jsx)("div",{className:"flex gap-2",children:bX?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:by,children:bY}),(0,e.jsx)(l.$n,{size:"sm",icon:"key",onClick:bz,children:bZ}),bP&&!bQ&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>bC("export"),children:(0,r.Tl)("Export")}),(0,e.jsx)(l.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>{bG("import"),bE(!0)},children:(0,r.Tl)("Import")})]}),bQ&&bI()]}):(0,e.jsxs)(e.Fragment,{children:[!bW&&"iflow"===J&&(0,e.jsx)(l.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>Z(!0),children:"Cookie"}),"codex"===J&&(0,e.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ad(!0),children:(0,r.Tl)("Bulk Add")}),(0,e.jsx)(l.$n,{size:"sm",icon:"add",onClick:bA,children:bW?"Add API Key":"iflow"===J?"OAuth":"Add Connection"})]})})]}):(0,e.jsxs)(e.Fragment,{children:[bq&&(0,e.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,e.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,e.jsxs)("span",{children:[(0,r.Tl)("Total:")," ",bq.total]}),(0,e.jsxs)("span",{children:[(0,r.Tl)("Completed:")," ",bq.completed]}),(0,e.jsxs)("span",{children:[(0,r.Tl)("Passed:")," ",bq.passed]}),(0,e.jsxs)("span",{children:[(0,r.Tl)("Failed:")," ",bq.failed]}),bq.stopped&&(0,e.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:(0,r.Tl)("Stopped")}),bi&&bm&&(0,e.jsxs)("span",{children:[(0,r.Tl)("Running:")," ",M.find(a=>a.id===bm)?.name||bm]})]})}),M.length>0&&(0,e.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,e.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,e.jsx)("input",{type:"checkbox",checked:cx,onChange:()=>{cx?aR([]):aR(M.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),cB,!bW&&(0,e.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===J&&(0,e.jsx)(l.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>Z(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===J&&(0,e.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ad(!0),title:(0,r.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,r.Tl)("Bulk Add")}),bX?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:by,className:"w-full sm:w-auto",children:bY}),(0,e.jsx)(l.$n,{size:"sm",icon:"key",onClick:bz,className:"w-full sm:w-auto",children:bZ}),bP&&!bQ&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>bC("export"),className:"w-full sm:w-auto",children:(0,r.Tl)("Export")}),(0,e.jsx)(l.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>{bG("import"),bE(!0)},className:"w-full sm:w-auto",children:(0,r.Tl)("Import")})]}),bQ&&bI()]}):(0,e.jsx)(l.$n,{size:"sm",icon:"add",onClick:bA,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,e.jsxs)(l.Zp,{children:[(0,e.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),b0&&(0,e.jsx)("select",{value:a0,onChange:a=>{var b;return b=a.target.value,void(a1(b),ce(b))},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:b0.map(a=>(0,e.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),!bW&&(a=[...bS,...ba.filter(a=>!bS.some(b=>b.id===a.id))].filter(a=>{let b=(0,n.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!bc.includes(a)),c=(b=aq.filter(a=>a?.providerAlias===b_&&"llm"===(a.kind||a.type||"llm"))).filter(a=>!1!==a.enabled).map(a=>a.id),d=b.filter(a=>!1===a.enabled).map(a=>a.id),h=bc.length>0||d.length>0,w=a.length>0||c.length>0,(0,e.jsxs)("div",{className:"flex gap-2",children:[h&&(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>b7(d),children:"Active All"}),w&&(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>b6(a,c),children:"Disable All"})]}))]}),!!aK&&(F=(0,u.O)(aK),(0,e.jsxs)("p",{className:"text-xs text-red-500 mb-3 break-words",children:[aK," ",F&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("a",{href:F,target:"_blank",rel:"noopener noreferrer",title:(0,r.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"text-blue-500 underline hover:text-blue-400",children:(0,r.Tl)("Verify your account")})," ",(0,e.jsx)("button",{type:"button",onClick:()=>bw(F,"verification"),className:"text-text-muted underline hover:text-primary",children:"verification"===bv?(0,r.Tl)("Copied"):(0,r.Tl)("Copy link")}),(0,e.jsxs)("span",{className:"text-text-muted",children:[" ","(",(0,r.Tl)("Recommended: open in an incognito window and sign in with the affected account"),")"]})]})]})),(()=>{let a,b,c;if(bW)return(0,e.jsx)(x.A,{providerStorageAlias:b_,providerDisplayAlias:b1,modelAliases:ao,customModels:aq,copied:bv,onCopy:bw,onSetAlias:cg,onDeleteAlias:ch,onAddCustomModel:(a,b)=>ci(a,"llm",b_,{},b),onToggleCustomModel:ck,onDeleteCustomModel:a=>cj(a,"llm",b_),onBulkCustomModels:cl,connections:M,isAnthropic:bV});let d=[...bS,...ba.filter(a=>!bS.some(b=>b.id===a.id))].filter(a=>{let b=(0,n.CP)(a);return!b||"llm"===b}),f=new Set(bc),g=d.filter(a=>!f.has(a.id)),h=d.filter(a=>f.has(a.id)),i=(0,t.R)({customModels:aq,modelAliases:ao,providerAlias:b_,builtInModels:bS,type:"llm"}),j=i.filter(a=>!1!==a.enabled),k=i.filter(a=>!1===a.enabled);return(0,e.jsxs)("div",{className:"flex flex-wrap gap-3",children:[j.length+k.length>0&&(0,e.jsxs)("div",{className:"w-full flex items-center gap-2 text-xs text-text-muted -mb-1",children:[(0,e.jsxs)("span",{children:[(0,r.Tl)("Custom models")," (",j.length+k.length,")"]}),(0,e.jsx)("span",{children:"\xb7"}),(0,e.jsx)("button",{onClick:()=>cl(!0),className:"text-primary hover:underline",children:(0,r.Tl)("Enable all")}),(0,e.jsx)("span",{children:"\xb7"}),(0,e.jsx)("button",{onClick:()=>cl(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,r.Tl)("Disable all")})]}),j.map(a=>(0,e.jsx)(v.A,{model:{id:a.id,name:a.name},fullModel:`${b1}/${a.id}`,alias:a.alias,copied:bv,onCopy:bw,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?cj(a.id,"llm",b_):ch(a.alias)},testStatus:aI[a.id],onTest:M.length>0||bN?()=>cE(a.id):void 0,isTesting:aM.has(a.id),isCustom:!0,isFree:!1,caps:K(`${J}/${a.id}`),thinkingSuffix:b$(a.id)},`${a.source}-${a.fullModel}`)),g.map(a=>{let b=`${b_}/${a.id}`,c=`${J}/${a.id}`,d=Object.entries(ao).find(([,a])=>a===b||a===c)?.[0];return(0,e.jsx)(v.A,{model:a,fullModel:`${b1}/${a.id}`,alias:d,copied:bv,onCopy:bw,onSetAlias:b=>cg(a.id,b,b_),onDeleteAlias:()=>ch(d),testStatus:aI[a.id],onTest:M.length>0||bN?()=>cE(a.id):void 0,isTesting:aM.has(a.id),isFree:a.isFree,onDisable:()=>b3(a.id),caps:K(`${J}/${a.id}`),thinkingSuffix:b$(a.id)},a.id)}),(0,e.jsxs)("button",{onClick:()=>aP(!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,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===J&&M.some(a=>!1!==a.isActive)&&(0,e.jsxs)("button",{onClick:cm,disabled:bt,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,e.jsx)("span",{className:"material-symbols-outlined text-sm",style:bt?{animation:"spin 1s linear infinite"}:void 0,children:bt?"progress_activity":"download"}),bt?(0,r.Tl)("Fetching..."):(0,r.Tl)("Fetch Qoder Models")]}),cn&&(0,e.jsxs)("button",{onClick:co,disabled:a6||!M.some(a=>!1!==a.isActive),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,e.jsx)("span",{className:"material-symbols-outlined text-sm",style:a6?{animation:"spin 1s linear infinite"}:void 0,children:a6?"progress_activity":"refresh"}),a6?(0,r.Tl)("Refreshing..."):(0,r.Tl)("Refresh Official Models")]}),a4.length>0&&(a=new Set([...Object.values(ao),...i.map(a=>a.fullModel)]),b=new Set(bS.map(a=>a.id)),c=a4.filter(c=>!a.has(`${b_}/${c.id}`)&&!b.has(c.id)),0===c.length?null:(0,e.jsxs)("div",{className:"w-full mt-2",children:[(0,e.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,e.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,e.jsxs)("button",{onClick:async()=>{await ci(a.id,"llm",b_)},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:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),(h.length>0||k.length>0)&&(0,e.jsxs)("div",{className:"w-full mt-2",children:[(0,e.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",h.length+k.length,"):"]}),(0,e.jsxs)("div",{className:"flex flex-wrap gap-3",children:[k.map(a=>(0,e.jsx)(v.A,{model:{id:a.id,name:a.name},fullModel:`${b1}/${a.id}`,copied:bv,onCopy:bw,testStatus:aI[a.id],onTest:M.length>0||bN?()=>cE(a.id):void 0,isTesting:aM.has(a.id),onEnable:()=>ck(a.id,!0),isCustom:!1,isFree:!1},`custom-${a.fullModel}`)),h.map(a=>(0,e.jsx)(v.A,{model:a,fullModel:`${b1}/${a.id}`,copied:bv,onCopy:bw,testStatus:aI[a.id],onTest:M.length>0||bN?()=>cE(a.id):void 0,isTesting:aM.has(a.id),onEnable:()=>b4(a.id),isFree:a.isFree,caps:K(`${J}/${a.id}`),thinkingSuffix:b$(a.id)},a.id))]})]})]})})()]}),cD,"kiro"===J?(0,e.jsx)(l.Mh,{isOpen:U,providerInfo:bJ,onSuccess:cr,onClose:()=>V(!1)}):"cursor"===J?(0,e.jsx)(l.G9,{isOpen:U,onSuccess:cr,onClose:()=>V(!1)}):"gitlab"===J?(0,e.jsx)(l.vj,{isOpen:U,providerInfo:bJ,onSuccess:cr,onClose:()=>V(!1)}):(0,e.jsx)(l.LF,{isOpen:U,provider:J,providerInfo:bJ,onSuccess:cr,onClose:()=>V(!1)}),"xiaomi-mimo"===J&&(0,e.jsx)(l.LH,{isOpen:W,onSuccess:cr,onClose:()=>X(!1)}),"iflow"===J&&(0,e.jsx)(l.vE,{isOpen:Y,onSuccess:()=>{ca(),Z(!1)},onClose:()=>Z(!1)}),(0,e.jsx)(z.A,{isOpen:$,provider:J,providerName:bJ.name,isCompatible:bW,isAnthropic:bV,authType:bJ?.authType,authHint:bJ?.authHint,website:bJ?.website,proxyPools:S,error:aa,existingNames:M.map(a=>a.name).filter(Boolean),onSave:cs,onBulkDone:cb,onClose:()=>{ab(""),_(!1)}}),(0,e.jsx)(l.wI,{isOpen:ag,connection:am,proxyPools:S,onSave:ct,onClose:()=>ah(!1)}),bW&&(0,e.jsx)(A.A,{isOpen:ai,node:Q,onSave:cc,onClose:()=>aj(!1),isAnthropic:bV}),!bW&&(0,e.jsx)(B.A,{isOpen:aO,providerAlias:b_,providerDisplayAlias:b1,onSave:async a=>{await ci(a,"llm",b_),aP(!1)},onClose:()=>aP(!1)}),"codex"===J&&(0,e.jsx)(C.A,{isOpen:ac,onClose:()=>ad(!1),onSuccess:ca}),"codebuddy-cn"===J&&(0,e.jsx)(D.A,{isOpen:ae,password:aE,onClose:()=>af(!1),onSuccess:ca}),(0,e.jsx)(E.A,{isOpen:bD,mode:bF,provider:J,providerName:bJ?.name,onClose:()=>bE(!1),onSuccess:ca}),(0,e.jsxs)(l.aF,{isOpen:ay.open,onClose:()=>az({open:!1,action:null,value:""}),title:(0,r.Tl)("Confirm Password"),size:"sm",footer:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.$n,{variant:"ghost",onClick:()=>az({open:!1,action:null,value:""}),children:(0,r.Tl)("Cancel")}),(0,e.jsx)(l.$n,{variant:"primary",onClick:bB,disabled:!ay.value||aA,children:aA?(0,r.Tl)("Verifying..."):(0,r.Tl)("Confirm")})]}),children:[(0,e.jsx)("p",{className:"text-text-muted mb-3 text-sm",children:(0,r.Tl)("Enter your dashboard password to export OAuth accounts (the file will be encrypted with the transfer passphrase you pick next).")}),(0,e.jsx)(l.pd,{type:"password",autoFocus:!0,value:ay.value,onChange:a=>az(b=>({...b,value:a.target.value})),onKeyDown:a=>{"Enter"===a.key&&ay.value&&bB()},placeholder:(0,r.Tl)("Password")}),aC&&(0,e.jsx)("p",{className:"text-xs text-red-500 mt-2",children:aC})]}),(0,e.jsx)(l.uo,{isOpen:bg,onClose:()=>bh(!1),onConfirm:()=>{(bh(!1),bL)?bx():bz()},title:"Risk Notice",message:bJ?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,e.jsx)(l.uo,{isOpen:!!be,onClose:()=>bf(null),onConfirm:be?.onConfirm,title:be?.title||"Confirm",message:be?.message,variant:"danger"})]})}d()}catch(a){d(a)}})},83919:(a,b,c)=>{"use strict";c.d(b,{k:()=>l});var d=c(59160),e=c(18982);c(87592);let f=["none","low","medium","high"],g=["none","thinking"],h=["none","low","medium","high","max"],i={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":h,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":f,zai:g,qwen:f,kimi:h,deepseek:["none","high","max"],minimax:g,hunyuan:f,step:f},j=["none","minimal","low","medium","high","xhigh","max"],k=[{provider:"codex",pattern:"*gpt-6*",levels:j},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...j,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...j,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:j},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{provider:"amd",pattern:"DeepSeek-V4-Flash*",levels:["none","minimal","low","medium","high","xhigh","max"]},{provider:"amd",pattern:"Qwen3.8-Flash-Next",levels:["none","low","medium","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 l(a,b){if("kiro"===a&&null===function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=b.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!c)return null;let[,d,e]=c,f=Number(d),g=void 0===e?null:Number(e);return f<4||4===f&&(null===g||g<=5||null!==g&&g>=1e3)?null:"output_config"}(b))return null;let c=(0,d.nl)(a,b);if(!c.reasoning)return null;let g=k.find(c=>(!c.provider||c.provider===a)&&(0,e.gH)(c.pattern,b)),h=g?.levels||i[c.thinkingFormat]||f;return!1===c.thinkingCanDisable&&(h=h.filter(a=>"none"!==a)),h}},86266:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>m});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=c(92592),k=c(91914),l=a([i]);i=(l.then?(await l)():l)[0];let n=`name1|sk-key1
8
+ ]`;function l({isOpen:a,onClose:b,onSuccess:c}){let[d,g]=(0,f.useState)(""),[h,k]=(0,f.useState)(!1),[n,o]=(0,f.useState)(""),[p,q]=(0,f.useState)(null),r=()=>{h||(g(""),o(""),q(null),b())},s=async()=>{var a;let b;o(""),q(null);let e=d.trim();if(!e)return;try{b=JSON.parse(e)}catch(a){o(`${(0,j.Tl)("Invalid JSON")}: ${a.message}`);return}let f=(a=b,Array.isArray(a)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null);if(!f||0===f.length)return void o((0,j.Tl)("No accounts found in input"));k(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:f})}),b=await a.json();if(!a.ok)return void o(b?.error||`Request failed: ${a.status}`);q(b),b.success>0&&"function"==typeof c&&c()}catch(a){o(a.message||(0,j.Tl)("Request failed"))}finally{k(!1)}},t=p?.results?.filter(a=>!a.ok)||[];return(0,e.jsx)(i.aF,{isOpen:a,title:(0,j.Tl)("Bulk Add Codex Accounts"),onClose:r,children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsx)("p",{className:"text-xs text-text-muted",children:(0,j.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,e.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:m,value:d,onChange:a=>g(a.target.value),disabled:h}),n&&(0,e.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),p&&(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,j.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,j.Tl)("failed")}`:""]}),t.length>0&&(0,e.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:t.map(a=>(0,e.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{onClick:s,fullWidth:!0,disabled:h||!d.trim(),children:h?(0,j.Tl)("Importing..."):(0,j.Tl)("Import All")}),(0,e.jsx)(i.$n,{onClick:r,variant:"ghost",fullWidth:!0,disabled:h,children:(0,j.Tl)("Close")})]})]})})}l.propTypes={isOpen:h().bool.isRequired,onClose:h().func.isRequired,onSuccess:h().func},d()}catch(a){d(a)}})},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},83380:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{default:()=>H});var e=c(48249),f=c(67484),g=c(19099),h=c(2116),i=c.n(h),j=c(81220),k=c(29225),l=c(94579),m=c(92592),n=c(91431),o=c(83919),p=c(50377),q=c(29476),r=c(99258),s=c(41371);c(93848);var t=c(18753),u=c(73813),v=c(51543),w=c(42076),x=c(95296),y=c(98376),z=c(38331),A=c(86266),B=c(39968),C=c(80445),D=c(81330),E=c(99548),F=c(72022),G=a([l,w,x,y,z,A,B,C,D,E,F]);[l,w,x,y,z,A,B,C,D,E,F]=G.then?(await G)():G;let I={claude:"claudeAutoPing",codex:"codexAutoPing"};function H(){let a,b,c,d,h,x,G,H,J=(0,g.useParams)(),K=(0,g.useRouter)(),L=J.id,{getCaps:M}=(0,q.y)(),N=(0,s.i)(),[O,P]=(0,f.useState)([]),[Q,R]=(0,f.useState)(!0),[S,T]=(0,f.useState)(null),[U,V]=(0,f.useState)([]),[W,X]=(0,f.useState)(!1),[Y,Z]=(0,f.useState)(!1),[$,_]=(0,f.useState)(!1),[aa,ab]=(0,f.useState)(!1),[ac,ad]=(0,f.useState)(""),[ae,af]=(0,f.useState)(!1),[ag,ah]=(0,f.useState)(!1),[ai,aj]=(0,f.useState)(!1),[ak,al]=(0,f.useState)(!1),[am,an]=(0,f.useState)(!1),[ao,ap]=(0,f.useState)(null),[aq,ar]=(0,f.useState)({}),[as,at]=(0,f.useState)([]),[au,av]=(0,f.useState)(!1),[aw,ax]=(0,f.useState)(!1),[ay,az]=(0,f.useState)(!1),[aA,aB]=(0,f.useState)({open:!1,action:null,value:""}),[aC,aD]=(0,f.useState)(!1),[aE,aF]=(0,f.useState)(""),[aG,aH]=(0,f.useState)(""),[aI,aJ]=(0,f.useState)(!1),[aK,aL]=(0,f.useState)({}),[aM,aN]=(0,f.useState)(""),[aO,aP]=(0,f.useState)(()=>new Set),[aQ,aR]=(0,f.useState)(!1),[aS,aT]=(0,f.useState)([]),[aU,aV]=(0,f.useState)("__none__"),[aW,aX]=(0,f.useState)(!1),[aY,aZ]=(0,f.useState)(null),[a$,a_]=(0,f.useState)(""),[a0,a1]=(0,f.useState)(!1),[a2,a3]=(0,f.useState)("auto"),[a4,a5]=(0,f.useState)({enabled:!1,connections:{}}),[a6,a7]=(0,f.useState)([]),[a8,a9]=(0,f.useState)(!1),[ba,bb]=(0,f.useState)([]),[bc,bd]=(0,f.useState)([]),[be,bf]=(0,f.useState)([]),[bg,bh]=(0,f.useState)(null),[bi,bj]=(0,f.useState)(!1),[bk,bl]=(0,f.useState)(!1),[bm,bn]=(0,f.useState)(!1),[bo,bp]=(0,f.useState)(null),[bq,br]=(0,f.useState)({}),[bs,bt]=(0,f.useState)(null),bu=(0,f.useRef)(!1),[bv,bw]=(0,f.useState)(!1),{copied:bx,copy:by}=(0,p.C)(),bz=()=>{"xiaomi-mimo"===L?Z(!0):X(!0)},bA=()=>{bN?bz():(ad(""),ab(!0))},bB=()=>{ad(""),ab(!0)},bC=()=>{bN?bA():bB()},bD=async()=>{if(!aC){aD(!0),aF("");try{let a=await fetch("/api/auth/verify-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:aA.value})});if(!a.ok){let b=await a.json().catch(()=>({}));aF(b?.error||(0,r.Tl)("Invalid password"));return}let{action:b}=aA;aB({open:!1,action:null,value:""}),"export"===b&&(bI(b),bG(!0))}catch(a){aF(a.message||(0,r.Tl)("Invalid password"))}finally{aD(!1)}}},bE=a=>{aH(""),aB({open:!0,action:a,value:""})},[bF,bG]=(0,f.useState)(!1),[bH,bI]=(0,f.useState)("export"),bJ=async()=>{az(!0);try{let a=await fetch("/api/oauth/codebuddy-cn/checkin",{method:"POST",cache:"no-store"}),b=await a.json();if(!a.ok)throw Error(b?.error||`Request failed: ${a.status}`);let c=Array.isArray(b?.results)?b.results:[];if(0===c.length)return void N.warning((0,r.Tl)("No CodeBuddy CN connections to check in"));let d=c.filter(a=>"checked-in"===a.status).length,e=c.filter(a=>"already"===a.status).length,f=c.filter(a=>"failed"===a.status).length;0===f?N.success(`${(0,r.Tl)("Check-in complete")}: ${d} ${(0,r.Tl)("checked-in")}, ${e} ${(0,r.Tl)("already checked in")}`):N.error(`${(0,r.Tl)("Check-in complete with errors")}: ${f} ${(0,r.Tl)("failed")}`)}catch(a){N.error((0,r.Tl)("Check-in failed")+": "+a.message)}finally{az(!1)}},bK=()=>(0,e.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:(0,e.jsx)(l.$n,{size:"sm",icon:"calendar_today",onClick:bJ,disabled:ay,className:"w-full sm:w-auto",title:(0,r.Tl)("CodeBuddy CN auto-checks in daily (retries all day until confirmed)"),children:ay?(0,r.Tl)("Checking in..."):(0,r.Tl)("Check in now")})}),bL=S?{id:S.id,name:S.name||("anthropic-compatible"===S.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===S.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===S.type?"AC":"OC",apiType:S.apiType,baseUrl:S.baseUrl,type:S.type}:m.zN[L]||m.fg[L]||m.IS[L]||m.nJ[L]||m.br[L],bM=bL?.authModes||[],bN=!!m.zN[L]||!!m.IS[L]||bM.includes("oauth"),bO=!!m.fg[L]||bM.includes("apikey"),bP=!!m.IS[L]?.noAuth,bQ="codebuddy-cn"===L,bR=bN&&bL?.authModes?.includes("oauth")&&au,bS=bQ&&aw,bT=(0,n.KC)(L),bU="cursor"===L&&ba.length>0?ba:bT,bV=(0,m.wG)(L),bW=(0,m.mq)(L),bX=(0,m.gb)(L),bY=bW||bX,bZ=!bY&&bN&&bO,b$="xai"===L?"Grok Build OAuth":"grok-cli"===L?"Grok CLI Device Login":"kimi"===L?"Kimi Coding OAuth":"OAuth",b_="xai"===L?"xAI API Key":"kimi"===L?"Kimi API Key":"qoder"===L?"PAT":"API Key",b0=a=>{if(!a2||"auto"===a2)return null;let b=(0,o.k)(L,a);return b&&b.includes(a2)?a2:null},b1=bY?L:bV,b2=(()=>{let a=new Set,b=new Set,c=c=>{if(!c||b.has(c))return;b.add(c);let d=(0,o.k)(L,c);d&&d.forEach(b=>{"none"!==b&&a.add(b)})};for(let a of bU)c(a.id);for(let a of bc)c(a.id);for(let a of as)a.providerAlias===b1&&"llm"===(a.kind||a.type||"llm")&&c(a.id);return a.size?["auto",...a]:null})(),b3=bY?S?.prefix||L:bV,b4=(0,f.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(b1)}`,{cache:"no-store"}),b=await a.json();a.ok&&bf(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[b1]),b5=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b1,ids:[a]})})).ok&&await b4()}catch(a){console.log("Error disabling model:",a)}},b6=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(b1)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await b4()}catch(a){console.log("Error enabling model:",a)}},b7=async(a,b)=>{await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b1,id:a,type:"llm",enabled:b})})},b8=async(a,b=[])=>{let c=a.length+b.length;c&&bh({title:"Disable All Models",message:`Disable all ${c} model(s)?`,onConfirm:async()=>{bh(null);try{for(let c of(a.length&&(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b1,ids:a})})).ok&&await b4(),b))await b7(c,!1);b.length&&await cb()}catch(a){console.log("Error disabling all models:",a)}}})},b9=async(a=[])=>{try{for(let b of((await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(b1)}`,{method:"DELETE"})).ok&&await b4(),a))await b7(b,!0);a.length&&await cb()}catch(a){console.log("Error enabling all models:",a)}},ca=(0,f.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&ar(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),cb=(0,f.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&at(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),cc=(0,f.useCallback)(async()=>{try{let[a,b,c,d]=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"})]),e=await a.json(),f=await b.json(),g=await c.json(),h=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===L);P(a)}c.ok&&V(g.proxyPools||[]);let i=(h.providerStrategies||{})[L]||{};aZ(i.fallbackStrategy||null),a_(null!=i.stickyRoundRobinLimit?String(i.stickyRoundRobinLimit):"1"),a1(!0===i.earliestExpiryFirst);let j=(h.providerThinking||{})[L]||{};a3(j.mode||"auto");let k=I[L],l=k&&h[k]||{};if(a5({enabled:!0===l.enabled,connections:l.connections||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===L)||null;if(!a&&bY)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===L)||null))break}T(a)}}catch(a){console.log("Error fetching connections:",a)}finally{R(!1)}},[L,bY]),cd=(0,f.useCallback)(async()=>{await cc(),await b4()},[cc,b4]),ce=async a=>{try{let b=await fetch(`/api/provider-nodes/${L}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(T(c.node),await cc(),al(!1))}catch(a){console.log("Error updating provider node:",a)}},cf=async(a,b,c=a0)=>{try{let d=await fetch("/api/settings",{cache:"no-store"}),e=(d.ok?await d.json():{}).providerStrategies||{},f={...e[L]||{}};a?f.fallbackStrategy=a:delete f.fallbackStrategy,"round-robin"===a&&""!==b?f.stickyRoundRobinLimit=Number(b)||3:delete f.stickyRoundRobinLimit,c?f.earliestExpiryFirst=!0:delete f.earliestExpiryFirst;let g={...e};0===Object.keys(f).length?delete g[L]:g[L]=f,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:g})})}catch(a){console.log("Error saving provider strategy:",a)}},cg=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[L]={mode:a}:delete c[L],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},ch=async a=>{let b=I[L];if(b){a5(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},ci=async(a,b,c=bV)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await ca();else{let b=await a.json();N.error(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},cj=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await ca()}catch(a){console.log("Error deleting alias:",a)}},ck=async(a,b="llm",c=b1,d={},e)=>{try{let f={providerAlias:c,id:a,type:b};if(void 0!==e&&(f.enabled=e),d&&"object"==typeof d)for(let a of["vision","reasoning","contextWindow","maxOutput","thinkingFormat"])void 0!==d[a]&&(f[a]=d[a]);let g=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(g.ok)await cb();else{let a=await g.json();N.error(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},cl=async(a,b="llm",c=b1)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await cb()}catch(a){console.log("Error deleting custom model:",a)}},cm=async(a,b,c="llm")=>{try{(await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b1,id:a,type:c,enabled:b})})).ok&&await cb()}catch(a){console.log("Error toggling custom model:",a)}},cn=(a,b="llm")=>{bh({title:a?(0,r.Tl)("Enable all custom models?"):(0,r.Tl)("Disable all custom models?"),message:a?(0,r.Tl)("All custom models of this provider will be listed in /v1/models and exposed to clients."):(0,r.Tl)("All custom models of this provider will disappear from /v1/models until re-enabled. Clients will no longer see them."),onConfirm:async()=>{bh(null);try{(await fetch("/api/models/custom/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b1,type:b,enabled:a})})).ok&&await cb()}catch(a){console.log("Error bulk-updating custom models:",a)}}})},co=async()=>{if(bv)return;let a=O.find(a=>!1!==a.isActive);if(!a)return void N.warning((0,r.Tl)("Please add an active Qoder connection first"));bw(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void N.error(c.error||(0,r.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void N.warning((0,r.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;if(!b)continue;let c=b.replace(/^qoder\//,"");as.some(a=>a.providerAlias===b1&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(aq).includes(`${b1}/${c}`)||(await ck(c,"llm",b1,{},!1),e+=1)}0===e?N.warning((0,r.Tl)("All models already exist, no new models added")):N.success((0,r.Tl)("Successfully added")+` ${e} `+(0,r.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),N.error((0,r.Tl)("Error fetching models")+": "+a.message)}finally{bw(!1)}},cp="opencode-go"===L||"bai"===L||"cline"===L,cq=async()=>{if(a8)return;let a=O.find(a=>!1!==a.isActive);if(!a?.id)return void N.warning((0,r.Tl)("Add a connection to enable importing models."));a9(!0);try{let b=await fetch(`/api/providers/${a.id}/models`,{cache:"no-store"}),c=await b.json();if(!b.ok)throw Error(c?.error||`Request failed: ${b.status}`);let d=(Array.isArray(c.models)?c.models:[]).map(a=>{let b=a?.id||a?.name||a?.model;return b?{...a,id:String(b),name:a.name||String(b)}:null}).filter(Boolean);a7(d),N.success(`${(0,r.Tl)("Models refreshed")} (${d.length})`)}catch(a){N.error((0,r.Tl)("Failed to fetch models")+": "+a.message)}finally{a9(!1)}},cr=async()=>{if(bk||0===O.length)return;let a=Object.fromEntries(O.map(a=>[a.id,{state:"queued",error:null}]));bu.current=!1,bl(!0),bn(!1),bp(null),br(a),bt({total:O.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<O.length;a+=1){if(bu.current){bt({total:O.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=O[a];bp(d.id),br(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,br(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,br(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}bt({total:O.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<O.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{bp(null),bl(!1),bn(!1),bu.current=!1}},cs=async a=>{bh({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{bh(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&P(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},ct=()=>{cc(),X(!1)},cu=async a=>{ad("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:L,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await cd(),ab(!1);return}ad(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),ad("Failed to save connection")}},cv=async a=>{try{(await fetch(`/api/providers/${ao.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await cc(),aj(!1))}catch(a){console.log("Error updating connection:",a)}},cw=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&P(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},cx=async(a,b)=>{let c=[...O];[c[a],c[b]]=[c[b],c[a]],P(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await cc()}},cy=O.filter(a=>aS.includes(a.id)),cz=O.length>0&&aS.length===O.length;(()=>{if(0===cy.length)return;let a=new Set(cy.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return;let c=U.find(a=>a.id===b);return c?.name}})();let cA=()=>{aW||an(!1)},cB=async a=>{aX(!0);try{let b=0;for(let{connectionId:c,proxyPoolId:d}of a)try{(await fetch(`/api/providers/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:d})})).ok||(b+=1)}catch(a){console.log("Error applying proxy for",c,a),b+=1}b>0&&alert(`Updated with ${b} failed request(s).`),await cc(),an(!1)}finally{aX(!1)}},cC=a=>{let b=O.map(b=>({connectionId:b.id,proxyPoolId:a}));return cB(b)},cD=(0,e.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:O.map((a,b)=>{let c;return(0,e.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,e.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,e.jsx)("input",{type:"checkbox",checked:(c=a.id,aS.includes(c)),onChange:()=>{var b;return b=a.id,void aT(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,e.jsx)("div",{className:"flex-1 min-w-0",children:(0,e.jsx)(z.A,{connection:a,proxyPools:U,isOAuth:bN,isFirst:0===b,isLast:b===O.length-1,onMoveUp:()=>cx(b,b-1),onMoveDown:()=>cx(b,b+1),onToggleActive:b=>cw(a.id,b),autoPing:I[L]&&"oauth"===a.authType?{on:!0===a4.connections[a.id],onToggle:b=>{var c;return c=a.id,void ch({...a4,connections:{...a4.connections,[c]:b}})},provider:L}:null,onUpdateProxy:async b=>{try{(await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:b||null})})).ok&&P(c=>c.map(c=>c.id===a.id?{...c,providerSpecificData:{...c.providerSpecificData,proxyPoolId:b||null}}:c))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{ap(a),aj(!0)},onDelete:()=>cs(a.id),oneByOneStatus:bq[a.id]||null})})]},a.id)})}),cE=U.filter(a=>!0===a.isActive),cF=(0,e.jsx)(l.aF,{isOpen:am,onClose:cA,title:`Apply Proxy (${O.length} connections)`,children:(0,e.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,e.jsxs)("div",{className:"flex flex-col",children:[(0,e.jsxs)("button",{onClick:()=>{let a=U.filter(a=>!0===a.isActive);if(0===a.length)return void N.warning("No active proxy pools available.");let b=O.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id}));return cB(b)},disabled:aW||0===cE.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,e.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,e.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,e.jsxs)("button",{onClick:()=>cC(null),disabled:aW,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,e.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,e.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),U.map(a=>(0,e.jsxs)("button",{onClick:()=>cC(a.id),disabled:aW||!0!==a.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,e.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,e.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,e.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),aW&&(0,e.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,e.jsx)(l.$n,{onClick:cA,variant:"ghost",fullWidth:!0,disabled:aW,children:"Cancel"})]})}),cG=async a=>{if(!aO.has(a)){aP(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b1}/${a}`})}),c=await b.json();aL(b=>({...b,[a]:c.ok?"ok":"error"})),aN(c.ok?"":c.error||"Model not reachable")}catch{aL(b=>({...b,[a]:"error"})),aN("Network error")}finally{aP(b=>{let c=new Set(b);return c.delete(a),c})}}};if(Q)return(0,e.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,e.jsx)(l.Qv,{}),(0,e.jsx)(l.Qv,{})]});if(!bL)return(0,e.jsxs)("div",{className:"text-center py-20",children:[(0,e.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,e.jsx)(i(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let cH=()=>bW&&bL.apiType?"responses"===bL.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":bX?"/providers/anthropic-m.png":(0,k.HY)(bL.id);return(0,e.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)(i(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,e.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,e.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${bL.color}15`},children:aI||!cH()?(0,e.jsx)("span",{className:"text-sm font-bold",style:{color:bL.color},children:bL.textIcon||bL.id.slice(0,2).toUpperCase()}):(0,e.jsx)(j.default,{src:cH(),alt:bL.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,k.Kw)(bL.id),aJ(!0)},loading:"lazy",decoding:"async"})}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,e.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:bL.name}),(bL.notice?.webUrl||bL.notice?.apiKeyUrl||bL.notice?.signupUrl||bL.website)&&(0,e.jsxs)("a",{href:bL.notice?.webUrl||bL.notice?.apiKeyUrl||bL.notice?.signupUrl||bL.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),bL.notice?.webUrl?"Web console":bL.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]}),(0,e.jsx)(l.N5,{code:bL.notice?.inviteCode})]}),(0,e.jsxs)("p",{className:"text-text-muted",children:[O.length," connection",1===O.length?"":"s"]})]})]})]}),bL.deprecated&&(0,e.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,e.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,e.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:bL.deprecationNotice})]}),bL.notice?.text&&!bL.deprecated&&(0,e.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,e.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,e.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:(0,r.Tl)(bL.notice.text)}),bL.notice.apiKeyUrl&&(0,e.jsx)("a",{href:bL.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:(0,r.Tl)("Get API Key →")}),(0,e.jsx)(l.N5,{code:bL.notice?.inviteCode})]}),bY&&S&&(0,e.jsx)(l.Zp,{children:(0,e.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:bX?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,e.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bX?"Messages API":"responses"===S.apiType?"Responses API":"Chat Completions"," \xb7 ",(S.baseUrl||"").replace(/\/$/,""),"/",bX?"messages":"responses"===S.apiType?"responses":"chat/completions"]})]}),(0,e.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,e.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>{ad(""),ab(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>al(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{bh({title:"Delete Compatible Node",message:`Delete this ${bX?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{bh(null);try{(await fetch(`/api/provider-nodes/${L}`,{method:"DELETE"})).ok&&K.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bP?(0,e.jsx)(l.gw,{providerId:L}):(0,e.jsxs)(l.Zp,{children:[(0,e.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,e.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[O.length>0&&U.length>0&&(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>an(!0),children:"Apply Proxy"}),O.length>0&&(0,e.jsxs)(e.Fragment,{children:[aS.length>0&&(0,e.jsxs)(l.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=aS.length;0!==a&&bh({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{bh(null);let a=0,b=[...aS];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}P(a=>a.filter(a=>!b.includes(a.id))),aT([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},children:["Delete Selected (",aS.length,")"]}),(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:cr,disabled:bk,children:bk?(0,r.Tl)("Testing Connection One-by-One..."):(0,r.Tl)("Test Connection One-by-One")}),bk&&(0,e.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{bk&&(bu.current=!0,bn(!0))},disabled:bm,children:bm?(0,r.Tl)("Stopping..."):(0,r.Tl)("Stop")})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("span",{className:"text-xs text-text-muted font-medium",title:(0,r.Tl)("Prioritize accounts with quota packages that expire soonest"),children:(0,r.Tl)("Earliest Expiry First")}),(0,e.jsx)(l.lM,{checked:a0,onChange:a=>{a1(a),cf(aY,a$,a)}})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("span",{className:"text-xs text-text-muted font-medium",children:(0,r.Tl)("Round Robin")}),(0,e.jsx)(l.lM,{checked:"round-robin"===aY,onChange:a=>{let b=a?"round-robin":null,c=a?a$||"1":a$;a&&!a$&&a_("1"),aZ(b),cf(b,c,a0)}}),"round-robin"===aY&&(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)("span",{className:"text-xs text-text-muted",children:(0,r.Tl)("Sticky:")}),(0,e.jsx)("input",{type:"number",min:1,value:a$,onChange:a=>{var b;return b=a.target.value,void(a_(b),cf("round-robin",b,a0))},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===O.length?(0,e.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:bN?"lock":"key"})}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bZ&&(0,e.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",b$," or ",b_,"."]})]})]}),(0,e.jsx)("div",{className:"flex gap-2",children:bZ?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bA,children:b$}),(0,e.jsx)(l.$n,{size:"sm",icon:"key",onClick:bB,children:b_}),bR&&!bS&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>bE("export"),children:(0,r.Tl)("Export")}),(0,e.jsx)(l.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>{bI("import"),bG(!0)},children:(0,r.Tl)("Import")})]}),bS&&bK()]}):(0,e.jsxs)(e.Fragment,{children:[!bY&&"iflow"===L&&(0,e.jsx)(l.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>_(!0),children:"Cookie"}),"codex"===L&&(0,e.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>af(!0),children:(0,r.Tl)("Bulk Add")}),(0,e.jsx)(l.$n,{size:"sm",icon:"add",onClick:bC,children:bY?"Add API Key":"iflow"===L?"OAuth":"Add Connection"})]})})]}):(0,e.jsxs)(e.Fragment,{children:[bs&&(0,e.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,e.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,e.jsxs)("span",{children:[(0,r.Tl)("Total:")," ",bs.total]}),(0,e.jsxs)("span",{children:[(0,r.Tl)("Completed:")," ",bs.completed]}),(0,e.jsxs)("span",{children:[(0,r.Tl)("Passed:")," ",bs.passed]}),(0,e.jsxs)("span",{children:[(0,r.Tl)("Failed:")," ",bs.failed]}),bs.stopped&&(0,e.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:(0,r.Tl)("Stopped")}),bk&&bo&&(0,e.jsxs)("span",{children:[(0,r.Tl)("Running:")," ",O.find(a=>a.id===bo)?.name||bo]})]})}),O.length>0&&(0,e.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,e.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,e.jsx)("input",{type:"checkbox",checked:cz,onChange:()=>{cz?aT([]):aT(O.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),cD,!bY&&(0,e.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===L&&(0,e.jsx)(l.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>_(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===L&&(0,e.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>af(!0),title:(0,r.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,r.Tl)("Bulk Add")}),bZ?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bA,className:"w-full sm:w-auto",children:b$}),(0,e.jsx)(l.$n,{size:"sm",icon:"key",onClick:bB,className:"w-full sm:w-auto",children:b_}),bR&&!bS&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>bE("export"),className:"w-full sm:w-auto",children:(0,r.Tl)("Export")}),(0,e.jsx)(l.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>{bI("import"),bG(!0)},className:"w-full sm:w-auto",children:(0,r.Tl)("Import")})]}),bS&&bK()]}):(0,e.jsx)(l.$n,{size:"sm",icon:"add",onClick:bC,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,e.jsxs)(l.Zp,{children:[(0,e.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),b2&&(0,e.jsx)("select",{value:a2,onChange:a=>{var b;return b=a.target.value,void(a3(b),cg(b))},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:b2.map(a=>(0,e.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),!bY&&(a=[...bU,...bc.filter(a=>!bU.some(b=>b.id===a.id))].filter(a=>{let b=(0,n.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!be.includes(a)),c=(b=as.filter(a=>a?.providerAlias===b1&&"llm"===(a.kind||a.type||"llm"))).filter(a=>!1!==a.enabled).map(a=>a.id),d=b.filter(a=>!1===a.enabled).map(a=>a.id),h=be.length>0||d.length>0,x=a.length>0||c.length>0,(0,e.jsxs)("div",{className:"flex gap-2",children:[h&&(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>b9(d),children:"Active All"}),x&&(0,e.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>b8(a,c),children:"Disable All"})]}))]}),!!aM&&(G=(0,u.O)(aM),H=function(a){if(!a)return"";let b=(0,v.DY)(a);if(b&&b!==a)return b;let c=(0,r.Tl)(a);if(c&&c!==a)return c;let d=String(a).match(/^HTTP\s+\d+:\s*(?:\[(?:\d+|[A-Z0-9_]+)\]:\s*)?(.*)$/i);if(d&&d[1]){let a=d[1].trim(),b=(0,r.Tl)(a);if(b&&b!==a)return b}return(0,r.Tl)(a)}(aM),(0,e.jsxs)("p",{className:"text-xs text-red-500 mb-3 break-words",children:[H," ",G&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("a",{href:G,target:"_blank",rel:"noopener noreferrer",title:(0,r.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"text-blue-500 underline hover:text-blue-400",children:(0,r.Tl)("Verify your account")})," ",(0,e.jsx)("button",{type:"button",onClick:()=>by(G,"verification"),className:"text-text-muted underline hover:text-primary",children:"verification"===bx?(0,r.Tl)("Copied"):(0,r.Tl)("Copy link")}),(0,e.jsxs)("span",{className:"text-text-muted",children:[" ","(",(0,r.Tl)("Recommended: open in an incognito window and sign in with the affected account"),")"]})]})]})),(()=>{let a,b,c;if(bY)return(0,e.jsx)(y.A,{providerStorageAlias:b1,providerDisplayAlias:b3,modelAliases:aq,customModels:as,copied:bx,onCopy:by,onSetAlias:ci,onDeleteAlias:cj,onAddCustomModel:(a,b)=>ck(a,"llm",b1,{},b),onToggleCustomModel:cm,onDeleteCustomModel:a=>cl(a,"llm",b1),onBulkCustomModels:cn,connections:O,isAnthropic:bX});let d=[...bU,...bc.filter(a=>!bU.some(b=>b.id===a.id))].filter(a=>{let b=(0,n.CP)(a);return!b||"llm"===b}),f=new Set(be),g=d.filter(a=>!f.has(a.id)),h=d.filter(a=>f.has(a.id)),i=(0,t.R)({customModels:as,modelAliases:aq,providerAlias:b1,builtInModels:bU,type:"llm"}),j=i.filter(a=>!1!==a.enabled),k=i.filter(a=>!1===a.enabled);return(0,e.jsxs)("div",{className:"flex flex-wrap gap-3",children:[j.length+k.length>0&&(0,e.jsxs)("div",{className:"w-full flex items-center gap-2 text-xs text-text-muted -mb-1",children:[(0,e.jsxs)("span",{children:[(0,r.Tl)("Custom models")," (",j.length+k.length,")"]}),(0,e.jsx)("span",{children:"\xb7"}),(0,e.jsx)("button",{onClick:()=>cn(!0),className:"text-primary hover:underline",children:(0,r.Tl)("Enable all")}),(0,e.jsx)("span",{children:"\xb7"}),(0,e.jsx)("button",{onClick:()=>cn(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,r.Tl)("Disable all")})]}),j.map(a=>(0,e.jsx)(w.A,{model:{id:a.id,name:a.name},fullModel:`${b3}/${a.id}`,alias:a.alias,copied:bx,onCopy:by,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?cl(a.id,"llm",b1):cj(a.alias)},testStatus:aK[a.id],onTest:O.length>0||bP?()=>cG(a.id):void 0,isTesting:aO.has(a.id),isCustom:!0,isFree:!1,caps:M(`${L}/${a.id}`),thinkingSuffix:b0(a.id)},`${a.source}-${a.fullModel}`)),g.map(a=>{let b=`${b1}/${a.id}`,c=`${L}/${a.id}`,d=Object.entries(aq).find(([,a])=>a===b||a===c)?.[0];return(0,e.jsx)(w.A,{model:a,fullModel:`${b3}/${a.id}`,alias:d,copied:bx,onCopy:by,onSetAlias:b=>ci(a.id,b,b1),onDeleteAlias:()=>cj(d),testStatus:aK[a.id],onTest:O.length>0||bP?()=>cG(a.id):void 0,isTesting:aO.has(a.id),isFree:a.isFree,onDisable:()=>b5(a.id),caps:M(`${L}/${a.id}`),thinkingSuffix:b0(a.id)},a.id)}),(0,e.jsxs)("button",{onClick:()=>aR(!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,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"cline"===L&&O.some(a=>!1!==a.isActive)&&(0,e.jsxs)("button",{onClick:cq,disabled:a8,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,e.jsx)("span",{className:"material-symbols-outlined text-sm",style:a8?{animation:"spin 1s linear infinite"}:void 0,children:a8?"progress_activity":"download"}),a8?(0,r.Tl)("Importing..."):(0,r.Tl)("Import from /models")]}),"qoder"===L&&O.some(a=>!1!==a.isActive)&&(0,e.jsxs)("button",{onClick:co,disabled:bv,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,e.jsx)("span",{className:"material-symbols-outlined text-sm",style:bv?{animation:"spin 1s linear infinite"}:void 0,children:bv?"progress_activity":"download"}),bv?(0,r.Tl)("Fetching..."):(0,r.Tl)("Fetch Qoder Models")]}),cp&&"cline"!==L&&(0,e.jsxs)("button",{onClick:cq,disabled:a8||!O.some(a=>!1!==a.isActive),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,e.jsx)("span",{className:"material-symbols-outlined text-sm",style:a8?{animation:"spin 1s linear infinite"}:void 0,children:a8?"progress_activity":"refresh"}),a8?(0,r.Tl)("Refreshing..."):(0,r.Tl)("Refresh Official Models")]}),a6.length>0&&(a=new Set([...Object.values(aq),...i.map(a=>a.fullModel)]),b=new Set(bU.map(a=>a.id)),c=a6.filter(c=>!a.has(`${b1}/${c.id}`)&&!b.has(c.id)),0===c.length?null:(0,e.jsxs)("div",{className:"w-full mt-2",children:[(0,e.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,e.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,e.jsxs)("button",{onClick:async()=>{await ck(a.id,"llm",b1)},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:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),(h.length>0||k.length>0)&&(0,e.jsxs)("div",{className:"w-full mt-2",children:[(0,e.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",h.length+k.length,"):"]}),(0,e.jsxs)("div",{className:"flex flex-wrap gap-3",children:[k.map(a=>(0,e.jsx)(w.A,{model:{id:a.id,name:a.name},fullModel:`${b3}/${a.id}`,copied:bx,onCopy:by,testStatus:aK[a.id],onTest:O.length>0||bP?()=>cG(a.id):void 0,isTesting:aO.has(a.id),onEnable:()=>cm(a.id,!0),isCustom:!1,isFree:!1},`custom-${a.fullModel}`)),h.map(a=>(0,e.jsx)(w.A,{model:a,fullModel:`${b3}/${a.id}`,copied:bx,onCopy:by,testStatus:aK[a.id],onTest:O.length>0||bP?()=>cG(a.id):void 0,isTesting:aO.has(a.id),onEnable:()=>b6(a.id),isFree:a.isFree,caps:M(`${L}/${a.id}`),thinkingSuffix:b0(a.id)},a.id))]})]})]})})()]}),cF,"kiro"===L?(0,e.jsx)(l.Mh,{isOpen:W,providerInfo:bL,onSuccess:ct,onClose:()=>X(!1)}):"cursor"===L?(0,e.jsx)(l.G9,{isOpen:W,onSuccess:ct,onClose:()=>X(!1)}):"gitlab"===L?(0,e.jsx)(l.vj,{isOpen:W,providerInfo:bL,onSuccess:ct,onClose:()=>X(!1)}):(0,e.jsx)(l.LF,{isOpen:W,provider:L,providerInfo:bL,onSuccess:ct,onClose:()=>X(!1)}),"xiaomi-mimo"===L&&(0,e.jsx)(l.LH,{isOpen:Y,onSuccess:ct,onClose:()=>Z(!1)}),"iflow"===L&&(0,e.jsx)(l.vE,{isOpen:$,onSuccess:()=>{cc(),_(!1)},onClose:()=>_(!1)}),(0,e.jsx)(A.A,{isOpen:aa,provider:L,providerName:bL.name,isCompatible:bY,isAnthropic:bX,authType:bL?.authType,authHint:bL?.authHint,website:bL?.website,proxyPools:U,error:ac,existingNames:O.map(a=>a.name).filter(Boolean),onSave:cu,onBulkDone:cd,onClose:()=>{ad(""),ab(!1)}}),(0,e.jsx)(l.wI,{isOpen:ai,connection:ao,proxyPools:U,onSave:cv,onClose:()=>aj(!1)}),bY&&(0,e.jsx)(B.A,{isOpen:ak,node:S,onSave:ce,onClose:()=>al(!1),isAnthropic:bX}),!bY&&(0,e.jsx)(C.A,{isOpen:aQ,providerAlias:b1,providerDisplayAlias:b3,onSave:async a=>{await ck(a,"llm",b1),aR(!1)},onClose:()=>aR(!1)}),"codex"===L&&(0,e.jsx)(D.A,{isOpen:ae,onClose:()=>af(!1),onSuccess:cc}),"codebuddy-cn"===L&&(0,e.jsx)(E.A,{isOpen:ag,password:aG,onClose:()=>ah(!1),onSuccess:cc}),(0,e.jsx)(F.A,{isOpen:bF,mode:bH,provider:L,providerName:bL?.name,onClose:()=>bG(!1),onSuccess:cc}),(0,e.jsxs)(l.aF,{isOpen:aA.open,onClose:()=>aB({open:!1,action:null,value:""}),title:(0,r.Tl)("Confirm Password"),size:"sm",footer:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.$n,{variant:"ghost",onClick:()=>aB({open:!1,action:null,value:""}),children:(0,r.Tl)("Cancel")}),(0,e.jsx)(l.$n,{variant:"primary",onClick:bD,disabled:!aA.value||aC,children:aC?(0,r.Tl)("Verifying..."):(0,r.Tl)("Confirm")})]}),children:[(0,e.jsx)("p",{className:"text-text-muted mb-3 text-sm",children:(0,r.Tl)("Enter your dashboard password to export OAuth accounts (the file will be encrypted with the transfer passphrase you pick next).")}),(0,e.jsx)(l.pd,{type:"password",autoFocus:!0,value:aA.value,onChange:a=>aB(b=>({...b,value:a.target.value})),onKeyDown:a=>{"Enter"===a.key&&aA.value&&bD()},placeholder:(0,r.Tl)("Password")}),aE&&(0,e.jsx)("p",{className:"text-xs text-red-500 mt-2",children:aE})]}),(0,e.jsx)(l.uo,{isOpen:bi,onClose:()=>bj(!1),onConfirm:()=>{(bj(!1),bN)?bz():bB()},title:"Risk Notice",message:bL?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,e.jsx)(l.uo,{isOpen:!!bg,onClose:()=>bh(null),onConfirm:bg?.onConfirm,title:bg?.title||"Confirm",message:bg?.message,variant:"danger"})]})}d()}catch(a){d(a)}})},83919:(a,b,c)=>{"use strict";c.d(b,{k:()=>l});var d=c(59160),e=c(18982);c(87592);let f=["none","low","medium","high"],g=["none","thinking"],h=["none","low","medium","high","max"],i={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":h,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":f,zai:g,qwen:f,kimi:h,deepseek:["none","high","max"],minimax:g,hunyuan:f,step:f},j=["none","minimal","low","medium","high","xhigh","max"],k=[{provider:"codex",pattern:"*gpt-6*",levels:j},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...j,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...j,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:j},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*preview*",levels:["none","low","medium","high","xhigh"]},{provider:"amd",pattern:"DeepSeek-V4-Flash*",levels:["none","minimal","low","medium","high","xhigh","max"]},{provider:"amd",pattern:"Qwen3.8-Flash-Next",levels:["none","low","medium","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 l(a,b){if("kiro"===a&&null===function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=b.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!c)return null;let[,d,e]=c,f=Number(d),g=void 0===e?null:Number(e);return f<4||4===f&&(null===g||g<=5||null!==g&&g>=1e3)?null:"output_config"}(b))return null;let c=(0,d.nl)(a,b);if(!c.reasoning)return null;let g=k.find(c=>(!c.provider||c.provider===a)&&(0,e.gH)(c.pattern,b)),h=g?.levels||i[c.thinkingFormat]||f;return!1===c.thinkingCanDisable&&(h=h.filter(a=>"none"!==a)),h}},86266:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>n});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=c(92592),k=c(91914),l=c(99258),m=a([i]);i=(m.then?(await m)():m)[0];let o=`name1|sk-key1
9
9
  name2|sk-key2
10
- sk-key-only-auto-named`;function m({isOpen:a,provider:b,providerName:c,isCompatible:d,isAnthropic:g,authType:h,authHint:l,website:o,proxyPools:p,error:q,existingNames:r,onSave:s,onBulkDone:t,onClose:u}){let v="__none__",w="ollama-local"===b,x="cookie"===h,y="xai"===b&&!x,z=x?"Cookie Value":"qoder"===b?"Personal Access Token (PAT)":"API Key",A="azure"===b,B="cloudflare-ai"===b,C=j.Q2?.[b]?.regions||null,D=j.Q2?.[b]?.defaultRegion||C?.[0]?.id||"",[E,F]=(0,f.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:v,ollamaHostUrl:""}),[G,H]=(0,f.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,J]=(0,f.useState)({accountId:""}),[K,L]=(0,f.useState)(D),[M,N]=(0,f.useState)(!1),[O,P]=(0,f.useState)(null),[Q,R]=(0,f.useState)(null),[S,T]=(0,f.useState)(!1),[U,V]=(0,f.useState)(!1),W=B?`name1|sk-key1|acc123456
10
+ sk-key-only-auto-named`;function n({isOpen:a,provider:b,providerName:c,isCompatible:d,isAnthropic:g,authType:h,authHint:m,website:p,proxyPools:q,error:r,existingNames:s,onSave:t,onBulkDone:u,onClose:v}){let w="__none__",x="ollama-local"===b,y="cookie"===h,z="xai"===b&&!y,A=y?"Cookie Value":"qoder"===b?"Personal Access Token (PAT)":"API Key",B="azure"===b,C="cloudflare-ai"===b,D=j.Q2?.[b]?.regions||null,E=j.Q2?.[b]?.defaultRegion||D?.[0]?.id||"",[F,G]=(0,f.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:w,ollamaHostUrl:""}),[H,I]=(0,f.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[J,K]=(0,f.useState)({accountId:""}),[L,M]=(0,f.useState)(E),[N,O]=(0,f.useState)(!1),[P,Q]=(0,f.useState)(null),[R,S]=(0,f.useState)(!1),[T,U]=(0,f.useState)(null),[V,W]=(0,f.useState)(null),[X,Y]=(0,f.useState)(!1),[Z,$]=(0,f.useState)(!1),_=C?`name1|sk-key1|acc123456
11
11
  name2|sk-key2|def789012
12
12
  sk-key-only-auto-named`:"qoder"===b?`name1|pt-xxxxx
13
13
  name2|pt-yyyyy
14
- pt-only-auto-named`:n,[X,Y]=(0,f.useState)("single"),[Z,$]=(0,f.useState)(""),[_,aa]=(0,f.useState)(null),ab=()=>w&&E.ollamaHostUrl.trim()?{baseUrl:E.ollamaHostUrl.trim()}:A?{azureEndpoint:G.azureEndpoint,apiVersion:G.apiVersion,deployment:G.deployment,organization:G.organization}:B?{accountId:I.accountId}:C&&K?{region:K}:void 0,ac=async()=>{N(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:E.apiKey,providerSpecificData:ab()})}),c=await a.json();P(c.valid?"success":"failed"),R(c.valid?null:c.error||null),T(!!c.maintenance)}catch{P("failed"),R(null),T(!1)}finally{N(!1)}},ad=async()=>{if(b&&(w||E.apiKey)&&(w||E.name)&&(!d||E.defaultModel.trim())){V(!0);try{let a=!1;try{N(!0),P(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:E.apiKey,providerSpecificData:ab()})});a=!!(await c.json()).valid,P(a?"success":"failed")}catch{P("failed")}finally{N(!1)}await s({name:E.name||(w?"Ollama Local":""),apiKey:E.apiKey,defaultModel:d?E.defaultModel.trim():void 0,priority:E.priority,proxyPoolId:E.proxyPoolId===v?null:E.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:ab()})}finally{V(!1)}}},ae=async()=>{let a=Z.split("\n");if(!a.length)return;let c=(0,k.P)(a,r,{isCloudflareAi:B});if(!c.length)return;V(!0),aa(null);let d=0,e=0;for(let a of c)try{let c=!1;try{let d=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey})});c=!!(await d.json().catch(()=>({}))).valid}catch{c=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey,name:a.name,priority:1,testStatus:c?"active":"unknown",...a.providerSpecificData?{providerSpecificData:a.providerSpecificData}:{}})})).ok?d++:e++}catch{e++}V(!1),aa({success:d,failed:e}),d>0&&t&&t()};return b?(0,e.jsx)(i.aF,{isOpen:a,title:`Add ${c||b} ${z}`,onClose:u,children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{size:"sm",variant:"single"===X?"primary":"ghost",onClick:()=>{Y("single"),aa(null)},children:"Single"}),(0,e.jsx)(i.$n,{size:"sm",variant:"bulk"===X?"primary":"ghost",onClick:()=>{Y("bulk"),aa(null)},children:"Bulk Add"})]}),"bulk"===X&&(0,e.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,e.jsx)("p",{className:"text-xs text-text-muted",children:B?(0,e.jsxs)(e.Fragment,{children:["One key per line. Format: ",(0,e.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,e.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===b?(0,e.jsxs)(e.Fragment,{children:["One PAT per line. Format: ",(0,e.jsx)("code",{children:"name|pt-..."})," or just ",(0,e.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,e.jsxs)(e.Fragment,{children:["One key per line. Format: ",(0,e.jsx)("code",{children:"name|apiKey"})," or just ",(0,e.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,e.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:W,value:Z,onChange:a=>$(a.target.value)}),_&&(0,e.jsxs)("div",{className:`text-sm font-medium ${_.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",_.success," added",_.failed>0?`, ✗ ${_.failed} failed`:""]}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{onClick:ae,fullWidth:!0,disabled:U||!Z.trim(),children:U?"Adding...":"Add All Keys"}),(0,e.jsx)(i.$n,{onClick:u,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===X&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i.pd,{label:"Name",value:E.name,onChange:a=>F({...E,name:a.target.value}),placeholder:w?"Ollama Local":"Production Key"}),w&&(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.pd,{label:"Ollama Host URL",value:E.ollamaHostUrl,onChange:a=>F({...E,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,e.jsx)("div",{className:"pt-6",children:(0,e.jsx)(i.$n,{onClick:ac,disabled:M||U,variant:"secondary",children:M?"Checking...":"Check"})})]}),!w&&(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.pd,{label:z,type:x?"text":"password",value:E.apiKey,onChange:a=>F({...E,apiKey:a.target.value}),placeholder:x?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":y?"xai-...":"qoder"===b?"pt-...":"",className:"flex-1"}),(0,e.jsx)("div",{className:"pt-6",children:(0,e.jsx)(i.$n,{onClick:ac,disabled:!E.apiKey||M||U,variant:"secondary",children:M?"Checking...":"Check"})})]}),y&&(0,e.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."}),x&&l&&(0,e.jsxs)("p",{className:"text-xs text-text-muted",children:[l,o&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",o.replace(/^https?:\/\//,"")]})]})]}),C&&(0,e.jsx)(i.l6,{label:"Region",value:K,onChange:a=>L(a.target.value),options:C.map(a=>({value:a.id,label:a.label}))}),d&&(0,e.jsx)(i.pd,{label:"Default Model",value:E.defaultModel,onChange:a=>F({...E,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),w&&(0,e.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,e.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,e.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),O&&(0,e.jsx)(i.Ex,{variant:"success"===O?"success":S?"warning":"error",children:"success"===O?"Valid":S?"Check endpoint":"Invalid"}),S&&Q&&(0,e.jsx)("p",{className:"text-xs text-amber-500 break-words",children:Q}),q&&(0,e.jsx)("p",{className:"text-xs text-red-500 break-words",children:q}),d&&(0,e.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."}),B&&(0,e.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,e.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,e.jsx)(i.pd,{label:"Account ID",value:I.accountId,onChange:a=>J({...I,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,e.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,e.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),A&&(0,e.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,e.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,e.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,e.jsx)(i.pd,{label:"Azure Endpoint",value:G.azureEndpoint,onChange:a=>H({...G,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,e.jsx)(i.pd,{label:"Deployment Name",value:G.deployment,onChange:a=>H({...G,deployment:a.target.value}),placeholder:"gpt-4"}),(0,e.jsx)(i.pd,{label:"API Version",value:G.apiVersion,onChange:a=>H({...G,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,e.jsx)(i.pd,{label:"Organization",value:G.organization,onChange:a=>H({...G,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,e.jsx)(i.pd,{label:"Priority",type:"number",value:E.priority,onChange:a=>F({...E,priority:Number.parseInt(a.target.value)||1})}),(0,e.jsx)(i.l6,{label:"Proxy Pool",value:E.proxyPoolId,onChange:a=>F({...E,proxyPoolId:a.target.value}),options:[{value:v,label:"None"},...(p||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(p||[]).length&&(0,e.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,e.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{onClick:ad,fullWidth:!0,disabled:U||!w&&(!E.name||!E.apiKey)||d&&!E.defaultModel.trim()||A&&(!G.azureEndpoint||!G.deployment||!G.organization)||B&&!I.accountId,children:U?"Saving...":"Save"}),(0,e.jsx)(i.$n,{onClick:u,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}m.propTypes={isOpen:h().bool.isRequired,provider:h().string,providerName:h().string,isCompatible:h().bool,isAnthropic:h().bool,authType:h().string,authHint:h().string,website:h().string,proxyPools:h().arrayOf(h().shape({id:h().string,name:h().string})),error:h().string,existingNames:h().arrayOf(h().string),onSave:h().func.isRequired,onBulkDone:h().func,onClose:h().func.isRequired},d()}catch(a){d(a)}})},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},91914:(a,b,c)=>{"use strict";function d(a,b,c={}){let{isCloudflareAi:e=!1}=c,f=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),g=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let d=function(a,b={}){let{isCloudflareAi:c=!1}=b,d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:e});if(!d||!d.apiKey)continue;let h=d.baseName,i=1;for(;a=`${h} ${i}`,f.has(a.toLowerCase());)i+=1;f.add(a.toLowerCase());let j={name:a,apiKey:d.apiKey,skipped:!1};d.providerSpecificData&&(j.providerSpecificData=d.providerSpecificData),g.push(j)}return g}c.d(b,{P:()=>d})},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"F:\\\\Files\\\\GitHub Files\\\\10router\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\providers\\\\[id]\\\\page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"F:\\Files\\GitHub Files\\10router\\src\\app\\(dashboard)\\dashboard\\providers\\[id]\\page.js","default")},93848:(a,b,c)=>{"use strict";c.d(b,{o:()=>e});let d=new Map;async function e(a){if(!a?.url||!a?.type)return[];let b=d.get(a.url);if(b&&Date.now()<b.expiresAt)return b.data;try{let b=new URLSearchParams({url:a.url,type:a.type}),c=await fetch(`/api/providers/suggested-models?${b}`);if(!c.ok)return[];let e=(await c.json()).data??[];return d.set(a.url,{data:e,expiresAt:Date.now()+6e5}),e}catch{return[]}}},94317:(a,b,c)=>{"use strict";function d(a,b){if(!b||"number"!=typeof a||Number.isNaN(a))return!1;let{from:c,to:d}=b;return c<=d?a>=c&&a<d:a>=c||a<d}c.d(b,{X:()=>d})},94735:a=>{"use strict";a.exports=require("events")},95296:(a,b,c)=>{"use strict";c.a(a,async(a,b)=>{try{var d=c(48249),e=(c(67484),c(49885)),f=c.n(e),g=c(94579),h=(c(18753),a([g]));g=(h.then?(await h)():h)[0],f().string.isRequired,f().string.isRequired,f().string,f().func.isRequired,f().func.isRequired,f().func,f().oneOf(["ok","error"]),f().bool,f().string.isRequired,f().object.isRequired,f().arrayOf(f().object),f().string,f().func.isRequired,f().func.isRequired,f().func.isRequired,f().func.isRequired,b()}catch(a){b(a)}})},98376:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>o});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=c(41371),k=c(18753),l=c(99258),m=a([i]);function n({modelId:a,fullModel:b,copied:c,onCopy:d,onDeleteAlias:f,onToggle:g,enabled:h=!0,onTest:i,testStatus:j,isTesting:k}){let l="ok"===j?"#22c55e":"error"===j?"#ef4444":void 0;return(0,e.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===j?"border-green-500/40":"error"===j?"border-red-500/40":"border-border"} hover:bg-sidebar/50 ${h?"":"opacity-60"}`,children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:l?{color:l}:void 0,children:"ok"===j?"check_circle":"error"===j?"cancel":"smart_toy"}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,e.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,e.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,e.jsxs)("div",{className:"relative group/btn",children:[(0,e.jsx)("button",{onClick:()=>d(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,e.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:c===`model-${a}`?"Copied!":"Copy"})]}),i&&(0,e.jsxs)("div",{className:"relative group/btn",children:[(0,e.jsx)("button",{onClick:i,disabled:k,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",style:k?{animation:"spin 1s linear infinite"}:void 0,children:k?"progress_activity":"science"})}),(0,e.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:k?"Testing...":"Test"})]})]})]}),g&&(0,e.jsx)("button",{onClick:g,className:`p-1 rounded ${h?"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:h?"Disable model":"Activate model",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:h?"block":"restart_alt"})}),(0,e.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function o({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:d,copied:g,onCopy:h,onDeleteAlias:m,onAddCustomModel:p,onToggleCustomModel:q,onDeleteCustomModel:r,onBulkCustomModels:s,connections:t,isAnthropic:u}){let v=(0,j.i)(),[w,x]=(0,f.useState)(""),[y,z]=(0,f.useState)(!1),[A,B]=(0,f.useState)(!1),[C,D]=(0,f.useState)(null),[E,F]=(0,f.useState)({}),G=async b=>{if(!C){D(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();F(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{F(a=>({...a,[b]:"error"}))}finally{D(null)}}},H=(0,k.R)({customModels:d,modelAliases:c,providerAlias:a,type:"llm"}),I=H.filter(a=>!1!==a.enabled),J=H.filter(a=>!1===a.enabled),K=async()=>{if(!w.trim()||y)return;let a=w.trim();if(H.some(b=>b.id===a))return void v.warning("Model already exists for this provider.");z(!0);try{await p(a),x("")}catch(a){console.log("Error adding model:",a)}finally{z(!1)}},L=async()=>{if(A)return;let a=t.find(a=>!1!==a.isActive);if(a){B(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void v.error(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void v.warning("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(H.some(a=>a.id===b)||(await p(b,!1),e+=1))}0===e&&v.warning("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{B(!1)}}},M=t.some(a=>!1!==a.isActive);return(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",u?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,e.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,e.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,e.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,e.jsx)("input",{id:"new-compatible-model-input",type:"text",value:w,onChange:a=>x(a.target.value),onKeyDown:a=>"Enter"===a.key&&K(),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,e.jsx)(i.$n,{size:"sm",icon:"add",onClick:K,disabled:!w.trim()||y,children:y?"Adding...":"Add"}),(0,e.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"download",onClick:L,disabled:!M||A,children:A?"Importing...":"Import from /models"})]}),!M&&(0,e.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),H.length>0&&s&&(0,e.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,e.jsxs)("span",{children:[H.length," custom model",H.length>1?"s":""]}),(0,e.jsx)("span",{children:"\xb7"}),(0,e.jsx)("button",{onClick:()=>s(!0),className:"text-primary hover:underline",children:(0,l.Tl)("Enable all")}),(0,e.jsx)("span",{children:"\xb7"}),(0,e.jsx)("button",{onClick:()=>s(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,l.Tl)("Disable all")}),(0,e.jsxs)("span",{children:["— ",(0,l.Tl)("bulk actions affect what clients see in /v1/models")]})]}),I.length>0&&(0,e.jsx)("div",{className:"flex flex-col gap-3",children:I.map(({id:c,alias:d,source:f})=>(0,e.jsx)(n,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?r(c):m(d),onToggle:"custom"===f&&q?()=>q(c,!1):void 0,onTest:t.length>0?()=>G(c):void 0,testStatus:E[c],isTesting:C===c},`${f}-${a}/${c}`))}),J.length>0&&(0,e.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,e.jsx)("p",{className:"text-xs text-text-muted",children:"Disabled (activate to expose again):"}),J.map(({id:c,alias:d,source:f})=>(0,e.jsx)(n,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,enabled:!1,onDeleteAlias:()=>"custom"===f?r(c):m(d),onToggle:"custom"===f&&q?()=>q(c,!0):void 0,onTest:t.length>0?()=>G(c):void 0,testStatus:E[c],isTesting:C===c},`disabled-${f}-${a}/${c}`))]})]})}i=(m.then?(await m)():m)[0],o.propTypes={providerStorageAlias:h().string.isRequired,providerDisplayAlias:h().string.isRequired,modelAliases:h().object.isRequired,customModels:h().arrayOf(h().object),copied:h().string,onCopy:h().func.isRequired,onDeleteAlias:h().func.isRequired,onAddCustomModel:h().func.isRequired,onBulkCustomModels:h().func,onToggleCustomModel:h().func,onDeleteCustomModel:h().func.isRequired,connections:h().arrayOf(h().shape({id:h().string,isActive:h().bool})).isRequired,isAnthropic:h().bool},d()}catch(a){d(a)}})},99548:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>l});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=c(99258),k=a([i]);function l({isOpen:a,onClose:b,onSuccess:c,password:d=""}){let[g,h]=(0,f.useState)(""),[k,m]=(0,f.useState)(""),[n,o]=(0,f.useState)(!1),[p,q]=(0,f.useState)(""),[r,s]=(0,f.useState)(null),t=(0,f.useRef)(null),u=()=>{n||(h(""),m(""),q(""),s(null),t.current&&(t.current.value=""),b())},v=async()=>{let a;q(""),s(null);let b=g.trim();if(!b)return;try{a=JSON.parse(b)}catch(a){q(`${(0,j.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void q((0,j.Tl)("No accounts found in input"));o(!0);try{let a=await fetch("/api/oauth/codebuddy-cn/bulk-import",{method:"POST",headers:{"Content-Type":"application/json",...d?{"x-9r-password":d}:{}},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void q(401===a.status?(0,j.Tl)("Invalid password"):b?.error||`Request failed: ${a.status}`);s(b),(b.imported>0||b.updated>0)&&"function"==typeof c&&c()}catch(a){q(a.message||(0,j.Tl)("Request failed"))}finally{o(!1)}},w=r?.results?.filter(a=>!a.ok)||[],x=r?.skipped??0;return(0,e.jsx)(i.aF,{isOpen:a,title:(0,j.Tl)("Import CodeBuddy CN Accounts"),onClose:u,children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)(i.$n,{variant:"secondary",fullWidth:!0,icon:"upload_file",onClick:()=>t.current?.click(),disabled:n,children:k||(0,j.Tl)("Choose JSON file...")}),(0,e.jsx)("input",{ref:t,type:"file",accept:".json,application/json",className:"hidden",onChange:a=>{let b=a.target.files?.[0];if(!b)return;m(b.name),q(""),s(null);let c=new FileReader;c.onload=()=>h(String(c.result||"")),c.onerror=()=>q((0,j.Tl)("Failed to read file")),c.readAsText(b)}})]}),(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)("div",{className:"absolute -top-2 left-2 bg-sidebar px-1 text-[10px] text-text-muted",children:(0,j.Tl)("Or paste JSON")}),(0,e.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:g,onChange:a=>h(a.target.value),disabled:n})]}),p&&(0,e.jsx)("p",{className:"text-xs text-red-500 break-words",children:p}),r&&(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsxs)("div",{className:`text-sm font-medium ${r.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",r.imported," ",(0,j.Tl)("added"),", ",r.updated," ",(0,j.Tl)("updated"),x>0?`, ${x} ${(0,j.Tl)("skipped")}`:"",r.failed>0?`, ✗ ${r.failed} ${(0,j.Tl)("failed")}`:""]}),w.length>0&&(0,e.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:w.map(a=>(0,e.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:n||!g.trim(),children:n?(0,j.Tl)("Importing..."):(0,j.Tl)("Import All")}),(0,e.jsx)(i.$n,{onClick:u,variant:"ghost",fullWidth:!0,disabled:n,children:(0,j.Tl)("Close")})]})]})})}i=(k.then?(await k)():k)[0],l.propTypes={isOpen:h().bool.isRequired,onClose:h().func.isRequired,onSuccess:h().func,password:h().string},d()}catch(a){d(a)}})}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1260,2430,4613,8410,877,1220,5781,7805,3879,6070,869,7239,6457,4123,1377,6960,8990],()=>b(b.s=34714));module.exports=c})();
14
+ pt-only-auto-named`:o,[aa,ab]=(0,f.useState)("single"),[ac,ad]=(0,f.useState)(""),[ae,af]=(0,f.useState)(null),ag=()=>x&&F.ollamaHostUrl.trim()?{baseUrl:F.ollamaHostUrl.trim()}:B?{azureEndpoint:H.azureEndpoint,apiVersion:H.apiVersion,deployment:H.deployment,organization:H.organization}:C?{accountId:J.accountId}:D&&L?{region:L}:void 0,ah=async()=>{S(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:F.apiKey,providerSpecificData:ag()})}),c=await a.json();U(c.valid?"success":"failed"),W(c.valid?null:c.error||null),Y(!!c.maintenance)}catch{U("failed"),W(null),Y(!1)}finally{S(!1)}},ai=async()=>{if(b&&(x||F.apiKey)&&(x||F.name)&&(!d||F.defaultModel.trim())){$(!0);try{let a=!1;try{S(!0),U(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:F.apiKey,providerSpecificData:ag()})});a=!!(await c.json()).valid,U(a?"success":"failed")}catch{U("failed")}finally{S(!1)}await t({name:F.name||(x?"Ollama Local":""),apiKey:F.apiKey,defaultModel:d?F.defaultModel.trim():void 0,priority:F.priority,proxyPoolId:F.proxyPoolId===w?null:F.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:ag()})}finally{$(!1)}}},aj=async()=>{let a=ac.split("\n");if(!a.length)return;let c=(0,k.P)(a,s,{isCloudflareAi:C});if(!c.length)return;$(!0),af(null);let d=0,e=0;for(let a of c)try{let c=!1;try{let d=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey})});c=!!(await d.json().catch(()=>({}))).valid}catch{c=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey,name:a.name,priority:1,testStatus:c?"active":"unknown",...a.providerSpecificData?{providerSpecificData:a.providerSpecificData}:{}})})).ok?d++:e++}catch{e++}$(!1),af({success:d,failed:e}),d>0&&u&&u()};return b?(0,e.jsx)(i.aF,{isOpen:a,title:`Add ${c||b} ${A}`,onClose:v,children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{size:"sm",variant:"single"===aa?"primary":"ghost",onClick:()=>{ab("single"),af(null)},children:"Single"}),(0,e.jsx)(i.$n,{size:"sm",variant:"bulk"===aa?"primary":"ghost",onClick:()=>{ab("bulk"),af(null)},children:"Bulk Add"})]}),"bulk"===aa&&(0,e.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,e.jsx)("p",{className:"text-xs text-text-muted",children:C?(0,e.jsxs)(e.Fragment,{children:["One key per line. Format: ",(0,e.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,e.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===b?(0,e.jsxs)(e.Fragment,{children:["One PAT per line. Format: ",(0,e.jsx)("code",{children:"name|pt-..."})," or just ",(0,e.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,e.jsxs)(e.Fragment,{children:["One key per line. Format: ",(0,e.jsx)("code",{children:"name|apiKey"})," or just ",(0,e.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,e.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:_,value:ac,onChange:a=>ad(a.target.value)}),ae&&(0,e.jsxs)("div",{className:`text-sm font-medium ${ae.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",ae.success," added",ae.failed>0?`, ✗ ${ae.failed} failed`:""]}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{onClick:aj,fullWidth:!0,disabled:Z||!ac.trim(),children:Z?"Adding...":"Add All Keys"}),(0,e.jsx)(i.$n,{onClick:v,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===aa&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i.pd,{label:"Name",value:F.name,onChange:a=>G({...F,name:a.target.value}),placeholder:x?"Ollama Local":"Production Key"}),x&&(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.pd,{label:"Ollama Host URL",value:F.ollamaHostUrl,onChange:a=>G({...F,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,e.jsx)("div",{className:"pt-6",children:(0,e.jsx)(i.$n,{onClick:ah,disabled:R||Z,variant:"secondary",children:R?"Checking...":"Check"})})]}),!x&&(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.pd,{label:A,type:y?"text":"password",value:F.apiKey,onChange:a=>G({...F,apiKey:a.target.value}),placeholder:y?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":z?"xai-...":"qoder"===b?"pt-...":"",className:"flex-1"}),(0,e.jsx)("div",{className:"pt-6",children:(0,e.jsx)(i.$n,{onClick:ah,disabled:!F.apiKey||R||Z,variant:"secondary",children:R?"Checking...":"Check"})})]}),z&&(0,e.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."}),y&&m&&(0,e.jsxs)("p",{className:"text-xs text-text-muted",children:[m,p&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsxs)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",p.replace(/^https?:\/\//,"")]})]})]}),D&&(0,e.jsxs)("div",{children:[(0,e.jsx)(i.l6,{label:"Region",value:L,onChange:a=>{M(a.target.value),O(!0)},options:D.map(a=>({value:a.id,label:a.label}))}),P&&!N&&(0,e.jsxs)("p",{className:"text-xs text-primary mt-1 flex items-center gap-1",children:[(0,e.jsx)("span",{children:"\uD83C\uDF10"}),(0,e.jsx)("span",{children:(0,l.Tl)("Auto-matched region based on network location ({country})").replace("{country}",P.country)})]})]}),d&&(0,e.jsx)(i.pd,{label:"Default Model",value:F.defaultModel,onChange:a=>G({...F,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),x&&(0,e.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,e.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,e.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),T&&(0,e.jsx)(i.Ex,{variant:"success"===T?"success":X?"warning":"error",children:"success"===T?"Valid":X?"Check endpoint":"Invalid"}),X&&V&&(0,e.jsx)("p",{className:"text-xs text-amber-500 break-words",children:V}),r&&(0,e.jsx)("p",{className:"text-xs text-red-500 break-words",children:r}),d&&(0,e.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."}),C&&(0,e.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,e.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,e.jsx)(i.pd,{label:"Account ID",value:J.accountId,onChange:a=>K({...J,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,e.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,e.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),B&&(0,e.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,e.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,e.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,e.jsx)(i.pd,{label:"Azure Endpoint",value:H.azureEndpoint,onChange:a=>I({...H,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,e.jsx)(i.pd,{label:"Deployment Name",value:H.deployment,onChange:a=>I({...H,deployment:a.target.value}),placeholder:"gpt-4"}),(0,e.jsx)(i.pd,{label:"API Version",value:H.apiVersion,onChange:a=>I({...H,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,e.jsx)(i.pd,{label:"Organization",value:H.organization,onChange:a=>I({...H,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,e.jsx)(i.pd,{label:"Priority",type:"number",value:F.priority,onChange:a=>G({...F,priority:Number.parseInt(a.target.value)||1})}),(0,e.jsx)(i.l6,{label:"Proxy Pool",value:F.proxyPoolId,onChange:a=>G({...F,proxyPoolId:a.target.value}),options:[{value:w,label:"None"},...(q||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(q||[]).length&&(0,e.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,e.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{onClick:ai,fullWidth:!0,disabled:Z||!x&&(!F.name||!F.apiKey)||d&&!F.defaultModel.trim()||B&&(!H.azureEndpoint||!H.deployment||!H.organization)||C&&!J.accountId,children:Z?"Saving...":"Save"}),(0,e.jsx)(i.$n,{onClick:v,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}n.propTypes={isOpen:h().bool.isRequired,provider:h().string,providerName:h().string,isCompatible:h().bool,isAnthropic:h().bool,authType:h().string,authHint:h().string,website:h().string,proxyPools:h().arrayOf(h().shape({id:h().string,name:h().string})),error:h().string,existingNames:h().arrayOf(h().string),onSave:h().func.isRequired,onBulkDone:h().func,onClose:h().func.isRequired},d()}catch(a){d(a)}})},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},91914:(a,b,c)=>{"use strict";function d(a,b,c={}){let{isCloudflareAi:e=!1}=c,f=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),g=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let d=function(a,b={}){let{isCloudflareAi:c=!1}=b,d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:e});if(!d||!d.apiKey)continue;let h=d.baseName,i=1;for(;a=`${h} ${i}`,f.has(a.toLowerCase());)i+=1;f.add(a.toLowerCase());let j={name:a,apiKey:d.apiKey,skipped:!1};d.providerSpecificData&&(j.providerSpecificData=d.providerSpecificData),g.push(j)}return g}c.d(b,{P:()=>d})},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"F:\\\\Files\\\\GitHub Files\\\\10router\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\providers\\\\[id]\\\\page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"F:\\Files\\GitHub Files\\10router\\src\\app\\(dashboard)\\dashboard\\providers\\[id]\\page.js","default")},93848:(a,b,c)=>{"use strict";c.d(b,{o:()=>e});let d=new Map;async function e(a){if(!a?.url||!a?.type)return[];let b=d.get(a.url);if(b&&Date.now()<b.expiresAt)return b.data;try{let b=new URLSearchParams({url:a.url,type:a.type}),c=await fetch(`/api/providers/suggested-models?${b}`);if(!c.ok)return[];let e=(await c.json()).data??[];return d.set(a.url,{data:e,expiresAt:Date.now()+6e5}),e}catch{return[]}}},94317:(a,b,c)=>{"use strict";function d(a,b){if(!b||"number"!=typeof a||Number.isNaN(a))return!1;let{from:c,to:d}=b;return c<=d?a>=c&&a<d:a>=c||a<d}c.d(b,{X:()=>d})},94735:a=>{"use strict";a.exports=require("events")},95296:(a,b,c)=>{"use strict";c.a(a,async(a,b)=>{try{var d=c(48249),e=(c(67484),c(49885)),f=c.n(e),g=c(94579),h=(c(18753),a([g]));g=(h.then?(await h)():h)[0],f().string.isRequired,f().string.isRequired,f().string,f().func.isRequired,f().func.isRequired,f().func,f().oneOf(["ok","error"]),f().bool,f().string.isRequired,f().object.isRequired,f().arrayOf(f().object),f().string,f().func.isRequired,f().func.isRequired,f().func.isRequired,f().func.isRequired,b()}catch(a){b(a)}})},95619:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>x,handler:()=>z,routeModule:()=>y});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,57529))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,93110))),"F:\\Files\\GitHub Files\\10router\\src\\app\\(dashboard)\\dashboard\\providers\\[id]\\page.js"]}]},{"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"F:\\Files\\GitHub Files\\10router\\src\\app\\(dashboard)\\layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"F:\\Files\\GitHub Files\\10router\\src\\app\\layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,w=(0,e.H)({tree:v,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),x=w.__next_app__,y=w.routeModule,z=w.handler},98376:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>o});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=c(41371),k=c(18753),l=c(99258),m=a([i]);function n({modelId:a,fullModel:b,copied:c,onCopy:d,onDeleteAlias:f,onToggle:g,enabled:h=!0,onTest:i,testStatus:j,isTesting:k}){let l="ok"===j?"#22c55e":"error"===j?"#ef4444":void 0;return(0,e.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===j?"border-green-500/40":"error"===j?"border-red-500/40":"border-border"} hover:bg-sidebar/50 ${h?"":"opacity-60"}`,children:[(0,e.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:l?{color:l}:void 0,children:"ok"===j?"check_circle":"error"===j?"cancel":"smart_toy"}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,e.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,e.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,e.jsxs)("div",{className:"relative group/btn",children:[(0,e.jsx)("button",{onClick:()=>d(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,e.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:c===`model-${a}`?"Copied!":"Copy"})]}),i&&(0,e.jsxs)("div",{className:"relative group/btn",children:[(0,e.jsx)("button",{onClick:i,disabled:k,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",style:k?{animation:"spin 1s linear infinite"}:void 0,children:k?"progress_activity":"science"})}),(0,e.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:k?"Testing...":"Test"})]})]})]}),g&&(0,e.jsx)("button",{onClick:g,className:`p-1 rounded ${h?"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:h?"Disable model":"Activate model",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:h?"block":"restart_alt"})}),(0,e.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,e.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function o({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:d,copied:g,onCopy:h,onDeleteAlias:m,onAddCustomModel:p,onToggleCustomModel:q,onDeleteCustomModel:r,onBulkCustomModels:s,connections:t,isAnthropic:u}){let v=(0,j.i)(),[w,x]=(0,f.useState)(""),[y,z]=(0,f.useState)(!1),[A,B]=(0,f.useState)(!1),[C,D]=(0,f.useState)(null),[E,F]=(0,f.useState)({}),G=async b=>{if(!C){D(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();F(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{F(a=>({...a,[b]:"error"}))}finally{D(null)}}},H=(0,k.R)({customModels:d,modelAliases:c,providerAlias:a,type:"llm"}),I=H.filter(a=>!1!==a.enabled),J=H.filter(a=>!1===a.enabled),K=async()=>{if(!w.trim()||y)return;let a=w.trim();if(H.some(b=>b.id===a))return void v.warning("Model already exists for this provider.");z(!0);try{await p(a),x("")}catch(a){console.log("Error adding model:",a)}finally{z(!1)}},L=async()=>{if(A)return;let a=t.find(a=>!1!==a.isActive);if(a){B(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void v.error(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void v.warning("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(H.some(a=>a.id===b)||(await p(b,!1),e+=1))}0===e&&v.warning("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{B(!1)}}},M=t.some(a=>!1!==a.isActive);return(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",u?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,e.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,e.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,e.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,e.jsx)("input",{id:"new-compatible-model-input",type:"text",value:w,onChange:a=>x(a.target.value),onKeyDown:a=>"Enter"===a.key&&K(),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,e.jsx)(i.$n,{size:"sm",icon:"add",onClick:K,disabled:!w.trim()||y,children:y?"Adding...":"Add"}),(0,e.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"download",onClick:L,disabled:!M||A,children:A?"Importing...":"Import from /models"})]}),!M&&(0,e.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),H.length>0&&s&&(0,e.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,e.jsxs)("span",{children:[H.length," custom model",H.length>1?"s":""]}),(0,e.jsx)("span",{children:"\xb7"}),(0,e.jsx)("button",{onClick:()=>s(!0),className:"text-primary hover:underline",children:(0,l.Tl)("Enable all")}),(0,e.jsx)("span",{children:"\xb7"}),(0,e.jsx)("button",{onClick:()=>s(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,l.Tl)("Disable all")}),(0,e.jsxs)("span",{children:["— ",(0,l.Tl)("bulk actions affect what clients see in /v1/models")]})]}),I.length>0&&(0,e.jsx)("div",{className:"flex flex-col gap-3",children:I.map(({id:c,alias:d,source:f})=>(0,e.jsx)(n,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?r(c):m(d),onToggle:"custom"===f&&q?()=>q(c,!1):void 0,onTest:t.length>0?()=>G(c):void 0,testStatus:E[c],isTesting:C===c},`${f}-${a}/${c}`))}),J.length>0&&(0,e.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,e.jsx)("p",{className:"text-xs text-text-muted",children:"Disabled (activate to expose again):"}),J.map(({id:c,alias:d,source:f})=>(0,e.jsx)(n,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,enabled:!1,onDeleteAlias:()=>"custom"===f?r(c):m(d),onToggle:"custom"===f&&q?()=>q(c,!0):void 0,onTest:t.length>0?()=>G(c):void 0,testStatus:E[c],isTesting:C===c},`disabled-${f}-${a}/${c}`))]})]})}i=(m.then?(await m)():m)[0],o.propTypes={providerStorageAlias:h().string.isRequired,providerDisplayAlias:h().string.isRequired,modelAliases:h().object.isRequired,customModels:h().arrayOf(h().object),copied:h().string,onCopy:h().func.isRequired,onDeleteAlias:h().func.isRequired,onAddCustomModel:h().func.isRequired,onBulkCustomModels:h().func,onToggleCustomModel:h().func,onDeleteCustomModel:h().func.isRequired,connections:h().arrayOf(h().shape({id:h().string,isActive:h().bool})).isRequired,isAnthropic:h().bool},d()}catch(a){d(a)}})},99548:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>l});var e=c(48249),f=c(67484),g=c(49885),h=c.n(g),i=c(94579),j=c(99258),k=a([i]);function l({isOpen:a,onClose:b,onSuccess:c,password:d=""}){let[g,h]=(0,f.useState)(""),[k,m]=(0,f.useState)(""),[n,o]=(0,f.useState)(!1),[p,q]=(0,f.useState)(""),[r,s]=(0,f.useState)(null),t=(0,f.useRef)(null),u=()=>{n||(h(""),m(""),q(""),s(null),t.current&&(t.current.value=""),b())},v=async()=>{let a;q(""),s(null);let b=g.trim();if(!b)return;try{a=JSON.parse(b)}catch(a){q(`${(0,j.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void q((0,j.Tl)("No accounts found in input"));o(!0);try{let a=await fetch("/api/oauth/codebuddy-cn/bulk-import",{method:"POST",headers:{"Content-Type":"application/json",...d?{"x-9r-password":d}:{}},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void q(401===a.status?(0,j.Tl)("Invalid password"):b?.error||`Request failed: ${a.status}`);s(b),(b.imported>0||b.updated>0)&&"function"==typeof c&&c()}catch(a){q(a.message||(0,j.Tl)("Request failed"))}finally{o(!1)}},w=r?.results?.filter(a=>!a.ok)||[],x=r?.skipped??0;return(0,e.jsx)(i.aF,{isOpen:a,title:(0,j.Tl)("Import CodeBuddy CN Accounts"),onClose:u,children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)(i.$n,{variant:"secondary",fullWidth:!0,icon:"upload_file",onClick:()=>t.current?.click(),disabled:n,children:k||(0,j.Tl)("Choose JSON file...")}),(0,e.jsx)("input",{ref:t,type:"file",accept:".json,application/json",className:"hidden",onChange:a=>{let b=a.target.files?.[0];if(!b)return;m(b.name),q(""),s(null);let c=new FileReader;c.onload=()=>h(String(c.result||"")),c.onerror=()=>q((0,j.Tl)("Failed to read file")),c.readAsText(b)}})]}),(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)("div",{className:"absolute -top-2 left-2 bg-sidebar px-1 text-[10px] text-text-muted",children:(0,j.Tl)("Or paste JSON")}),(0,e.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:g,onChange:a=>h(a.target.value),disabled:n})]}),p&&(0,e.jsx)("p",{className:"text-xs text-red-500 break-words",children:p}),r&&(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsxs)("div",{className:`text-sm font-medium ${r.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",r.imported," ",(0,j.Tl)("added"),", ",r.updated," ",(0,j.Tl)("updated"),x>0?`, ${x} ${(0,j.Tl)("skipped")}`:"",r.failed>0?`, ✗ ${r.failed} ${(0,j.Tl)("failed")}`:""]}),w.length>0&&(0,e.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:w.map(a=>(0,e.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:n||!g.trim(),children:n?(0,j.Tl)("Importing..."):(0,j.Tl)("Import All")}),(0,e.jsx)(i.$n,{onClick:u,variant:"ghost",fullWidth:!0,disabled:n,children:(0,j.Tl)("Close")})]})]})})}i=(k.then?(await k)():k)[0],l.propTypes={isOpen:h().bool.isRequired,onClose:h().func.isRequired,onSuccess:h().func,password:h().string},d()}catch(a){d(a)}})}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1260,2430,4613,8410,877,1220,5781,7805,2268,6070,869,7239,6457,4123,1377,6960,8990],()=>b(b.s=95619));module.exports=c})();