@ltgiang/9router 0.4.84 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1070) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +19 -12
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/required-server-files.json +6 -1
  5. package/app/.next-cli-build/routes-manifest.json +61 -12
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  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 +3 -3
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +30 -30
  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 +2 -2
  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 +3 -3
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +10 -3
  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 +2 -2
  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 +2 -2
  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 +4 -4
  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/quota/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  70. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  73. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  74. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  75. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  76. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  81. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  84. package/app/.next-cli-build/server/app/_not-found.rsc +17 -16
  85. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +17 -16
  86. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -5
  88. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
  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 -0
  102. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -0
  103. package/app/.next-cli-build/server/app/api/auth/reset-password/route_client-reference-manifest.js +1 -0
  104. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
  107. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  109. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  113. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  121. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  127. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  129. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/combos/reorder/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/combos/reorder/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -0
  147. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -0
  148. package/app/.next-cli-build/server/app/api/headroom/start/route_client-reference-manifest.js +1 -0
  149. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -0
  150. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -0
  151. package/app/.next-cli-build/server/app/api/headroom/status/route_client-reference-manifest.js +1 -0
  152. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -0
  153. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -0
  154. package/app/.next-cli-build/server/app/api/headroom/stop/route_client-reference-manifest.js +1 -0
  155. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +3 -3
  166. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +6 -6
  168. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/models/order/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/models/order/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -0
  196. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -0
  197. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route_client-reference-manifest.js +1 -0
  198. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  201. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -0
  209. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -0
  210. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route_client-reference-manifest.js +1 -0
  211. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/[id]/connections/disabled/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/[id]/connections/disabled/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/providers/[id]/pool/pull/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/providers/[id]/pool/pull/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/providers/[id]/pool/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/providers/[id]/pool/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +43 -0
  258. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -0
  259. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route_client-reference-manifest.js +1 -0
  260. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +40 -0
  261. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -0
  262. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route_client-reference-manifest.js +1 -0
  263. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  266. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  282. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  304. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -0
  306. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -0
  307. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route_client-reference-manifest.js +1 -0
  308. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  323. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  337. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  369. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  371. package/app/.next-cli-build/server/app/callback.html +1 -1
  372. package/app/.next-cli-build/server/app/callback.rsc +21 -20
  373. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +21 -20
  374. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  375. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -5
  376. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
  377. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  378. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  379. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  380. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +19 -18
  381. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  382. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  384. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  385. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +19 -18
  386. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  387. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +6 -5
  388. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
  389. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  390. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +20 -19
  391. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  392. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  394. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  395. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +20 -19
  396. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +6 -5
  398. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
  399. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  400. package/app/.next-cli-build/server/app/dashboard/combos.rsc +22 -21
  401. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  402. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  405. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +22 -21
  406. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +6 -5
  408. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
  409. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  410. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +20 -19
  411. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  412. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +20 -19
  416. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +6 -5
  418. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
  419. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +22 -21
  421. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  426. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +22 -21
  427. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +6 -5
  429. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
  430. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  431. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +19 -18
  432. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  433. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  436. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +19 -18
  437. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +6 -5
  439. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
  440. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/profile.rsc +22 -21
  442. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  443. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  446. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +22 -21
  447. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +6 -5
  449. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
  450. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +22 -21
  452. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  456. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +22 -21
  458. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +6 -5
  460. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
  461. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/providers.rsc +22 -21
  463. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  464. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +22 -21
  468. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +6 -5
  470. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
  471. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +22 -21
  473. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +22 -21
  478. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +6 -5
  480. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +3 -3
  481. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  482. package/app/.next-cli-build/server/app/dashboard/quota.rsc +20 -19
  483. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  484. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  487. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +20 -19
  488. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  489. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +6 -5
  490. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
  491. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  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 +21 -20
  496. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +21 -20
  497. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -5
  499. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
  500. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/skills.rsc +22 -21
  506. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  507. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  509. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  510. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +22 -21
  511. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  512. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +6 -5
  513. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
  514. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/translator.rsc +22 -21
  516. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  517. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  519. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +22 -21
  521. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  522. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +6 -5
  523. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
  524. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/usage.rsc +22 -21
  526. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  527. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  529. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  530. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +22 -21
  531. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  532. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +6 -5
  533. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
  534. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  535. package/app/.next-cli-build/server/app/dashboard.rsc +20 -19
  536. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  537. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +20 -19
  540. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  541. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +6 -5
  542. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
  543. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  544. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  545. package/app/.next-cli-build/server/app/index.html +1 -1
  546. package/app/.next-cli-build/server/app/index.rsc +16 -15
  547. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +16 -15
  549. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  550. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -5
  551. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
  552. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  553. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  554. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  555. package/app/.next-cli-build/server/app/landing.html +1 -1
  556. package/app/.next-cli-build/server/app/landing.rsc +21 -20
  557. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +21 -20
  558. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -5
  560. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
  561. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  562. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  563. package/app/.next-cli-build/server/app/login/page.js +2 -2
  564. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  565. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  566. package/app/.next-cli-build/server/app/login.html +1 -1
  567. package/app/.next-cli-build/server/app/login.rsc +21 -20
  568. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +21 -20
  569. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  570. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -5
  571. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
  572. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  573. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  574. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  575. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  576. package/app/.next-cli-build/server/app/page.js +2 -2
  577. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  578. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  579. package/app/.next-cli-build/server/app-paths-manifest.json +19 -12
  580. package/app/.next-cli-build/server/chunks/1220.js +1 -1
  581. package/app/.next-cli-build/server/chunks/1241.js +1 -0
  582. package/app/.next-cli-build/server/chunks/1260.js +1 -0
  583. package/app/.next-cli-build/server/chunks/1275.js +73 -0
  584. package/app/.next-cli-build/server/chunks/2091.js +1 -0
  585. package/app/.next-cli-build/server/chunks/2231.js +1 -0
  586. package/app/.next-cli-build/server/chunks/{4013.js → 2391.js} +1 -1
  587. package/app/.next-cli-build/server/chunks/2722.js +3 -3
  588. package/app/.next-cli-build/server/chunks/2996.js +1 -0
  589. package/app/.next-cli-build/server/chunks/318.js +36 -30
  590. package/app/.next-cli-build/server/chunks/319.js +3 -3
  591. package/app/.next-cli-build/server/chunks/3390.js +1 -0
  592. package/app/.next-cli-build/server/chunks/3453.js +1 -0
  593. package/app/.next-cli-build/server/chunks/3535.js +1 -0
  594. package/app/.next-cli-build/server/chunks/3546.js +1 -0
  595. package/app/.next-cli-build/server/chunks/412.js +5 -5
  596. package/app/.next-cli-build/server/chunks/4161.js +1 -0
  597. package/app/.next-cli-build/server/chunks/4306.js +1 -0
  598. package/app/.next-cli-build/server/chunks/4632.js +1 -1
  599. package/app/.next-cli-build/server/chunks/4741.js +2 -2
  600. package/app/.next-cli-build/server/chunks/4746.js +1 -7
  601. package/app/.next-cli-build/server/chunks/4827.js +1 -0
  602. package/app/.next-cli-build/server/chunks/5002.js +1 -0
  603. package/app/.next-cli-build/server/chunks/5615.js +43 -0
  604. package/app/.next-cli-build/server/chunks/5692.js +1 -0
  605. package/app/.next-cli-build/server/chunks/5699.js +1 -0
  606. package/app/.next-cli-build/server/chunks/595.js +1 -0
  607. package/app/.next-cli-build/server/chunks/5961.js +1 -0
  608. package/app/.next-cli-build/server/chunks/6070.js +1 -0
  609. package/app/.next-cli-build/server/chunks/615.js +1 -0
  610. package/app/.next-cli-build/server/chunks/6182.js +18 -4
  611. package/app/.next-cli-build/server/chunks/6306.js +1 -0
  612. package/app/.next-cli-build/server/chunks/6445.js +10 -0
  613. package/app/.next-cli-build/server/chunks/6457.js +4 -0
  614. package/app/.next-cli-build/server/chunks/6482.js +11 -0
  615. package/app/.next-cli-build/server/chunks/6568.js +3 -0
  616. package/app/.next-cli-build/server/chunks/6763.js +1 -0
  617. package/app/.next-cli-build/server/chunks/7774.js +15 -15
  618. package/app/.next-cli-build/server/chunks/7828.js +1 -0
  619. package/app/.next-cli-build/server/chunks/8080.js +1 -0
  620. package/app/.next-cli-build/server/chunks/8238.js +1 -0
  621. package/app/.next-cli-build/server/chunks/8255.js +1 -1
  622. package/app/.next-cli-build/server/chunks/8271.js +1 -0
  623. package/app/.next-cli-build/server/chunks/{7250.js → 8658.js} +1 -1
  624. package/app/.next-cli-build/server/chunks/8895.js +13 -8
  625. package/app/.next-cli-build/server/chunks/8910.js +2 -0
  626. package/app/.next-cli-build/server/chunks/8914.js +1 -0
  627. package/app/.next-cli-build/server/chunks/8920.js +1 -0
  628. package/app/.next-cli-build/server/chunks/914.js +4 -4
  629. package/app/.next-cli-build/server/chunks/9549.js +1 -0
  630. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  631. package/app/.next-cli-build/server/middleware.js +4 -4
  632. package/app/.next-cli-build/server/pages/404.html +1 -1
  633. package/app/.next-cli-build/server/pages/500.html +1 -1
  634. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  635. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  636. package/app/.next-cli-build/static/UvpVGpuHlewFEW4u9IYl2/_buildManifest.js +1 -0
  637. package/app/.next-cli-build/static/chunks/1321-aaac0e21e524c746.js +1 -0
  638. package/app/.next-cli-build/static/chunks/{3794-ba2500baa4c52d55.js → 3794-e569667691edc8f7.js} +1 -1
  639. package/app/.next-cli-build/static/chunks/5497-9693b69a6ba714c2.js +7 -0
  640. package/app/.next-cli-build/static/chunks/6069-d17e2e7f5a573a73.js +53 -0
  641. package/app/.next-cli-build/static/chunks/6502-54f3e96cead0a0a3.js +3 -0
  642. package/app/.next-cli-build/static/chunks/8982-6d1803817450bcd4.js +11 -0
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-dccb4480c20cb67f.js → page-35beb2949f0feaa0.js} +1 -1
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-a93420694c4be022.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-fad4cd709b370642.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-9548f5a1140005d5.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-0a3bdda39731c8e8.js +59 -0
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-0736ad13c70c1c56.js → page-7c57929647c07f91.js} +1 -1
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-50ee3aa1bd8fa967.js → page-f2545778dd849c11.js} +1 -1
  650. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-f828e7a7fa3010d8.js → page-8eb2e65f0ce52b79.js} +1 -1
  651. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-f587e9c9d0a62533.js → page-734221f9292c2f0b.js} +1 -1
  652. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-1d82df0c59998142.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-31cc0cda6436a0b9.js +10 -0
  654. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-753b0a5d477ae4e7.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-32cc33885248badf.js +4 -0
  656. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-fb204465ae19409a.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-ab3c8b6b84d1bddf.js → page-893cbf6a96a3e92c.js} +1 -1
  658. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-9d94f30df88cbcd7.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/_global-error/page-0006630ca3232027.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-0006630ca3232027.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-0006630ca3232027.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-0006630ca3232027.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-0006630ca3232027.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-0006630ca3232027.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-0006630ca3232027.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-0006630ca3232027.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-0006630ca3232027.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-0006630ca3232027.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-0006630ca3232027.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-0006630ca3232027.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-0006630ca3232027.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-0006630ca3232027.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-0006630ca3232027.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-0006630ca3232027.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-0006630ca3232027.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-0006630ca3232027.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-0006630ca3232027.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-0006630ca3232027.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-0006630ca3232027.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-0006630ca3232027.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-0006630ca3232027.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-0006630ca3232027.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-0006630ca3232027.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-0006630ca3232027.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/combos/reorder/route-0006630ca3232027.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/combos/route-0006630ca3232027.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-0006630ca3232027.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-0006630ca3232027.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-0006630ca3232027.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/health/route-0006630ca3232027.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/init/route-0006630ca3232027.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-0006630ca3232027.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/keys/route-0006630ca3232027.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/locale/route-0006630ca3232027.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-0006630ca3232027.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-0006630ca3232027.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-0006630ca3232027.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-0006630ca3232027.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-0006630ca3232027.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-0006630ca3232027.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-0006630ca3232027.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-0006630ca3232027.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-0006630ca3232027.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-0006630ca3232027.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-0006630ca3232027.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/models/order/route-0006630ca3232027.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/models/route-0006630ca3232027.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/models/test/route-0006630ca3232027.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-0006630ca3232027.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-0006630ca3232027.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-0006630ca3232027.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-0006630ca3232027.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-0006630ca3232027.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-0006630ca3232027.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-0006630ca3232027.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-0006630ca3232027.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-0006630ca3232027.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-0006630ca3232027.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-0006630ca3232027.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-0006630ca3232027.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/pricing/route-0006630ca3232027.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-0006630ca3232027.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-0006630ca3232027.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-0006630ca3232027.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/connections/disabled/route-0006630ca3232027.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-0006630ca3232027.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/pool/pull/route-0006630ca3232027.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/pool/route-0006630ca3232027.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-0006630ca3232027.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-0006630ca3232027.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-0006630ca3232027.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-0006630ca3232027.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-0006630ca3232027.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/providers/route-0006630ca3232027.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-0006630ca3232027.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-0006630ca3232027.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-0006630ca3232027.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-0006630ca3232027.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-0006630ca3232027.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-0006630ca3232027.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-0006630ca3232027.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-0006630ca3232027.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-0006630ca3232027.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-0006630ca3232027.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-0006630ca3232027.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-0006630ca3232027.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/settings/route-0006630ca3232027.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-0006630ca3232027.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/tags/route-0006630ca3232027.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-0006630ca3232027.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-0006630ca3232027.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-0006630ca3232027.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-0006630ca3232027.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-0006630ca3232027.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-0006630ca3232027.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-0006630ca3232027.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-0006630ca3232027.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-0006630ca3232027.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-0006630ca3232027.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-0006630ca3232027.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-0006630ca3232027.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-0006630ca3232027.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-0006630ca3232027.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-0006630ca3232027.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-0006630ca3232027.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-0006630ca3232027.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-0006630ca3232027.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-0006630ca3232027.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-0006630ca3232027.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-0006630ca3232027.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-0006630ca3232027.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-0006630ca3232027.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-0006630ca3232027.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-0006630ca3232027.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-0006630ca3232027.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-0006630ca3232027.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-0006630ca3232027.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-0006630ca3232027.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-0006630ca3232027.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-0006630ca3232027.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-0006630ca3232027.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-0006630ca3232027.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-0006630ca3232027.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-0006630ca3232027.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-0006630ca3232027.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/v1/route-0006630ca3232027.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-0006630ca3232027.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-0006630ca3232027.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-0006630ca3232027.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-0006630ca3232027.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/version/route-0006630ca3232027.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-0006630ca3232027.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/version/update/route-0006630ca3232027.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-feda7f7a9c272877.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/layout-ad10b603c07438f2.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/login/page-100ca7d1326036fd.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-0006630ca3232027.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/page-0006630ca3232027.js +1 -0
  799. package/app/.next-cli-build/static/chunks/{main-b8d198db3858ff3e.js → main-7070798b89352aeb.js} +2 -2
  800. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-0006630ca3232027.js +1 -0
  801. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-0006630ca3232027.js +1 -0
  802. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-0006630ca3232027.js +1 -0
  803. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-0006630ca3232027.js +1 -0
  804. package/app/.next-cli-build/static/css/88fb3376e840da30.css +1 -0
  805. package/app/.next-cli-build/static/css/d434f5eb81ebb26f.css +1 -0
  806. package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.83-to-0.4.84-0.4.84-20260625-092251/data.sqlite +0 -0
  807. package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
  808. package/app/custom-server.js +32 -0
  809. package/app/node_modules/@next/env/package.json +2 -2
  810. package/app/node_modules/next/dist/build/swc/index.js +1 -1
  811. package/app/node_modules/next/dist/build/webpack-config.js +3 -3
  812. package/app/node_modules/next/dist/client/dev/debug-channel.js +102 -2
  813. package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +10 -10
  814. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +11 -11
  815. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +13 -13
  816. package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +10 -10
  817. package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +2 -2
  818. package/app/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +1 -1
  819. package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  820. package/app/node_modules/next/dist/server/app-render/action-handler.js +18 -8
  821. package/app/node_modules/next/dist/server/config-schema.js +1 -0
  822. package/app/node_modules/next/dist/server/config.js +1 -1
  823. package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  824. package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  825. package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  826. package/app/node_modules/next/dist/server/lib/encode-cache-tag.js +45 -0
  827. package/app/node_modules/next/dist/server/lib/implicit-tags.js +6 -3
  828. package/app/node_modules/next/dist/server/lib/patch-fetch.js +5 -1
  829. package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
  830. package/app/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  831. package/app/node_modules/next/dist/shared/lib/router/router.js +8 -1
  832. package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  833. package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  834. package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
  835. package/app/node_modules/next/package.json +15 -15
  836. package/app/package.json +7 -4
  837. package/app/public/i18n/literals/ar.json +2 -1
  838. package/app/public/i18n/literals/bn.json +2 -1
  839. package/app/public/i18n/literals/cs.json +2 -1
  840. package/app/public/i18n/literals/da.json +2 -1
  841. package/app/public/i18n/literals/de.json +2 -1
  842. package/app/public/i18n/literals/el.json +2 -1
  843. package/app/public/i18n/literals/es.json +2 -1
  844. package/app/public/i18n/literals/fi.json +2 -1
  845. package/app/public/i18n/literals/fr.json +2 -1
  846. package/app/public/i18n/literals/he.json +2 -1
  847. package/app/public/i18n/literals/hi.json +2 -1
  848. package/app/public/i18n/literals/hu.json +2 -1
  849. package/app/public/i18n/literals/id.json +2 -1
  850. package/app/public/i18n/literals/it.json +2 -1
  851. package/app/public/i18n/literals/ja.json +2 -1
  852. package/app/public/i18n/literals/ko.json +2 -1
  853. package/app/public/i18n/literals/nl.json +2 -1
  854. package/app/public/i18n/literals/no.json +2 -1
  855. package/app/public/i18n/literals/pl.json +2 -1
  856. package/app/public/i18n/literals/pt-BR.json +2 -1
  857. package/app/public/i18n/literals/pt-PT.json +2 -1
  858. package/app/public/i18n/literals/ro.json +2 -1
  859. package/app/public/i18n/literals/ru.json +2 -1
  860. package/app/public/i18n/literals/sv.json +2 -1
  861. package/app/public/i18n/literals/th.json +2 -1
  862. package/app/public/i18n/literals/tl.json +2 -1
  863. package/app/public/i18n/literals/tr.json +2 -1
  864. package/app/public/i18n/literals/uk.json +2 -1
  865. package/app/public/i18n/literals/ur.json +2 -1
  866. package/app/public/i18n/literals/vi.json +2 -1
  867. package/app/public/i18n/literals/zh-CN.json +5 -1
  868. package/app/public/i18n/literals/zh-TW.json +2 -1
  869. package/app/public/providers/codebuddy-cn.png +0 -0
  870. package/app/public/providers/mimo-free.png +0 -0
  871. package/app/public/providers/qoder.png +0 -0
  872. package/app/server.js +1 -1
  873. package/app/src/lib/oauth/services/qoder.js +216 -0
  874. package/app/src/mitm/server.js +34 -29
  875. package/cli.js +28 -4
  876. package/hooks/sqliteRuntime.js +20 -3
  877. package/package.json +1 -1
  878. package/src/cli/api/client.js +9 -0
  879. package/src/cli/menus/providers.js +8 -6
  880. package/src/cli/menus/settings.js +25 -28
  881. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +0 -1
  882. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +0 -1
  883. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route_client-reference-manifest.js +0 -1
  884. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +0 -2
  885. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +0 -1
  886. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route_client-reference-manifest.js +0 -1
  887. package/app/.next-cli-build/server/chunks/1051.js +0 -1
  888. package/app/.next-cli-build/server/chunks/2409.js +0 -1
  889. package/app/.next-cli-build/server/chunks/2506.js +0 -4
  890. package/app/.next-cli-build/server/chunks/2971.js +0 -1
  891. package/app/.next-cli-build/server/chunks/3104.js +0 -43
  892. package/app/.next-cli-build/server/chunks/3110.js +0 -65
  893. package/app/.next-cli-build/server/chunks/3196.js +0 -1
  894. package/app/.next-cli-build/server/chunks/3813.js +0 -1
  895. package/app/.next-cli-build/server/chunks/4177.js +0 -1
  896. package/app/.next-cli-build/server/chunks/42.js +0 -1
  897. package/app/.next-cli-build/server/chunks/4304.js +0 -1
  898. package/app/.next-cli-build/server/chunks/4372.js +0 -1
  899. package/app/.next-cli-build/server/chunks/4404.js +0 -1
  900. package/app/.next-cli-build/server/chunks/4657.js +0 -1
  901. package/app/.next-cli-build/server/chunks/4720.js +0 -1
  902. package/app/.next-cli-build/server/chunks/5024.js +0 -1
  903. package/app/.next-cli-build/server/chunks/5433.js +0 -1
  904. package/app/.next-cli-build/server/chunks/5681.js +0 -1
  905. package/app/.next-cli-build/server/chunks/6064.js +0 -1
  906. package/app/.next-cli-build/server/chunks/6108.js +0 -1
  907. package/app/.next-cli-build/server/chunks/6936.js +0 -15
  908. package/app/.next-cli-build/server/chunks/7153.js +0 -1
  909. package/app/.next-cli-build/server/chunks/7341.js +0 -1
  910. package/app/.next-cli-build/server/chunks/7568.js +0 -1
  911. package/app/.next-cli-build/server/chunks/7899.js +0 -3
  912. package/app/.next-cli-build/server/chunks/8590.js +0 -1
  913. package/app/.next-cli-build/server/chunks/879.js +0 -1
  914. package/app/.next-cli-build/server/chunks/9489.js +0 -1
  915. package/app/.next-cli-build/server/chunks/9609.js +0 -1
  916. package/app/.next-cli-build/static/chunks/1321-b86a86e3b2a7fa56.js +0 -1
  917. package/app/.next-cli-build/static/chunks/5497-d36fd3c83eca15a9.js +0 -7
  918. package/app/.next-cli-build/static/chunks/6069-cc2decdd4cf8a742.js +0 -53
  919. package/app/.next-cli-build/static/chunks/6502-612e6a0c29fdfd96.js +0 -3
  920. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-a9ac6b258809e7fa.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-c359f496024e3673.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a314df50240def0b.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-432e13b0930a1e77.js +0 -59
  924. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0d670718f2e33561.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-4ca2effca1e07a8e.js +0 -3
  926. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-8e1f581c3c66272d.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-5ee9e3e13d6015bb.js +0 -4
  928. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-b0fae7cb91ea57a8.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-3e9190b29f8110a6.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/_global-error/page-518fdf69d56f1834.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-518fdf69d56f1834.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-518fdf69d56f1834.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-518fdf69d56f1834.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-518fdf69d56f1834.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-518fdf69d56f1834.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-518fdf69d56f1834.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-518fdf69d56f1834.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-518fdf69d56f1834.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-518fdf69d56f1834.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-518fdf69d56f1834.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-518fdf69d56f1834.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-518fdf69d56f1834.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-518fdf69d56f1834.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-518fdf69d56f1834.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-518fdf69d56f1834.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-518fdf69d56f1834.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-518fdf69d56f1834.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-518fdf69d56f1834.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-518fdf69d56f1834.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-518fdf69d56f1834.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-518fdf69d56f1834.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-518fdf69d56f1834.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-518fdf69d56f1834.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-518fdf69d56f1834.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/combos/reorder/route-518fdf69d56f1834.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/combos/route-518fdf69d56f1834.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/health/route-518fdf69d56f1834.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/init/route-518fdf69d56f1834.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-518fdf69d56f1834.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/keys/route-518fdf69d56f1834.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/locale/route-518fdf69d56f1834.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-518fdf69d56f1834.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-518fdf69d56f1834.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-518fdf69d56f1834.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-518fdf69d56f1834.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-518fdf69d56f1834.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-518fdf69d56f1834.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-518fdf69d56f1834.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-518fdf69d56f1834.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-518fdf69d56f1834.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-518fdf69d56f1834.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-518fdf69d56f1834.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/models/order/route-518fdf69d56f1834.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/models/route-518fdf69d56f1834.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/models/test/route-518fdf69d56f1834.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-518fdf69d56f1834.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-518fdf69d56f1834.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-518fdf69d56f1834.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-518fdf69d56f1834.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-518fdf69d56f1834.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-518fdf69d56f1834.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-518fdf69d56f1834.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-518fdf69d56f1834.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-518fdf69d56f1834.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-518fdf69d56f1834.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/pricing/route-518fdf69d56f1834.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-518fdf69d56f1834.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-518fdf69d56f1834.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-518fdf69d56f1834.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/connections/disabled/route-518fdf69d56f1834.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-518fdf69d56f1834.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/pool/pull/route-518fdf69d56f1834.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/pool/route-518fdf69d56f1834.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-518fdf69d56f1834.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-518fdf69d56f1834.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-518fdf69d56f1834.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-518fdf69d56f1834.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-518fdf69d56f1834.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/providers/route-518fdf69d56f1834.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-518fdf69d56f1834.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-518fdf69d56f1834.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-518fdf69d56f1834.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-518fdf69d56f1834.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-518fdf69d56f1834.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-518fdf69d56f1834.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-518fdf69d56f1834.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-518fdf69d56f1834.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-518fdf69d56f1834.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-518fdf69d56f1834.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/settings/route-518fdf69d56f1834.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-518fdf69d56f1834.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/tags/route-518fdf69d56f1834.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-518fdf69d56f1834.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-518fdf69d56f1834.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-518fdf69d56f1834.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-518fdf69d56f1834.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-518fdf69d56f1834.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-518fdf69d56f1834.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-518fdf69d56f1834.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-518fdf69d56f1834.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-518fdf69d56f1834.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-518fdf69d56f1834.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-518fdf69d56f1834.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-518fdf69d56f1834.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-518fdf69d56f1834.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-518fdf69d56f1834.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-518fdf69d56f1834.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-518fdf69d56f1834.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-518fdf69d56f1834.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-518fdf69d56f1834.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-518fdf69d56f1834.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-518fdf69d56f1834.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-518fdf69d56f1834.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-518fdf69d56f1834.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-518fdf69d56f1834.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-518fdf69d56f1834.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-518fdf69d56f1834.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-518fdf69d56f1834.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-518fdf69d56f1834.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-518fdf69d56f1834.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-518fdf69d56f1834.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-518fdf69d56f1834.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-518fdf69d56f1834.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-518fdf69d56f1834.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-518fdf69d56f1834.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-518fdf69d56f1834.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-518fdf69d56f1834.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-518fdf69d56f1834.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-518fdf69d56f1834.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/v1/route-518fdf69d56f1834.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-518fdf69d56f1834.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-518fdf69d56f1834.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-518fdf69d56f1834.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-518fdf69d56f1834.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/version/route-518fdf69d56f1834.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-518fdf69d56f1834.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/version/update/route-518fdf69d56f1834.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-717fc9bdbe424b20.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/layout-aff6bda55ff6881b.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/login/page-5b1e256b0ca9cc40.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-518fdf69d56f1834.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/page-518fdf69d56f1834.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-518fdf69d56f1834.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-518fdf69d56f1834.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-518fdf69d56f1834.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-518fdf69d56f1834.js +0 -1
  1067. package/app/.next-cli-build/static/css/090d5175372e4b28.css +0 -1
  1068. package/app/.next-cli-build/static/css/0f03023a765dc337.css +0 -1
  1069. package/app/.next-cli-build/static/nObVsvmtPq3sqkOwjFPZZ/_buildManifest.js +0 -1
  1070. /package/app/.next-cli-build/static/{nObVsvmtPq3sqkOwjFPZZ → UvpVGpuHlewFEW4u9IYl2}/_ssgManifest.js +0 -0
@@ -1,4 +1,11 @@
1
- (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},46293:a=>{"use strict";a.exports=require("sql.js")},55511:a=>{"use strict";a.exports=require("crypto")},59536:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64380:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,93110)),"/home/letruonggiang/work/9router/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,30508)),"/home/letruonggiang/work/9router/src/app/(dashboard)/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,32059)),"/home/letruonggiang/work/9router/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next-cli-build",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/(dashboard)/dashboard/providers/[id]/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
- see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},69264:(a,b,c)=>{Promise.resolve().then(c.bind(c,92127))},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92127:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>A});var d=c(48249),e=c(67484),f=c(19099),g=c(2116),h=c.n(g),i=c(81220),j=c(50412),k=c(96919),l=c(91431),m=c(50377),n=c(49885),o=c.n(n);function p({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:j,onTest:k,isTesting:l,onDisable:m,isFirst:n,isLast:o,onMoveUp:q,onMoveDown:r}){let s="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.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,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(q||r)&&(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:q,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:r,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:s?{color:s}:void 0,children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.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:b}),a.name&&(0,d.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:a.name})]}),k&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:k,disabled:l,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${l?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:l?{animation:"spin 1s linear infinite"}:void 0,children:l?"progress_activity":"science"})}),(0,d.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:l?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(b,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:e===`model-${a.id}`?"check":"content_copy"})}),(0,d.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:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:j,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):m?(0,d.jsx)("button",{onClick:m,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function q({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.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"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.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:i?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function r({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,copied:f,onCopy:g,onSetAlias:h,onDeleteAlias:i,connections:k,isAnthropic:l}){let[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)({}),y=async b=>{if(!u){v(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();x(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{x(a=>({...a,[b]:"error"}))}finally{v(null)}}},z=Object.entries(c).filter(([,b])=>b.startsWith(`${a}/`)).map(([b,c])=>({modelId:c.replace(`${a}/`,""),fullModel:c,alias:b})),A=d=>{let e,f=`${a}/${d}`;if(Object.values(c).includes(f))return null;let g=(e=d.split("/"))[e.length-1];if(!c[g])return g;let h=`${b}-${g}`;if(!c[h])return h;let i=2;for(;c[`${b}-${g}-${i}`];)i+=1;return`${b}-${g}-${i}`},B=async()=>{if(!m.trim()||o)return;let b=m.trim(),d=`${a}/${b}`;if(Object.values(c).includes(d))return void alert("Model already added.");let e=A(b);if(!e)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");p(!0);try{await h(b,e,a),n("")}catch(a){console.log("Error adding model:",a)}finally{p(!1)}},C=async()=>{if(s)return;let b=k.find(a=>!1!==a.isActive);if(b){t(!0);try{let c=await fetch(`/api/providers/${b.id}/models`),d=await c.json();if(!c.ok)return void alert(d.error||"Failed to import models");let e=d.models||[];if(0===e.length)return void alert("No models returned from /models.");let f=0;for(let b of e){let c=b.id||b.name||b.model;if(!c)continue;let d=A(c);d&&(await h(c,d,a),f+=1)}0===f&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{t(!1)}}},D=k.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",l?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:m,onChange:a=>n(a.target.value),onKeyDown:a=>"Enter"===a.key&&B(),placeholder:l?"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,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:B,disabled:!m.trim()||o,children:o?"Adding...":"Add"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"download",onClick:C,disabled:!D||s,children:s?"Importing...":"Import from /models"})]}),!D&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),z.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:z.map(({modelId:a,fullModel:c,alias:e})=>(0,d.jsx)(q,{modelId:a,fullModel:`${b}/${a}`,copied:f,onCopy:g,onDeleteAlias:()=>i(e),onTest:k.length>0?()=>y(a):void 0,testStatus:w[a],isTesting:u===a},c))})]})}function s({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}function t({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:g,onMoveUp:h,onMoveDown:i,onToggleActive:k,onUpdateProxy:l,onEdit:m,onDelete:n,oneByOneStatus:o=null}){let[p,q]=(0,e.useState)(!1),[r,u]=(0,e.useState)(!1),v=(0,e.useRef)(null),w=new Map((b||[]).map(a=>[a.id,a])),x=a.providerSpecificData?.proxyPoolId||null,y=x?w.get(x):null,z=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,A=!!x||z,B=y?`Pool: ${y.name}`:x?`Pool: ${x} (inactive/missing)`:z?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",C="";if(y?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=y?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);C=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{C=b}}let D=y?.noProxy||a.providerSpecificData?.connectionNoProxy||"",E="default";y?.isActive===!0?E="success":(x||z)&&(E="error");let F=async a=>{u(!0);try{await l("__none__"===a?null:a)}finally{u(!1),q(!1)}},G=a.authType||(c?"oauth":"apikey"),H="oauth"===G,I="cookie"===G,J=a=>"string"==typeof a&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a),K=H?J(a.email)?a.email:J(a.name)?a.name:a.name||a.email||a.displayName||"OAuth Account":a.name||a.email||a.displayName||"API Key",[L,M]=(0,e.useState)(!1),N=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,O="unavailable"!==a.testStatus||L?a.testStatus:"active",P=()=>o?"queued"===o.state?"queued":"testing"===o.state?"testing":"success"===o.state?"success":"failed"===o.state?o.error?`failed: ${o.error}`:"failed":null:null;return(0,d.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,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:h,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:i,disabled:g,className:`p-0.5 rounded ${g?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:I?"cookie":H?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:K}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(j.Ex,{variant:!1===a.isActive?"default":"active"===O||"success"===O?"success":"error"===O||"expired"===O||"unavailable"===O?"error":"default",size:"sm",dot:!0,children:!1===a.isActive?"disabled":O||"Unknown"}),(0,d.jsx)(j.Ex,{variant:"default",size:"sm",children:H?"OAuth":I?"Cookie":"API Key"}),A&&(0,d.jsx)(j.Ex,{variant:E,size:"sm",children:"Proxy"}),L&&!1!==a.isActive&&(0,d.jsx)(s,{until:N}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),P()&&(0,d.jsx)(j.Ex,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:P()})]}),A&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:B,children:B}),C&&(0,d.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:C}),D&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:D,children:["no_proxy: ",D]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{className:"relative",ref:v,children:[(0,d.jsxs)("button",{onClick:()=>q(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 ${A?"text-primary":"text-text-muted hover:text-primary"}`,disabled:r,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),p&&(0,d.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,d.jsx)("button",{onClick:()=>F("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!x?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>F(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${x===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),(0,d.jsxs)("button",{onClick:m,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(j.lM,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}p.propTypes={model:o().shape({id:o().string.isRequired}).isRequired,fullModel:o().string.isRequired,alias:o().string,copied:o().string,onCopy:o().func.isRequired,testStatus:o().oneOf(["ok","error"]),isCustom:o().bool,isFree:o().bool,onDeleteAlias:o().func,onTest:o().func,isTesting:o().bool,onDisable:o().func,isFirst:o().bool,isLast:o().bool,onMoveUp:o().func,onMoveDown:o().func},o().string.isRequired,o().string.isRequired,o().string,o().func.isRequired,o().func.isRequired,o().func,o().oneOf(["ok","error"]),o().bool,o().string.isRequired,o().object.isRequired,o().string,o().func.isRequired,o().func.isRequired,o().func.isRequired,r.propTypes={providerStorageAlias:o().string.isRequired,providerDisplayAlias:o().string.isRequired,modelAliases:o().object.isRequired,copied:o().string,onCopy:o().func.isRequired,onSetAlias:o().func.isRequired,onDeleteAlias:o().func.isRequired,connections:o().arrayOf(o().shape({id:o().string,isActive:o().bool})).isRequired,isAnthropic:o().bool},s.propTypes={until:o().string.isRequired},t.propTypes={connection:o().shape({id:o().string,name:o().string,email:o().string,displayName:o().string,modelLockUntil:o().string,testStatus:o().string,isActive:o().bool,lastError:o().string,priority:o().number,globalPriority:o().number}).isRequired,proxyPools:o().arrayOf(o().shape({id:o().string,name:o().string,proxyUrl:o().string,noProxy:o().string,isActive:o().bool})),isOAuth:o().bool.isRequired,isFirst:o().bool.isRequired,isLast:o().bool.isRequired,onMoveUp:o().func.isRequired,onMoveDown:o().func.isRequired,onToggleActive:o().func.isRequired,onUpdateProxy:o().func,onEdit:o().func.isRequired,onDelete:o().func.isRequired,oneByOneStatus:o().shape({state:o().string,error:o().string})};let u=`name1|sk-key1
1
+ (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},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")},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")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},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")},38522:a=>{"use strict";a.exports=require("node:zlib")},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")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},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")},59536:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},60628:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>G});var d=c(48249),e=c(67484),f=c(19099),g=c(2116),h=c.n(g),i=c(81220),j=c(50412),k=c(92592),l=c(91431),m=c(50377),n=c(89745),o=c(99258);function p({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:d=[],type:e="llm",includeLegacyAliases:f=!0}){let g=new Set(d.map(a=>a.id)),h=new Set,i=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(e&&a!==e||g.has(b.id))continue;let d=`${c}/${b.id}`;h.has(d)||(h.add(d),i.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a}))}if(!f)return i;let j=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(j))continue;let b=c.slice(j.length);!b||g.has(b)||h.has(c)||(h.add(c),i.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:e||"llm"}))}return i}var q=c(49885),r=c.n(q);function s({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:k,onTest:l,isTesting:m,onDisable:n,caps:o,isFirst:p,isLast:q,onMoveUp:r,onMoveDown:t}){let u="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.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,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(r||t)&&(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:r,disabled:p,className:`p-0.5 rounded ${p?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:t,disabled:q,className:`p-0.5 rounded ${q?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:u?{color:u}:void 0,children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.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:b}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,d.jsx)(j.nh,{caps:o,colorOverride:"text-text-muted/70",size:12})]})]}),l&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:l,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,d.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:m?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(b,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:e===`model-${a.id}`?"check":"content_copy"})}),(0,d.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:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:k,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):n?(0,d.jsx)("button",{onClick:n,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function t({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.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"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.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:i?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function u({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:k,onDeleteCustomModel:l,connections:m,isAnthropic:n}){let[o,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)({}),B=async b=>{if(!x){y(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();A(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{A(a=>({...a,[b]:"error"}))}finally{y(null)}}},C=p({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),D=async()=>{if(!o.trim()||r)return;let a=o.trim();if(C.some(b=>b.id===a))return void alert("Model already exists for this provider.");s(!0);try{await k(a),q("")}catch(a){console.log("Error adding model:",a)}finally{s(!1)}},E=async()=>{if(v)return;let a=m.find(a=>!1!==a.isActive);if(a){w(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void alert("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(C.some(a=>a.id===b)||(await k(b),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{w(!1)}}},F=m.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",n?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:o,onChange:a=>q(a.target.value),onKeyDown:a=>"Enter"===a.key&&D(),placeholder:n?"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,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:D,disabled:!o.trim()||r,children:r?"Adding...":"Add"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"download",onClick:E,disabled:!F||v,children:v?"Importing...":"Import from /models"})]}),!F&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({id:c,alias:e,source:f})=>(0,d.jsx)(t,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:m.length>0?()=>B(c):void 0,testStatus:z[c],isTesting:x===c},`${f}-${a}/${c}`))})]})}s.propTypes={model:r().shape({id:r().string.isRequired}).isRequired,fullModel:r().string.isRequired,alias:r().string,copied:r().string,onCopy:r().func.isRequired,testStatus:r().oneOf(["ok","error"]),isCustom:r().bool,isFree:r().bool,onDeleteAlias:r().func,onTest:r().func,isTesting:r().bool,onDisable:r().func,caps:r().object,isFirst:r().bool,isLast:r().bool,onMoveUp:r().func,onMoveDown:r().func},r().string.isRequired,r().string.isRequired,r().string,r().func.isRequired,r().func.isRequired,r().func,r().oneOf(["ok","error"]),r().bool,r().string.isRequired,r().object.isRequired,r().arrayOf(r().object),r().string,r().func.isRequired,r().func.isRequired,r().func.isRequired,r().func.isRequired,u.propTypes={providerStorageAlias:r().string.isRequired,providerDisplayAlias:r().string.isRequired,modelAliases:r().object.isRequired,customModels:r().arrayOf(r().object),copied:r().string,onCopy:r().func.isRequired,onDeleteAlias:r().func.isRequired,onAddCustomModel:r().func.isRequired,onDeleteCustomModel:r().func.isRequired,connections:r().arrayOf(r().shape({id:r().string,isActive:r().bool})).isRequired,isAnthropic:r().bool};var v=c(74875);function w({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}function x({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:g,onMoveUp:h,onMoveDown:i,onToggleActive:k,onUpdateProxy:l,onEdit:m,onDelete:n,oneByOneStatus:o=null,autoPing:p=null}){let[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),u=(0,e.useRef)(null),y=new Map((b||[]).map(a=>[a.id,a])),z=a.providerSpecificData?.proxyPoolId||null,A=z?y.get(z):null,B=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,C=!!z||B,D=A?`Pool: ${A.name}`:z?`Pool: ${z} (inactive/missing)`:B?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",E="";if(A?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=A?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);E=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{E=b}}let F=A?.noProxy||a.providerSpecificData?.connectionNoProxy||"",G="default";A?.isActive===!0?G="success":(z||B)&&(G="error");let H=async a=>{t(!0);try{await l("__none__"===a?null:a)}finally{t(!1),r(!1)}},I=a.authType||(c?"oauth":"apikey"),J="oauth"===I,K="cookie"===I,L=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(J?"OAuth Account":K?"Cookie Account":"API Key"),M=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,[N,O]=(0,e.useState)(!1),P=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,Q="unavailable"!==a.testStatus||N?a.testStatus:"active",R=()=>o?"queued"===o.state?"queued":"testing"===o.state?"testing":"success"===o.state?"success":"failed"===o.state?o.error?`failed: ${o.error}`:"failed":null:null;return(0,d.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,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:h,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:i,disabled:g,className:`p-0.5 rounded ${g?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:K?"cookie":J?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:L}),M&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:M}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(j.Ex,{variant:(0,v.g)(a.isActive,Q),size:"sm",dot:!0,children:!1===a.isActive?"disabled":Q||"Unknown"}),(0,d.jsx)(j.Ex,{variant:"default",size:"sm",children:J?"OAuth":K?"Cookie":"API Key"}),C&&(0,d.jsx)(j.Ex,{variant:G,size:"sm",children:"Proxy"}),N&&!1!==a.isActive&&(0,d.jsx)(w,{until:P}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),R()&&(0,d.jsx)(j.Ex,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:R()})]}),C&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:D,children:D}),E&&(0,d.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:E}),F&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:F,children:["no_proxy: ",F]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{className:"relative",ref:u,children:[(0,d.jsxs)("button",{onClick:()=>r(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 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),q&&(0,d.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,d.jsx)("button",{onClick:()=>H("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!z?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>H(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${z===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),p&&(0,d.jsx)(j.m_,{text:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",children:(0,d.jsxs)("button",{onClick:()=>p.onToggle(!p.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 ${p.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick:m,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(j.lM,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}w.propTypes={until:r().string.isRequired},x.propTypes={connection:r().shape({id:r().string,name:r().string,email:r().string,displayName:r().string,modelLockUntil:r().string,testStatus:r().string,isActive:r().bool,lastError:r().string,priority:r().number,globalPriority:r().number}).isRequired,proxyPools:r().arrayOf(r().shape({id:r().string,name:r().string,proxyUrl:r().string,noProxy:r().string,isActive:r().bool})),isOAuth:r().bool.isRequired,isFirst:r().bool.isRequired,isLast:r().bool.isRequired,onMoveUp:r().func.isRequired,onMoveDown:r().func.isRequired,onToggleActive:r().func.isRequired,onUpdateProxy:r().func,onEdit:r().func.isRequired,onDelete:r().func.isRequired,oneByOneStatus:r().shape({state:r().string,error:r().string}),autoPing:r().shape({on:r().bool,onToggle:r().func})};let y=`name1|sk-key1
3
2
  name2|sk-key2
4
- sk-key-only-auto-named`;function v({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:l,proxyPools:m,error:n,onSave:o,onBulkDone:p,onClose:q}){let r="__none__",s="ollama-local"===b,t="cookie"===h,w="xai"===b&&!t,x=t?"Cookie Value":"API Key",y="azure"===b,z="cloudflare-ai"===b,A=k.Q2?.[b]?.regions||null,B=k.Q2?.[b]?.defaultRegion||A?.[0]?.id||"",[C,D]=(0,e.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:r,ollamaHostUrl:""}),[E,F]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[G,H]=(0,e.useState)({accountId:""}),[I,J]=(0,e.useState)(B),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)(null),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)("single"),[S,T]=(0,e.useState)(""),[U,V]=(0,e.useState)(null),W=()=>s&&C.ollamaHostUrl.trim()?{baseUrl:C.ollamaHostUrl.trim()}:y?{azureEndpoint:E.azureEndpoint,apiVersion:E.apiVersion,deployment:E.deployment,organization:E.organization}:z?{accountId:G.accountId}:A&&I?{region:I}:void 0,X=async()=>{L(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:C.apiKey,providerSpecificData:W()})}),c=await a.json();N(c.valid?"success":"failed")}catch{N("failed")}finally{L(!1)}},Y=async()=>{if(b&&(s||C.apiKey)&&(s||C.name)&&(!f||C.defaultModel.trim())){P(!0);try{let a=!1;try{L(!0),N(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:C.apiKey,providerSpecificData:W()})});a=!!(await c.json()).valid,N(a?"success":"failed")}catch{N("failed")}finally{L(!1)}await o({name:C.name||(s?"Ollama Local":""),apiKey:C.apiKey,defaultModel:f?C.defaultModel.trim():void 0,priority:C.priority,proxyPoolId:C.proxyPoolId===r?null:C.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:W()})}finally{P(!1)}}},Z=async()=>{let a=S.split("\n").map(a=>a.trim()).filter(Boolean);if(!a.length)return;P(!0),V(null);let c=0,d=0;for(let e=0;e<a.length;e++){let f=a[e].split("|"),g=f.length>=2?f.slice(1).join("|").trim():f[0].trim(),h=f.length>=2?f[0].trim():"Key",i=`${h} ${e+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:g,name:i,priority:1,testStatus:"unknown"})})).ok?c++:d++}catch{d++}}P(!1),V({success:c,failed:d}),c>0&&p&&p()};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Add ${c||b} ${x}`,onClose:q,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{size:"sm",variant:"single"===Q?"primary":"ghost",onClick:()=>{R("single"),V(null)},children:"Single"}),(0,d.jsx)(j.$n,{size:"sm",variant:"bulk"===Q?"primary":"ghost",onClick:()=>{R("bulk"),V(null)},children:"Bulk Add"})]}),"bulk"===Q&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,d.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:u,value:S,onChange:a=>T(a.target.value)}),U&&(0,d.jsxs)("div",{className:`text-sm font-medium ${U.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",U.success," added",U.failed>0?`, ✗ ${U.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Z,fullWidth:!0,disabled:O||!S.trim(),children:O?"Adding...":"Add All Keys"}),(0,d.jsx)(j.$n,{onClick:q,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===Q&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.pd,{label:"Name",value:C.name,onChange:a=>D({...C,name:a.target.value}),placeholder:s?"Ollama Local":"Production Key"}),s&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"Ollama Host URL",value:C.ollamaHostUrl,onChange:a=>D({...C,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:K||O,variant:"secondary",children:K?"Checking...":"Check"})})]}),!s&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:x,type:t?"text":"password",value:C.apiKey,onChange:a=>D({...C,apiKey:a.target.value}),placeholder:t?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":w?"xai-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:!C.apiKey||K||O,variant:"secondary",children:K?"Checking...":"Check"})})]}),w&&(0,d.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."}),t&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,l&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",l.replace(/^https?:\/\//,"")]})]})]}),A&&(0,d.jsx)(j.l6,{label:"Region",value:I,onChange:a=>J(a.target.value),options:A.map(a=>({value:a.id,label:a.label}))}),f&&(0,d.jsx)(j.pd,{label:"Default Model",value:C.defaultModel,onChange:a=>D({...C,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),s&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),M&&(0,d.jsx)(j.Ex,{variant:"success"===M?"success":"error",children:"success"===M?"Valid":"Invalid"}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),f&&(0,d.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."}),z&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(j.pd,{label:"Account ID",value:G.accountId,onChange:a=>H({...G,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),y&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.pd,{label:"Azure Endpoint",value:E.azureEndpoint,onChange:a=>F({...E,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(j.pd,{label:"Deployment Name",value:E.deployment,onChange:a=>F({...E,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(j.pd,{label:"API Version",value:E.apiVersion,onChange:a=>F({...E,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(j.pd,{label:"Organization",value:E.organization,onChange:a=>F({...E,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(j.pd,{label:"Priority",type:"number",value:C.priority,onChange:a=>D({...C,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(j.l6,{label:"Proxy Pool",value:C.proxyPoolId,onChange:a=>D({...C,proxyPoolId:a.target.value}),options:[{value:r,label:"None"},...(m||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(m||[]).length&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Y,fullWidth:!0,disabled:O||!s&&(!C.name||!C.apiKey)||f&&!C.defaultModel.trim()||y&&(!E.azureEndpoint||!E.deployment||!E.organization)||z&&!G.accountId,children:O?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:q,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function w({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),u=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){l(!0);try{let a={name:h.name,prefix:h.prefix,baseUrl:h.baseUrl};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},v=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(j.pd,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,d.jsx)(j.pd,{label:"Prefix",value:h.prefix,onChange:a=>i({...h,prefix:a.target.value}),placeholder:g?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!g&&(0,d.jsx)(j.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(j.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...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,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:v,disabled:!m||q||!h.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(j.pd,{label:"Model ID (optional)",value:o,onChange:a=>p(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."}),s&&(0,d.jsx)(j.Ex,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:u,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||k,children:k?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function x({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useState)(""),[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),q=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},r=async()=>{let a=q(h.trim());if(a){l("testing"),n("");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();l(d.ok?"ok":"error"),n(d.error||"")}catch(a){l("error"),n(a.message)}}},s=async()=>{let a=q(h.trim());if(a&&!o){p(!0);try{await f(a)}finally{p(!1)}}};return(0,d.jsx)(j.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{type:"text",value:h,onChange:a=>{i(a.target.value),l(null),n("")},onKeyDown:a=>{"Enter"===a.key&&r()},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,d.jsx)(j.$n,{variant:"secondary",icon:"science",loading:"testing"===k,onClick:r,disabled:!h.trim()||"testing"===k,children:"testing"===k?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:q(h.trim())||"model-id"})]})]}),"ok"===k&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===k&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:m||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(j.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(j.$n,{onClick:s,fullWidth:!0,size:"sm",disabled:!h.trim()||o,children:o?"Adding...":"Add Model"})]})]})})}function y({isOpen:a,provider:b,onClose:c,onDone:f}){let[g,h]=(0,e.useState)(""),[i,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(null),[n,o]=(0,e.useState)(""),p=g.split("\n").map(a=>a.trim()).filter(Boolean).filter(a=>{let b=a.indexOf("|");return(-1===b?a:a.slice(b+1).trim()).length>0}).length;async function q(){if(p){k(!0),o(""),m(null);try{let a=await fetch(`/api/providers/${b}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lines:g})}),c=await a.json();if(!a.ok)throw Error(c.error||"Failed");m(c),f?.()}catch(a){o(a.message)}finally{k(!1)}}}function r(){h(""),m(null),o(""),c()}return(0,d.jsx)(j.aF,{isOpen:a,onClose:r,title:"Add Keys to Pool",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted mb-2",children:["Paste keys below — one per line. Format: ",(0,d.jsx)("code",{className:"text-xs bg-black/10 dark:bg-white/10 px-1 rounded",children:"name|key"})," or just ",(0,d.jsx)("code",{className:"text-xs bg-black/10 dark:bg-white/10 px-1 rounded",children:"key"}),"."]}),(0,d.jsx)("textarea",{className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm font-mono focus:outline-none focus:border-primary resize-none",rows:10,placeholder:"my-key-1|sk-ant-api03-...\nmy-key-2|sk-ant-api03-...\nsk-ant-api03-...",value:g,onChange:a=>{h(a.target.value),m(null)}}),(0,d.jsx)("p",{className:"text-xs text-text-muted mt-1",children:p>0?`${p} valid key${1!==p?"s":""} detected`:"Paste keys above"})]}),l&&(0,d.jsxs)("div",{className:"rounded-md border border-green-500/30 bg-green-500/10 px-3 py-2 text-sm text-green-600 dark:text-green-400",children:["Added ",l.added," key",1!==l.added?"s":""," to pool.",l.skipped>0&&` Skipped ${l.skipped} duplicate${1!==l.skipped?"s":""}.`]}),n&&(0,d.jsx)("p",{className:"text-sm text-red-500",children:n}),(0,d.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,d.jsx)(j.$n,{variant:"ghost",onClick:r,children:"Close"}),(0,d.jsx)(j.$n,{onClick:q,disabled:!p||i,children:i?"Adding...":`Add ${p||""} Keys`})]})]})})}function z({provider:a,onPullDone:b}){let[c,f]=(0,e.useState)({keys:[],count:0,page:1,totalPages:1,poolSize:30,autoReplace:!0}),[g,h]=(0,e.useState)(!0),[i,k]=(0,e.useState)(""),[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)(null),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(1),v=(0,e.useCallback)(async(b=t)=>{try{let c=await fetch(`/api/providers/${a}/pool?page=${b}&limit=50`,{cache:"no-store"});if(c.ok){let a=await c.json();f(a),i||k(String(a.poolSize))}}catch{}h(!1)},[a,t,i]);async function w(){m(!0),o(null);try{let d=parseInt(i,10)||c.poolSize,e=await fetch(`/api/providers/${a}/pool/pull`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:d})}),f=await e.json();if(!e.ok)throw Error(f.error||"Pull failed");o(f),u(1),await v(1),b?.()}catch(a){o({error:a.message})}finally{m(!1)}}async function x(b){s(b);try{await fetch(`/api/providers/${a}/pool?keyId=${b}`,{method:"DELETE"}),await v(t)}finally{s(null)}}async function A(b){f(a=>({...a,autoReplace:b})),await fetch(`/api/providers/${a}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({autoReplace:b})})}async function B(){let b=parseInt(i,10);!Number.isFinite(b)||b<1||b!==c.poolSize&&(f(a=>({...a,poolSize:b})),await fetch(`/api/providers/${a}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poolSize:b})}))}return g?(0,d.jsx)("div",{className:"py-8 text-center text-sm text-text-muted",children:"Loading pool..."}):(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-4",children:[(0,d.jsxs)("span",{className:"font-medium",children:[c.count," key",1!==c.count?"s":""," in pool"]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Auto-replace"}),(0,d.jsx)(j.lM,{checked:c.autoReplace,onChange:A})]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Pull"}),(0,d.jsx)("input",{type:"number",min:"1",className:"w-16 rounded-md border border-border bg-background px-2 py-1 text-sm text-center focus:outline-none focus:border-primary",value:i,onChange:a=>k(a.target.value),onBlur:B}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"keys"}),(0,d.jsx)(j.$n,{size:"sm",icon:"download",onClick:w,disabled:l||0===c.count,children:l?"Pulling...":"Pull from pool"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>q(!0),children:"Add to pool"})]})]}),n&&(0,d.jsx)("div",{className:`rounded-md border px-3 py-2 text-sm ${n.error?"border-red-500/30 bg-red-500/10 text-red-500":"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400"}`,children:n.error?n.error:`Pulled ${n.pulled} key${1!==n.pulled?"s":""} to connections.${n.skipped?` Skipped ${n.skipped} duplicate${1!==n.skipped?"s":""}.`:""}${n.message?` ${n.message}`:""}`}),0===c.keys.length?(0,d.jsxs)("div",{className:"flex flex-col items-center gap-3 rounded-lg border border-border py-10 text-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-text-muted",children:"key_off"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No keys in pool"}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:()=>q(!0),children:"Add Keys to Pool"})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border",children:(0,d.jsxs)("table",{className:"w-full text-sm",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{className:"border-b border-border bg-black/[0.02] dark:bg-white/[0.02] text-xs text-text-muted",children:[(0,d.jsx)("th",{className:"px-4 py-2 text-left font-medium uppercase tracking-wide",children:"Name"}),(0,d.jsx)("th",{className:"px-4 py-2 text-left font-medium uppercase tracking-wide",children:"Key"}),(0,d.jsx)("th",{className:"px-4 py-2 text-right font-medium uppercase tracking-wide",children:"Action"})]})}),(0,d.jsx)("tbody",{children:c.keys.map((a,b)=>(0,d.jsxs)("tr",{className:`border-b border-border last:border-0 ${b%2==0?"":"bg-black/[0.01] dark:bg-white/[0.01]"}`,children:[(0,d.jsx)("td",{className:"px-4 py-2 text-text-muted",children:a.name||(0,d.jsx)("span",{className:"text-text-muted/50 italic",children:"—"})}),(0,d.jsx)("td",{className:"px-4 py-2 font-mono text-xs text-text-muted",children:a.key}),(0,d.jsx)("td",{className:"px-4 py-2 text-right",children:(0,d.jsx)("button",{className:"text-red-500 hover:text-red-400 transition-colors disabled:opacity-40",onClick:()=>x(a.id),disabled:r===a.id,title:"Remove from pool",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"close"})})})]},a.id))})]})}),c.totalPages>1&&(0,d.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,d.jsxs)("span",{className:"text-text-muted text-xs",children:["Page ",c.page," of ",c.totalPages," (",c.count," total)"]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"chevron_left",disabled:t<=1,onClick:()=>u(a=>a-1),children:"Prev"}),(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"chevron_right",disabled:t>=c.totalPages,onClick:()=>u(a=>a+1),children:"Next"})]})]})]}),(0,d.jsx)(y,{isOpen:p,provider:a,onClose:()=>q(!1),onDone:()=>{u(1),v(1)}})]})}function A(){let a,b=(0,f.useParams)(),c=(0,f.useRouter)(),g=b.id,[n,o]=(0,e.useState)([]),[q,s]=(0,e.useState)(!0),[u,y]=(0,e.useState)(null),[A,B]=(0,e.useState)([]),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(""),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)(null),[S,T]=(0,e.useState)({}),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)({}),[Y,Z]=(0,e.useState)(""),[$,_]=(0,e.useState)(null),[aa,ab]=(0,e.useState)(!1),[ac,ad]=(0,e.useState)([]),[ae,af]=(0,e.useState)("__none__"),[ag,ah]=(0,e.useState)(!1),[ai,aj]=(0,e.useState)(null),[ak,al]=(0,e.useState)(""),[am,an]=(0,e.useState)("auto"),[ao,ap]=(0,e.useState)([]),[aq,ar]=(0,e.useState)([]),[as,at]=(0,e.useState)([]),[au,av]=(0,e.useState)(null),[aw,ax]=(0,e.useState)(null),[ay,az]=(0,e.useState)(!1),[aA,aB]=(0,e.useState)("connections"),[aC,aD]=(0,e.useState)(!1),[aE,aF]=(0,e.useState)(!1),[aG,aH]=(0,e.useState)(!1),[aI,aJ]=(0,e.useState)(null),[aK,aL]=(0,e.useState)({}),[aM,aN]=(0,e.useState)(null),aO=(0,e.useRef)(!1),{copied:aP,copy:aQ}=(0,m.C)(),aR=()=>{D(!0)},aS=()=>{aX?aR():(J(""),H(!0))},aT=()=>{J(""),H(!0)},aU=()=>{aX?aS():aT()},aV=u?{id:u.id,name:u.name||("anthropic-compatible"===u.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===u.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===u.type?"AC":"OC",apiType:u.apiType,baseUrl:u.baseUrl,type:u.type}:k.zN[g]||k.fg[g]||k.IS[g]||k.nJ[g]||k.br[g],aW=aV?.authModes||[],aX=!!k.zN[g]||!!k.IS[g]||aW.includes("oauth"),aY=!!k.fg[g]||aW.includes("apikey"),aZ=!!k.IS[g]?.noAuth,a$=(0,l.KC)(g),a_=(0,k.wG)(g),a0=(0,k.mq)(g),a1=(0,k.gb)(g),a2=a0||a1,a3=!a2&&aX&&aY,a4="xai"===g?"Grok Build OAuth":"OAuth",a5="xai"===g?"xAI API Key":"API Key";k.Q2[g]?.thinkingConfig||k.s9.extended;let a6=a2?g:a_,a7=a2?u?.prefix||g:a_,a8=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(a6)}`,{cache:"no-store"}),b=await a.json();a.ok&&at(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[a6]),a9=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/order?providerAlias=${encodeURIComponent(a6)}`,{cache:"no-store"}),b=await a.json();a.ok&&av(b.order||null)}catch(a){console.log("Error fetching model order:",a)}},[a6]),ba=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:a6,ids:[a]})})).ok&&await a8()}catch(a){console.log("Error disabling model:",a)}},bb=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(a6)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await a8()}catch(a){console.log("Error enabling model:",a)}},bc=async a=>{a.length&&ax({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{ax(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:a6,ids:a})})).ok&&await a8()}catch(a){console.log("Error disabling all models:",a)}}})},bd=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(a6)}`,{method:"DELETE"})).ok&&await a8()}catch(a){console.log("Error enabling all models:",a)}},be=async(a,b)=>{let c=[...a$,...aq.filter(a=>!a$.some(b=>b.id===a.id))].filter(a=>!a.type||"llm"===a.type),d=new Set(as),e=c.filter(a=>!d.has(a.id)).map(a=>a.id),f=au?[...au.filter(a=>e.includes(a)),...e.filter(a=>!au.includes(a))]:e,g=f.indexOf(a);if(-1===g)return;let h="up"===b?g-1:g+1;if(h<0||h>=f.length)return;let i=[...f];[i[g],i[h]]=[i[h],i[g]],av(i);try{await fetch("/api/models/order",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:a6,order:i})})}catch(a){console.log("Error saving model order:",a),await a9()}},bf=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias",{cache:"no-store"}),b=await a.json();a.ok&&T(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bg=(0,e.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(),h=await c.json(),i=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===g);o(a)}c.ok&&B(h.proxyPools||[]);let j=(i.providerStrategies||{})[g]||{};aj(j.fallbackStrategy||null),al(null!=j.stickyRoundRobinLimit?String(j.stickyRoundRobinLimit):"1");let k=(i.providerThinking||{})[g]||{};if(an(k.mode||"auto"),b.ok){let a=(f.nodes||[]).find(a=>a.id===g)||null;if(!a&&a2)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===g)||null))break}y(a)}}catch(a){console.log("Error fetching connections:",a)}finally{s(!1)}},[g,a2]),bh=async a=>{try{let b=await fetch(`/api/provider-nodes/${g}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(y(c.node),await bg(),N(!1))}catch(a){console.log("Error updating provider node:",a)}},bi=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={};a&&(e.fallbackStrategy=a),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[g]:f[g]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){console.log("Error saving provider strategy:",a)}},bj=async(a,b,c=a_)=>{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 bf();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bk=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bf()}catch(a){console.log("Error deleting alias:",a)}},bl=async()=>{if(aE||0===n.length)return;let a=Object.fromEntries(n.map(a=>[a.id,{state:"queued",error:null}]));aO.current=!1,aF(!0),aH(!1),aJ(null),aL(a),aN({total:n.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<n.length;a+=1){if(aO.current){aN({total:n.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=n[a];aJ(d.id),aL(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,aL(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,aL(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}aN({total:n.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<n.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aJ(null),aF(!1),aH(!1),aO.current=!1}},bm=async a=>{ax({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{ax(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&o(n.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bn=()=>{bg(),D(!1)},bo=async a=>{J("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:g,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bg(),H(!1);return}J(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),J("Failed to save connection")}},bp=async a=>{try{(await fetch(`/api/providers/${Q.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bg(),L(!1))}catch(a){console.log("Error updating connection:",a)}},bq=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&o(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},br=async a=>{o(b=>b.map(b=>({...b,isActive:a})));try{await Promise.all(n.map(b=>fetch(`/api/providers/${b.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:a})})))}catch(a){console.log("Error toggling all connections:",a),await bg()}},bs=async(a,b)=>{let c=[...n];[c[a],c[b]]=[c[b],c[a]],o(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 bg()}},bt=n.filter(a=>ac.includes(a.id));n.length>0&&(ac.length,n.length);let bu=n.some(a=>!1!==a.isActive);(()=>{if(0===bt.length)return;let a=new Set(bt.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return;let c=A.find(a=>a.id===b);return c?.name}})();let bv=()=>{ag||P(!1)},bw=async a=>{ah(!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 bg(),P(!1)}finally{ah(!1)}},bx=a=>bw(n.map(b=>({connectionId:b.id,proxyPoolId:a}))),by=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:n.map((a,b)=>(0,d.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(t,{connection:a,proxyPools:A,isOAuth:aX,isFirst:0===b,isLast:b===n.length-1,onMoveUp:()=>bs(b,b-1),onMoveDown:()=>bs(b,b+1),onToggleActive:b=>bq(a.id,b),onUpdateProxy:async b=>{try{(await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:b||null})})).ok&&o(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:()=>{R(a),L(!0)},onDelete:()=>bm(a.id),oneByOneStatus:aK[a.id]||null})})},a.id))}),bz=A.filter(a=>!0===a.isActive),bA=(0,d.jsx)(j.aF,{isOpen:O,onClose:bv,title:`Apply Proxy (${n.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:()=>{let a=A.filter(a=>!0===a.isActive);return 0===a.length?void alert("No active proxy pools available."):bw(n.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},disabled:ag||0===bz.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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>bx(null),disabled:ag,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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),A.map(a=>(0,d.jsxs)("button",{onClick:()=>bx(a.id),disabled:ag||!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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,d.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),ag&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(j.$n,{onClick:bv,variant:"ghost",fullWidth:!0,disabled:ag,children:"Cancel"})]})}),bB=async a=>{if(!$){_(a);try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a6}/${a}`})}),c=await b.json();X(b=>({...b,[a]:c.ok?"ok":"error"})),Z(c.ok?"":c.error||"Model not reachable")}catch{X(b=>({...b,[a]:"error"})),Z("Network error")}finally{_(null)}}};return q?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(j.Qv,{}),(0,d.jsx)(j.Qv,{})]}):aV?(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(h(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${aV.color}15`},children:U?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:aV.color},children:aV.textIcon||aV.id.slice(0,2).toUpperCase()}):(0,d.jsx)(i.default,{src:a0&&aV.apiType?"responses"===aV.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":a1?"/providers/anthropic-m.png":`/providers/${aV.id}.png`,alt:aV.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>V(!0)})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:aV.name}),(aV.notice?.apiKeyUrl||aV.notice?.signupUrl||aV.website)&&(0,d.jsxs)("a",{href:aV.notice?.apiKeyUrl||aV.notice?.signupUrl||aV.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),aV.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[n.length," connection",1===n.length?"":"s"]})]})]})]}),aV.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:aV.deprecationNotice})]}),aV.notice?.text&&!aV.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:aV.notice.text}),aV.notice.apiKeyUrl&&(0,d.jsx)("a",{href:aV.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),a2&&u&&(0,d.jsx)(j.Zp,{children:(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:a1?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[a1?"Messages API":"responses"===u.apiType?"Responses API":"Chat Completions"," \xb7 ",(u.baseUrl||"").replace(/\/$/,""),"/",a1?"messages":"responses"===u.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:()=>{J(""),H(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>N(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{ax({title:"Delete Compatible Node",message:`Delete this ${a1?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{ax(null);try{(await fetch(`/api/provider-nodes/${g}`,{method:"DELETE"})).ok&&c.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),aZ?(0,d.jsx)(j.gw,{providerId:g}):(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsxs)("button",{className:`px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${"connections"===aA?"bg-primary text-white":"text-text-muted hover:text-foreground"}`,onClick:()=>aB("connections"),children:["Connections (",n.length,")"]}),(0,d.jsx)("button",{className:`px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${"pool"===aA?"bg-primary text-white":"text-text-muted hover:text-foreground"}`,onClick:()=>aB("pool"),children:"\uD83D\uDD11 Key Pool"})]}),"connections"===aA&&(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[n.some(a=>!a.isActive)&&(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"delete_sweep",disabled:aC,onClick:async()=>{aD(!0);try{await fetch(`/api/providers/${g}/connections/disabled`,{method:"DELETE"}),await bg()}finally{aD(!1)}},children:aC?"Deleting...":`Delete Disabled (${n.filter(a=>!a.isActive).length})`}),n.length>1&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:bu?"toggle_off":"toggle_on",onClick:()=>br(!bu),children:bu?"Disable All":"Enable All"}),n.length>0&&A.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>P(!0),children:"Apply Proxy"}),n.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:bl,disabled:aE,children:aE?"Testing Connection One-by-One...":"Test Connection One-by-One"}),aE&&(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aE&&(aO.current=!0,aH(!0))},disabled:aG,children:aG?"Stopping...":"Stop"})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(j.lM,{checked:"round-robin"===ai,onChange:a=>{let b=a?"round-robin":null,c=a?ak||"1":ak;a&&!ak&&al("1"),aj(b),bi(b,c)}}),"round-robin"===ai&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:ak,onChange:a=>{var b;al(b=a.target.value),bi("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),"pool"===aA?(0,d.jsx)(z,{provider:g,onPullDone:bg}):0===n.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:aX?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),a3&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",a4," or ",a5,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:a3?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:aS,children:a4}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:aT,children:a5})]}):(0,d.jsxs)(d.Fragment,{children:[!a2&&"iflow"===g&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>F(!0),children:"Cookie"}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:aU,children:a2?"Add API Key":"iflow"===g?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[aM&&(0,d.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,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",aM.total]}),(0,d.jsxs)("span",{children:["Completed: ",aM.completed]}),(0,d.jsxs)("span",{children:["Passed: ",aM.passed]}),(0,d.jsxs)("span",{children:["Failed: ",aM.failed]}),aM.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),aE&&aI&&(0,d.jsxs)("span",{children:["Running: ",n.find(a=>a.id===aI)?.name||aI]})]})}),by,!a2&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===g&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>F(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),a3?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:aS,className:"w-full sm:w-auto",children:a4}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:aT,className:"w-full sm:w-auto",children:a5})]}):(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:aU,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!a2&&(a=[...a$,...aq.filter(a=>!a$.some(b=>b.id===a.id))].filter(a=>!a.type||"llm"===a.type).map(a=>a.id).filter(a=>!as.includes(a)),(0,d.jsxs)("div",{className:"flex gap-2",children:[as.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bd,children:"Active All"}),a.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bc(a),children:"Disable All"})]}))]}),!!Y&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:Y}),(()=>{let a,b,c;if(a2)return(0,d.jsx)(r,{providerStorageAlias:a6,providerDisplayAlias:a7,modelAliases:S,copied:aP,onCopy:aQ,onSetAlias:bj,onDeleteAlias:bk,connections:n,isAnthropic:a1});let e=[...a$,...aq.filter(a=>!a$.some(b=>b.id===a.id))].filter(a=>!a.type||"llm"===a.type),f=new Set(as),h=e.filter(a=>!f.has(a.id)),i=e.filter(a=>f.has(a.id)),j=h.map(a=>a.id),k=au?[...au.filter(a=>j.includes(a)).map(a=>h.find(b=>b.id===a)),...h.filter(a=>!au.includes(a.id))]:h,l=Object.entries(S).filter(([a,b])=>{let c=`${a6}/`;if(!b.startsWith(c))return!1;let d=b.slice(c.length);return aV.passthroughModels?!a$.some(a=>a.id===d):!a$.some(a=>a.id===d)&&a===d}).map(([a,b])=>({id:b.slice(`${a6}/`.length),alias:a,fullModel:b}));return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[l.map(a=>(0,d.jsx)(p,{model:{id:a.id},fullModel:`${a7}/${a.id}`,alias:a.alias,copied:aP,onCopy:aQ,onSetAlias:()=>{},onDeleteAlias:()=>bk(a.alias),testStatus:W[a.id],onTest:n.length>0||aZ?()=>bB(a.id):void 0,isTesting:$===a.id,isCustom:!0,isFree:!1},a.id)),k.map((a,b)=>{let c=`${a6}/${a.id}`,e=`${g}/${a.id}`,f=Object.entries(S).find(([,a])=>a===c||a===e)?.[0];return(0,d.jsx)(p,{model:a,fullModel:`${a7}/${a.id}`,alias:f,copied:aP,onCopy:aQ,onSetAlias:b=>bj(a.id,b,a6),onDeleteAlias:()=>bk(f),testStatus:W[a.id],onTest:n.length>0||aZ?()=>bB(a.id):void 0,isTesting:$===a.id,isFree:a.isFree,onDisable:()=>ba(a.id),isFirst:0===b,isLast:b===k.length-1,onMoveUp:()=>be(a.id,"up"),onMoveDown:()=>be(a.id,"down")},a.id)}),(0,d.jsxs)("button",{onClick:()=>ab(!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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),ao.length>0&&(a=new Set(Object.values(S)),b=new Set(a$.map(a=>a.id)),0===(c=ao.filter(c=>!a.has(`${a6}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{let b=a.id.split("/").pop();await bj(a.id,b,a6)},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,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),i.length>0&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",i.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(a=>(0,d.jsxs)("button",{onClick:()=>bb(a.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})})()]}),bA,"kiro"===g?(0,d.jsx)(j.Mh,{isOpen:C,providerInfo:aV,onSuccess:bn,onClose:()=>D(!1)}):"cursor"===g?(0,d.jsx)(j.G9,{isOpen:C,onSuccess:bn,onClose:()=>D(!1)}):"gitlab"===g?(0,d.jsx)(j.vj,{isOpen:C,providerInfo:aV,onSuccess:bn,onClose:()=>D(!1)}):(0,d.jsx)(j.LF,{isOpen:C,provider:g,providerInfo:aV,onSuccess:bn,onClose:()=>D(!1)}),"iflow"===g&&(0,d.jsx)(j.vE,{isOpen:E,onSuccess:()=>{bg(),F(!1)},onClose:()=>F(!1)}),(0,d.jsx)(v,{isOpen:G,provider:g,providerName:aV.name,isCompatible:a2,isAnthropic:a1,authType:aV?.authType,authHint:aV?.authHint,website:aV?.website,proxyPools:A,error:I,onSave:bo,onBulkDone:bg,onClose:()=>{J(""),H(!1)}}),(0,d.jsx)(j.wI,{isOpen:K,connection:Q,proxyPools:A,onSave:bp,onClose:()=>L(!1)}),a2&&(0,d.jsx)(w,{isOpen:M,node:u,onSave:bh,onClose:()=>N(!1),isAnthropic:a1}),!a2&&(0,d.jsx)(x,{isOpen:aa,providerAlias:a6,providerDisplayAlias:a7,onSave:async a=>{let b=aV?.passthroughModels?a.split("/").pop():a;await bj(a,b,a6),ab(!1)},onClose:()=>ab(!1)}),(0,d.jsx)(j.uo,{isOpen:ay,onClose:()=>az(!1),onConfirm:()=>{(az(!1),aX)?aR():aT()},title:"Risk Notice",message:aV?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(j.uo,{isOpen:!!aw,onClose:()=>ax(null),onConfirm:aw?.onConfirm,title:aw?.title||"Confirm",message:aw?.message,variant:"danger"})]}):(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}v.propTypes={isOpen:o().bool.isRequired,provider:o().string,providerName:o().string,isCompatible:o().bool,isAnthropic:o().bool,authType:o().string,authHint:o().string,website:o().string,proxyPools:o().arrayOf(o().shape({id:o().string,name:o().string})),error:o().string,onSave:o().func.isRequired,onBulkDone:o().func,onClose:o().func.isRequired},w.propTypes={isOpen:o().bool.isRequired,node:o().shape({id:o().string,name:o().string,prefix:o().string,apiType:o().string,baseUrl:o().string}),onSave:o().func.isRequired,onClose:o().func.isRequired,isAnthropic:o().bool},x.propTypes={isOpen:o().bool.isRequired,providerAlias:o().string.isRequired,providerDisplayAlias:o().string.isRequired,onSave:o().func.isRequired,onClose:o().func.isRequired}},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 \"/home/letruonggiang/work/9router/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.")},"/home/letruonggiang/work/9router/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,319,879,3913,1220,914,5681,4404,6064,4372,412,3196],()=>b(b.s=64380));module.exports=c})();
3
+ sk-key-only-auto-named`;function z({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:l,proxyPools:m,error:n,onSave:o,onBulkDone:p,onClose:q}){let r="__none__",s="ollama-local"===b,t="cookie"===h,u="xai"===b&&!t,v=t?"Cookie Value":"API Key",w="azure"===b,x="cloudflare-ai"===b,A=k.Q2?.[b]?.regions||null,B=k.Q2?.[b]?.defaultRegion||A?.[0]?.id||"",[C,D]=(0,e.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:r,ollamaHostUrl:""}),[E,F]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[G,H]=(0,e.useState)({accountId:""}),[I,J]=(0,e.useState)(B),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)(null),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)("single"),[S,T]=(0,e.useState)(""),[U,V]=(0,e.useState)(null),W=()=>s&&C.ollamaHostUrl.trim()?{baseUrl:C.ollamaHostUrl.trim()}:w?{azureEndpoint:E.azureEndpoint,apiVersion:E.apiVersion,deployment:E.deployment,organization:E.organization}:x?{accountId:G.accountId}:A&&I?{region:I}:void 0,X=async()=>{L(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:C.apiKey,providerSpecificData:W()})}),c=await a.json();N(c.valid?"success":"failed")}catch{N("failed")}finally{L(!1)}},Y=async()=>{if(b&&(s||C.apiKey)&&(s||C.name)&&(!f||C.defaultModel.trim())){P(!0);try{let a=!1;try{L(!0),N(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:C.apiKey,providerSpecificData:W()})});a=!!(await c.json()).valid,N(a?"success":"failed")}catch{N("failed")}finally{L(!1)}await o({name:C.name||(s?"Ollama Local":""),apiKey:C.apiKey,defaultModel:f?C.defaultModel.trim():void 0,priority:C.priority,proxyPoolId:C.proxyPoolId===r?null:C.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:W()})}finally{P(!1)}}},Z=async()=>{let a=S.split("\n").map(a=>a.trim()).filter(Boolean);if(!a.length)return;P(!0),V(null);let c=0,d=0;for(let e=0;e<a.length;e++){let f=a[e].split("|"),g=f.length>=2?f.slice(1).join("|").trim():f[0].trim(),h=f.length>=2?f[0].trim():"Key",i=`${h} ${e+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:g,name:i,priority:1,testStatus:"unknown"})})).ok?c++:d++}catch{d++}}P(!1),V({success:c,failed:d}),c>0&&p&&p()};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Add ${c||b} ${v}`,onClose:q,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{size:"sm",variant:"single"===Q?"primary":"ghost",onClick:()=>{R("single"),V(null)},children:"Single"}),(0,d.jsx)(j.$n,{size:"sm",variant:"bulk"===Q?"primary":"ghost",onClick:()=>{R("bulk"),V(null)},children:"Bulk Add"})]}),"bulk"===Q&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,d.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:y,value:S,onChange:a=>T(a.target.value)}),U&&(0,d.jsxs)("div",{className:`text-sm font-medium ${U.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",U.success," added",U.failed>0?`, ✗ ${U.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Z,fullWidth:!0,disabled:O||!S.trim(),children:O?"Adding...":"Add All Keys"}),(0,d.jsx)(j.$n,{onClick:q,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===Q&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.pd,{label:"Name",value:C.name,onChange:a=>D({...C,name:a.target.value}),placeholder:s?"Ollama Local":"Production Key"}),s&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"Ollama Host URL",value:C.ollamaHostUrl,onChange:a=>D({...C,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:K||O,variant:"secondary",children:K?"Checking...":"Check"})})]}),!s&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:v,type:t?"text":"password",value:C.apiKey,onChange:a=>D({...C,apiKey:a.target.value}),placeholder:t?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":u?"xai-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:!C.apiKey||K||O,variant:"secondary",children:K?"Checking...":"Check"})})]}),u&&(0,d.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."}),t&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,l&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",l.replace(/^https?:\/\//,"")]})]})]}),A&&(0,d.jsx)(j.l6,{label:"Region",value:I,onChange:a=>J(a.target.value),options:A.map(a=>({value:a.id,label:a.label}))}),f&&(0,d.jsx)(j.pd,{label:"Default Model",value:C.defaultModel,onChange:a=>D({...C,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),s&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),M&&(0,d.jsx)(j.Ex,{variant:"success"===M?"success":"error",children:"success"===M?"Valid":"Invalid"}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),f&&(0,d.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."}),x&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(j.pd,{label:"Account ID",value:G.accountId,onChange:a=>H({...G,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),w&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.pd,{label:"Azure Endpoint",value:E.azureEndpoint,onChange:a=>F({...E,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(j.pd,{label:"Deployment Name",value:E.deployment,onChange:a=>F({...E,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(j.pd,{label:"API Version",value:E.apiVersion,onChange:a=>F({...E,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(j.pd,{label:"Organization",value:E.organization,onChange:a=>F({...E,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(j.pd,{label:"Priority",type:"number",value:C.priority,onChange:a=>D({...C,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(j.l6,{label:"Proxy Pool",value:C.proxyPoolId,onChange:a=>D({...C,proxyPoolId:a.target.value}),options:[{value:r,label:"None"},...(m||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(m||[]).length&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Y,fullWidth:!0,disabled:O||!s&&(!C.name||!C.apiKey)||f&&!C.defaultModel.trim()||w&&(!E.azureEndpoint||!E.deployment||!E.organization)||x&&!G.accountId,children:O?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:q,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function A({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),u=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){l(!0);try{let a={name:h.name,prefix:h.prefix,baseUrl:h.baseUrl};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},v=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(j.pd,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,d.jsx)(j.pd,{label:"Prefix",value:h.prefix,onChange:a=>i({...h,prefix:a.target.value}),placeholder:g?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!g&&(0,d.jsx)(j.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(j.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...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,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:v,disabled:!m||q||!h.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(j.pd,{label:"Model ID (optional)",value:o,onChange:a=>p(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."}),s&&(0,d.jsx)(j.Ex,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:u,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||k,children:k?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function B({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useState)(""),[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),q=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},r=async()=>{let a=q(h.trim());if(a){l("testing"),n("");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();l(d.ok?"ok":"error"),n(d.error||"")}catch(a){l("error"),n(a.message)}}},s=async()=>{let a=q(h.trim());if(a&&!o){p(!0);try{await f(a)}finally{p(!1)}}};return(0,d.jsx)(j.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{type:"text",value:h,onChange:a=>{i(a.target.value),l(null),n("")},onKeyDown:a=>{"Enter"===a.key&&r()},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,d.jsx)(j.$n,{variant:"secondary",icon:"science",loading:"testing"===k,onClick:r,disabled:!h.trim()||"testing"===k,children:"testing"===k?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:q(h.trim())||"model-id"})]})]}),"ok"===k&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===k&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:m||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(j.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(j.$n,{onClick:s,fullWidth:!0,size:"sm",disabled:!h.trim()||o,children:o?"Adding...":"Add Model"})]})]})})}z.propTypes={isOpen:r().bool.isRequired,provider:r().string,providerName:r().string,isCompatible:r().bool,isAnthropic:r().bool,authType:r().string,authHint:r().string,website:r().string,proxyPools:r().arrayOf(r().shape({id:r().string,name:r().string})),error:r().string,onSave:r().func.isRequired,onBulkDone:r().func,onClose:r().func.isRequired},A.propTypes={isOpen:r().bool.isRequired,node:r().shape({id:r().string,name:r().string,prefix:r().string,apiType:r().string,baseUrl:r().string}),onSave:r().func.isRequired,onClose:r().func.isRequired,isAnthropic:r().bool},B.propTypes={isOpen:r().bool.isRequired,providerAlias:r().string.isRequired,providerDisplayAlias:r().string.isRequired,onSave:r().func.isRequired,onClose:r().func.isRequired};let C=`[
4
+ {
5
+ "accessToken": "eyJhbGc...",
6
+ "refreshToken": "rt_...",
7
+ "idToken": "eyJhbGc...",
8
+ "email": "user@example.com"
9
+ }
10
+ ]`;function D({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),p=()=>{h||(g(""),l(""),n(null),b())},q=async()=>{var a;let b;l(""),n(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,o.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a=b)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void l((0,o.Tl)("No accounts found in input"));i(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void l(b?.error||`Request failed: ${a.status}`);n(b),b.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,o.Tl)("Request failed"))}finally{i(!1)}},r=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(j.aF,{isOpen:a,title:(0,o.Tl)("Bulk Add Codex Accounts"),onClose:p,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,o.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,d.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:C,value:f,onChange:a=>g(a.target.value),disabled:h}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),m&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,o.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,o.Tl)("failed")}`:""]}),r.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:r.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:q,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,o.Tl)("Importing..."):(0,o.Tl)("Import All")}),(0,d.jsx)(j.$n,{onClick:p,variant:"ghost",fullWidth:!0,disabled:h,children:(0,o.Tl)("Close")})]})]})})}function E({isOpen:a,provider:b,onClose:c,onDone:f}){let[g,h]=(0,e.useState)(""),[i,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(null),[n,o]=(0,e.useState)(""),p=g.split("\n").map(a=>a.trim()).filter(Boolean).filter(a=>{let b=a.indexOf("|");return(-1===b?a:a.slice(b+1).trim()).length>0}).length;async function q(){if(p){k(!0),o(""),m(null);try{let a=await fetch(`/api/providers/${b}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lines:g})}),c=await a.json();if(!a.ok)throw Error(c.error||"Failed");m(c),f?.()}catch(a){o(a.message)}finally{k(!1)}}}function r(){h(""),m(null),o(""),c()}return(0,d.jsx)(j.aF,{isOpen:a,onClose:r,title:"Add Keys to Pool",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted mb-2",children:["Paste keys below — one per line. Format: ",(0,d.jsx)("code",{className:"text-xs bg-black/10 dark:bg-white/10 px-1 rounded",children:"name|key"})," or just ",(0,d.jsx)("code",{className:"text-xs bg-black/10 dark:bg-white/10 px-1 rounded",children:"key"}),"."]}),(0,d.jsx)("textarea",{className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm font-mono focus:outline-none focus:border-primary resize-none",rows:10,placeholder:"my-key-1|sk-ant-api03-...\nmy-key-2|sk-ant-api03-...\nsk-ant-api03-...",value:g,onChange:a=>{h(a.target.value),m(null)}}),(0,d.jsx)("p",{className:"text-xs text-text-muted mt-1",children:p>0?`${p} valid key${1!==p?"s":""} detected`:"Paste keys above"})]}),l&&(0,d.jsxs)("div",{className:"rounded-md border border-green-500/30 bg-green-500/10 px-3 py-2 text-sm text-green-600 dark:text-green-400",children:["Added ",l.added," key",1!==l.added?"s":""," to pool.",l.skipped>0&&` Skipped ${l.skipped} duplicate${1!==l.skipped?"s":""}.`]}),n&&(0,d.jsx)("p",{className:"text-sm text-red-500",children:n}),(0,d.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,d.jsx)(j.$n,{variant:"ghost",onClick:r,children:"Close"}),(0,d.jsx)(j.$n,{onClick:q,disabled:!p||i,children:i?"Adding...":`Add ${p||""} Keys`})]})]})})}function F({provider:a,onPullDone:b}){let[c,f]=(0,e.useState)({keys:[],count:0,page:1,totalPages:1,poolSize:30,autoReplace:!0}),[g,h]=(0,e.useState)(!0),[i,k]=(0,e.useState)(""),[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)(null),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(1),v=(0,e.useCallback)(async(b=t)=>{try{let c=await fetch(`/api/providers/${a}/pool?page=${b}&limit=50`,{cache:"no-store"});if(c.ok){let a=await c.json();f(a),i||k(String(a.poolSize))}}catch{}h(!1)},[a,t,i]);async function w(){m(!0),o(null);try{let d=parseInt(i,10)||c.poolSize,e=await fetch(`/api/providers/${a}/pool/pull`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:d})}),f=await e.json();if(!e.ok)throw Error(f.error||"Pull failed");o(f),u(1),await v(1),b?.()}catch(a){o({error:a.message})}finally{m(!1)}}async function x(b){s(b);try{await fetch(`/api/providers/${a}/pool?keyId=${b}`,{method:"DELETE"}),await v(t)}finally{s(null)}}async function y(b){f(a=>({...a,autoReplace:b})),await fetch(`/api/providers/${a}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({autoReplace:b})})}async function z(){let b=parseInt(i,10);!Number.isFinite(b)||b<1||b!==c.poolSize&&(f(a=>({...a,poolSize:b})),await fetch(`/api/providers/${a}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poolSize:b})}))}return g?(0,d.jsx)("div",{className:"py-8 text-center text-sm text-text-muted",children:"Loading pool..."}):(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-4",children:[(0,d.jsxs)("span",{className:"font-medium",children:[c.count," key",1!==c.count?"s":""," in pool"]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Auto-replace"}),(0,d.jsx)(j.lM,{checked:c.autoReplace,onChange:y})]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Pull"}),(0,d.jsx)("input",{type:"number",min:"1",className:"w-16 rounded-md border border-border bg-background px-2 py-1 text-sm text-center focus:outline-none focus:border-primary",value:i,onChange:a=>k(a.target.value),onBlur:z}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"keys"}),(0,d.jsx)(j.$n,{size:"sm",icon:"download",onClick:w,disabled:l||0===c.count,children:l?"Pulling...":"Pull from pool"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>q(!0),children:"Add to pool"})]})]}),n&&(0,d.jsx)("div",{className:`rounded-md border px-3 py-2 text-sm ${n.error?"border-red-500/30 bg-red-500/10 text-red-500":"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400"}`,children:n.error?n.error:`Pulled ${n.pulled} key${1!==n.pulled?"s":""} to connections.${n.skipped?` Skipped ${n.skipped} duplicate${1!==n.skipped?"s":""}.`:""}${n.message?` ${n.message}`:""}`}),0===c.keys.length?(0,d.jsxs)("div",{className:"flex flex-col items-center gap-3 rounded-lg border border-border py-10 text-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-text-muted",children:"key_off"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No keys in pool"}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:()=>q(!0),children:"Add Keys to Pool"})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border",children:(0,d.jsxs)("table",{className:"w-full text-sm",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{className:"border-b border-border bg-black/[0.02] dark:bg-white/[0.02] text-xs text-text-muted",children:[(0,d.jsx)("th",{className:"px-4 py-2 text-left font-medium uppercase tracking-wide",children:"Name"}),(0,d.jsx)("th",{className:"px-4 py-2 text-left font-medium uppercase tracking-wide",children:"Key"}),(0,d.jsx)("th",{className:"px-4 py-2 text-right font-medium uppercase tracking-wide",children:"Action"})]})}),(0,d.jsx)("tbody",{children:c.keys.map((a,b)=>(0,d.jsxs)("tr",{className:`border-b border-border last:border-0 ${b%2==0?"":"bg-black/[0.01] dark:bg-white/[0.01]"}`,children:[(0,d.jsx)("td",{className:"px-4 py-2 text-text-muted",children:a.name||(0,d.jsx)("span",{className:"text-text-muted/50 italic",children:"—"})}),(0,d.jsx)("td",{className:"px-4 py-2 font-mono text-xs text-text-muted",children:a.key}),(0,d.jsx)("td",{className:"px-4 py-2 text-right",children:(0,d.jsx)("button",{className:"text-red-500 hover:text-red-400 transition-colors disabled:opacity-40",onClick:()=>x(a.id),disabled:r===a.id,title:"Remove from pool",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"close"})})})]},a.id))})]})}),c.totalPages>1&&(0,d.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,d.jsxs)("span",{className:"text-text-muted text-xs",children:["Page ",c.page," of ",c.totalPages," (",c.count," total)"]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"chevron_left",disabled:t<=1,onClick:()=>u(a=>a-1),children:"Prev"}),(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"chevron_right",disabled:t>=c.totalPages,onClick:()=>u(a=>a+1),children:"Next"})]})]})]}),(0,d.jsx)(E,{isOpen:p,provider:a,onClose:()=>q(!1),onDone:()=>{u(1),v(1)}})]})}function G(){let a,b=(0,f.useParams)(),c=(0,f.useRouter)(),g=b.id,{getCaps:q}=(0,n.y)(),[r,t]=(0,e.useState)([]),[v,w]=(0,e.useState)(!0),[y,C]=(0,e.useState)(null),[E,G]=(0,e.useState)([]),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(""),[P,Q]=(0,e.useState)(!1),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(!1),[V,W]=(0,e.useState)(!1),[X,Y]=(0,e.useState)(null),[Z,$]=(0,e.useState)({}),[_,aa]=(0,e.useState)([]),[ab,ac]=(0,e.useState)(!1),[ad,ae]=(0,e.useState)({}),[af,ag]=(0,e.useState)(""),[ah,ai]=(0,e.useState)(()=>new Set),[aj,ak]=(0,e.useState)(!1),[al,am]=(0,e.useState)([]),[an,ao]=(0,e.useState)("__none__"),[ap,aq]=(0,e.useState)(!1),[ar,as]=(0,e.useState)(null),[at,au]=(0,e.useState)(""),[av,aw]=(0,e.useState)("auto"),[ax,ay]=(0,e.useState)({enabled:!1,connections:{}}),[az,aA]=(0,e.useState)([]),[aB,aC]=(0,e.useState)([]),[aD,aE]=(0,e.useState)([]),[aF,aG]=(0,e.useState)(null),[aH,aI]=(0,e.useState)("connections"),[aJ,aK]=(0,e.useState)(!1),[aL,aM]=(0,e.useState)(null),[aN,aO]=(0,e.useState)(!1),[aP,aQ]=(0,e.useState)(!1),[aR,aS]=(0,e.useState)(!1),[aT,aU]=(0,e.useState)(null),[aV,aW]=(0,e.useState)({}),[aX,aY]=(0,e.useState)(null),aZ=(0,e.useRef)(!1),[a$,a_]=(0,e.useState)(!1),{copied:a0,copy:a1}=(0,m.C)(),a2=()=>{I(!0)},a3=()=>{a8?a2():(O(""),M(!0))},a4=()=>{O(""),M(!0)},a5=()=>{a8?a3():a4()},a6=y?{id:y.id,name:y.name||("anthropic-compatible"===y.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===y.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===y.type?"AC":"OC",apiType:y.apiType,baseUrl:y.baseUrl,type:y.type}:k.zN[g]||k.fg[g]||k.IS[g]||k.nJ[g]||k.br[g],a7=a6?.authModes||[],a8=!!k.zN[g]||!!k.IS[g]||a7.includes("oauth"),a9=!!k.fg[g]||a7.includes("apikey"),ba=!!k.IS[g]?.noAuth,bb=(0,l.KC)(g),bc=(0,k.wG)(g),bd=(0,k.mq)(g),be=(0,k.gb)(g),bf=bd||be,bg=!bf&&a8&&a9,bh="xai"===g?"Grok Build OAuth":"OAuth",bi="xai"===g?"xAI API Key":"API Key";k.Q2[g]?.thinkingConfig||k.s9.extended;let bj=bf?g:bc,bk=bf?y?.prefix||g:bc,bl=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bj)}`,{cache:"no-store"}),b=await a.json();a.ok&&aE(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bj]),bm=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bj,ids:[a]})})).ok&&await bl()}catch(a){console.log("Error disabling model:",a)}},bn=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bj)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bl()}catch(a){console.log("Error enabling model:",a)}},bo=async a=>{a.length&&aM({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aM(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bj,ids:a})})).ok&&await bl()}catch(a){console.log("Error disabling all models:",a)}}})},bp=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bj)}`,{method:"DELETE"})).ok&&await bl()}catch(a){console.log("Error enabling all models:",a)}},bq=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias",{cache:"no-store"}),b=await a.json();a.ok&&$(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),br=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&aa(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),bs=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/order?providerAlias=${encodeURIComponent(bj)}`,{cache:"no-store"}),b=await a.json();a.ok&&aG(b.order||null)}catch(a){console.log("Error fetching model order:",a)}},[bj]),bt=(0,e.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(),h=await c.json(),i=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===g);t(a)}c.ok&&G(h.proxyPools||[]);let j=(i.providerStrategies||{})[g]||{};as(j.fallbackStrategy||null),au(null!=j.stickyRoundRobinLimit?String(j.stickyRoundRobinLimit):"1");let k=(i.providerThinking||{})[g]||{};aw(k.mode||"auto");let l=i.claudeAutoPing||{};if(ay({enabled:!0===l.enabled,connections:l.connections||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===g)||null;if(!a&&bf)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===g)||null))break}C(a)}}catch(a){console.log("Error fetching connections:",a)}finally{w(!1)}},[g,bf]),bu=async a=>{try{let b=await fetch(`/api/provider-nodes/${g}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(C(c.node),await bt(),U(!1))}catch(a){console.log("Error updating provider node:",a)}},bv=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={};a&&(e.fallbackStrategy=a),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[g]:f[g]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){console.log("Error saving provider strategy:",a)}},bw=async a=>{ay(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({claudeAutoPing:a})})}catch(a){console.log("Error saving auto-ping config:",a)}},bx=async(a,b)=>{let c=[...bb,...aB.filter(a=>!bb.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}),d=new Set(aD),e=c.filter(a=>!d.has(a.id)).map(a=>a.id),f=aF?[...aF.filter(a=>e.includes(a)),...e.filter(a=>!aF.includes(a))]:e,g=f.indexOf(a);if(-1===g)return;let h="up"===b?g-1:g+1;if(h<0||h>=f.length)return;let i=[...f];[i[g],i[h]]=[i[h],i[g]],aG(i),await fetch("/api/models/order",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bj,order:i})}).catch(a=>{console.log("Error saving model order:",a),bs()})},by=async a=>{t(b=>b.map(b=>({...b,isActive:a})));try{await Promise.all(r.map(b=>fetch(`/api/providers/${b.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:a})})))}catch(a){console.log("Error toggling all connections:",a),await bt()}},bz=r.some(a=>!1!==a.isActive),bA=async(a,b,c=bc)=>{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 bq();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bB=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bq()}catch(a){console.log("Error deleting alias:",a)}},bC=async(a,b="llm",c=bj)=>{try{let d=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b})});if(d.ok)await br();else{let a=await d.json();alert(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bD=async(a,b="llm",c=bj)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await br()}catch(a){console.log("Error deleting custom model:",a)}},bE=async()=>{if(a$)return;let a=r.find(a=>!1!==a.isActive);if(!a)return void alert((0,o.Tl)("Please add an active Qoder connection first"));a_(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,o.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,o.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\//,"");_.some(a=>a.providerAlias===bj&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(Z).includes(`${bj}/${c}`)||(await bC(c,"llm",bj),e+=1)}0===e?alert((0,o.Tl)("All models already exist, no new models added")):alert((0,o.Tl)("Successfully added")+` ${e} `+(0,o.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),alert((0,o.Tl)("Error fetching models")+": "+a.message)}finally{a_(!1)}},bF=async()=>{if(aP||0===r.length)return;let a=Object.fromEntries(r.map(a=>[a.id,{state:"queued",error:null}]));aZ.current=!1,aQ(!0),aS(!1),aU(null),aW(a),aY({total:r.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<r.length;a+=1){if(aZ.current){aY({total:r.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=r[a];aU(d.id),aW(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,aW(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,aW(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}aY({total:r.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<r.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aU(null),aQ(!1),aS(!1),aZ.current=!1}},bG=async a=>{aM({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aM(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&t(r.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bH=()=>{bt(),I(!1)},bI=async a=>{O("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:g,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bt(),M(!1);return}O(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),O("Failed to save connection")}},bJ=async a=>{try{(await fetch(`/api/providers/${X.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bt(),S(!1))}catch(a){console.log("Error updating connection:",a)}},bK=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&t(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},bL=async(a,b)=>{let c=[...r];[c[a],c[b]]=[c[b],c[a]],t(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 bt()}},bM=r.filter(a=>al.includes(a.id));r.length>0&&(al.length,r.length),(()=>{if(0===bM.length)return;let a=new Set(bM.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return;let c=E.find(a=>a.id===b);return c?.name}})();let bN=()=>{ap||W(!1)},bO=async a=>{aq(!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 bt(),W(!1)}finally{aq(!1)}},bP=a=>bO(r.map(b=>({connectionId:b.id,proxyPoolId:a}))),bQ=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:r.map((a,b)=>(0,d.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(x,{connection:a,proxyPools:E,isOAuth:a8,isFirst:0===b,isLast:b===r.length-1,onMoveUp:()=>bL(b,b-1),onMoveDown:()=>bL(b,b+1),onToggleActive:b=>bK(a.id,b),autoPing:"claude"===g&&"oauth"===a.authType?{on:!0===ax.connections[a.id],onToggle:b=>{var c;return c=a.id,void bw({...ax,connections:{...ax.connections,[c]:b}})}}: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&&t(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:()=>{Y(a),S(!0)},onDelete:()=>bG(a.id),oneByOneStatus:aV[a.id]||null})})},a.id))}),bR=E.filter(a=>!0===a.isActive),bS=(0,d.jsx)(j.aF,{isOpen:V,onClose:bN,title:`Apply Proxy (${r.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:()=>{let a=E.filter(a=>!0===a.isActive);return 0===a.length?void alert("No active proxy pools available."):bO(r.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},disabled:ap||0===bR.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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>bP(null),disabled:ap,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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),E.map(a=>(0,d.jsxs)("button",{onClick:()=>bP(a.id),disabled:ap||!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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,d.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),ap&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(j.$n,{onClick:bN,variant:"ghost",fullWidth:!0,disabled:ap,children:"Cancel"})]})}),bT=async a=>{if(!ah.has(a)){ai(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:`${bj}/${a}`})}),c=await b.json();ae(b=>({...b,[a]:c.ok?"ok":"error"})),ag(c.ok?"":c.error||"Model not reachable")}catch{ae(b=>({...b,[a]:"error"})),ag("Network error")}finally{ai(b=>{let c=new Set(b);return c.delete(a),c})}}};return v?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(j.Qv,{}),(0,d.jsx)(j.Qv,{})]}):a6?(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(h(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${a6.color}15`},children:ab?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:a6.color},children:a6.textIcon||a6.id.slice(0,2).toUpperCase()}):(0,d.jsx)(i.default,{src:bd&&a6.apiType?"responses"===a6.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":be?"/providers/anthropic-m.png":`/providers/${a6.id}.png`,alt:a6.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>ac(!0)})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:a6.name}),(a6.notice?.apiKeyUrl||a6.notice?.signupUrl||a6.website)&&(0,d.jsxs)("a",{href:a6.notice?.apiKeyUrl||a6.notice?.signupUrl||a6.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),a6.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[r.length," connection",1===r.length?"":"s"]})]})]})]}),a6.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:a6.deprecationNotice})]}),a6.notice?.text&&!a6.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:a6.notice.text}),a6.notice.apiKeyUrl&&(0,d.jsx)("a",{href:a6.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),bf&&y&&(0,d.jsx)(j.Zp,{children:(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:be?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[be?"Messages API":"responses"===y.apiType?"Responses API":"Chat Completions"," \xb7 ",(y.baseUrl||"").replace(/\/$/,""),"/",be?"messages":"responses"===y.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:()=>{O(""),M(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>U(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aM({title:"Delete Compatible Node",message:`Delete this ${be?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aM(null);try{(await fetch(`/api/provider-nodes/${g}`,{method:"DELETE"})).ok&&c.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ba?(0,d.jsx)(j.gw,{providerId:g}):(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsxs)("button",{className:`px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${"connections"===aH?"bg-primary text-white":"text-text-muted hover:text-foreground"}`,onClick:()=>aI("connections"),children:["Connections (",r.length,")"]}),(0,d.jsx)("button",{className:`px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${"pool"===aH?"bg-primary text-white":"text-text-muted hover:text-foreground"}`,onClick:()=>aI("pool"),children:"\uD83D\uDD11 Key Pool"})]}),"connections"===aH&&(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[r.length>0&&E.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>W(!0),children:"Apply Proxy"}),r.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:bF,disabled:aP,children:aP?"Testing Connection One-by-One...":"Test Connection One-by-One"}),aP&&(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aP&&(aZ.current=!0,aS(!0))},disabled:aR,children:aR?"Stopping...":"Stop"})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(j.lM,{checked:"round-robin"===ar,onChange:a=>{let b=a?"round-robin":null,c=a?at||"1":at;a&&!at&&au("1"),as(b),bv(b,c)}}),"round-robin"===ar&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:at,onChange:a=>{var b;au(b=a.target.value),bv("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]}),r.some(a=>!a.isActive)&&(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"delete_sweep",disabled:aJ,onClick:async()=>{aK(!0);try{await fetch(`/api/providers/${g}/connections/disabled`,{method:"DELETE"}),await bt()}finally{aK(!1)}},children:aJ?"Deleting...":`Delete Disabled (${r.filter(a=>!a.isActive).length})`}),r.length>1&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:bz?"toggle_off":"toggle_on",onClick:()=>by(!bz),children:bz?"Disable All":"Enable All"})]})]}),"connections"===aH&&(0,d.jsx)(d.Fragment,{children:0===r.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:a8?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bg&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bh," or ",bi,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:bg?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:a3,children:bh}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:a4,children:bi})]}):(0,d.jsxs)(d.Fragment,{children:[!bf&&"iflow"===g&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>K(!0),children:"Cookie"}),"codex"===g&&(0,d.jsx)(j.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Q(!0),children:(0,o.Tl)("Bulk Add")}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:a5,children:bf?"Add API Key":"iflow"===g?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[aX&&(0,d.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,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",aX.total]}),(0,d.jsxs)("span",{children:["Completed: ",aX.completed]}),(0,d.jsxs)("span",{children:["Passed: ",aX.passed]}),(0,d.jsxs)("span",{children:["Failed: ",aX.failed]}),aX.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),aP&&aT&&(0,d.jsxs)("span",{children:["Running: ",r.find(a=>a.id===aT)?.name||aT]})]})}),bQ,!bf&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===g&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>K(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===g&&(0,d.jsx)(j.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Q(!0),title:(0,o.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,o.Tl)("Bulk Add")}),bg?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:a3,className:"w-full sm:w-auto",children:bh}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:a4,className:"w-full sm:w-auto",children:bi})]}):(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:a5,className:"w-full sm:w-auto",children:"Add"})]})]})}),"pool"===aH&&(0,d.jsx)(F,{provider:g,onPullDone:bt})]}),(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!bf&&(a=[...bb,...aB.filter(a=>!bb.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!aD.includes(a)),(0,d.jsxs)("div",{className:"flex gap-2",children:[aD.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bp,children:"Active All"}),a.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bo(a),children:"Disable All"})]}))]}),!!af&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:af}),(()=>{let a,b,c;if(bf)return(0,d.jsx)(u,{providerStorageAlias:bj,providerDisplayAlias:bk,modelAliases:Z,customModels:_,copied:a0,onCopy:a1,onSetAlias:bA,onDeleteAlias:bB,onAddCustomModel:a=>bC(a,"llm",bj),onDeleteCustomModel:a=>bD(a,"llm",bj),connections:r,isAnthropic:be});let e=[...bb,...aB.filter(a=>!bb.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}),f=new Set(aD),h=e.filter(a=>!f.has(a.id)),i=e.filter(a=>f.has(a.id)),j=h.map(a=>a.id),k=aF?[...aF.filter(a=>j.includes(a)).map(a=>h.find(b=>b.id===a)),...h.filter(a=>!aF.includes(a.id))]:h,m=p({customModels:_,modelAliases:Z,providerAlias:bj,builtInModels:bb,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[m.map(a=>(0,d.jsx)(s,{model:{id:a.id,name:a.name},fullModel:`${bk}/${a.id}`,alias:a.alias,copied:a0,onCopy:a1,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bD(a.id,"llm",bj):bB(a.alias)},testStatus:ad[a.id],onTest:r.length>0||ba?()=>bT(a.id):void 0,isTesting:ah.has(a.id),isCustom:!0,isFree:!1,caps:q(`${g}/${a.id}`)},`${a.source}-${a.fullModel}`)),k.map((a,b)=>{let c=`${bj}/${a.id}`,e=`${g}/${a.id}`,f=Object.entries(Z).find(([,a])=>a===c||a===e)?.[0];return(0,d.jsx)(s,{model:a,fullModel:`${bk}/${a.id}`,alias:f,copied:a0,onCopy:a1,onSetAlias:b=>bA(a.id,b,bj),onDeleteAlias:()=>bB(f),testStatus:ad[a.id],onTest:r.length>0||ba?()=>bT(a.id):void 0,isTesting:ah.has(a.id),isFree:a.isFree,onDisable:()=>bm(a.id),caps:q(`${g}/${a.id}`),isFirst:0===b,isLast:b===k.length-1,onMoveUp:()=>bx(a.id,"up"),onMoveDown:()=>bx(a.id,"down")},a.id)}),(0,d.jsxs)("button",{onClick:()=>ak(!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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===g&&r.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:bE,disabled:a$,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:a$?{animation:"spin 1s linear infinite"}:void 0,children:a$?"progress_activity":"download"}),a$?(0,o.Tl)("Fetching..."):(0,o.Tl)("Fetch Qoder Models")]}),az.length>0&&(a=new Set([...Object.values(Z),...m.map(a=>a.fullModel)]),b=new Set(bb.map(a=>a.id)),0===(c=az.filter(c=>!a.has(`${bj}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await bC(a.id,"llm",bj)},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,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),i.length>0&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",i.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(a=>(0,d.jsxs)("button",{onClick:()=>bn(a.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})})()]}),bS,"kiro"===g?(0,d.jsx)(j.Mh,{isOpen:H,providerInfo:a6,onSuccess:bH,onClose:()=>I(!1)}):"cursor"===g?(0,d.jsx)(j.G9,{isOpen:H,onSuccess:bH,onClose:()=>I(!1)}):"gitlab"===g?(0,d.jsx)(j.vj,{isOpen:H,providerInfo:a6,onSuccess:bH,onClose:()=>I(!1)}):(0,d.jsx)(j.LF,{isOpen:H,provider:g,providerInfo:a6,onSuccess:bH,onClose:()=>I(!1)}),"iflow"===g&&(0,d.jsx)(j.vE,{isOpen:J,onSuccess:()=>{bt(),K(!1)},onClose:()=>K(!1)}),(0,d.jsx)(z,{isOpen:L,provider:g,providerName:a6.name,isCompatible:bf,isAnthropic:be,authType:a6?.authType,authHint:a6?.authHint,website:a6?.website,proxyPools:E,error:N,onSave:bI,onBulkDone:bt,onClose:()=>{O(""),M(!1)}}),(0,d.jsx)(j.wI,{isOpen:R,connection:X,proxyPools:E,onSave:bJ,onClose:()=>S(!1)}),bf&&(0,d.jsx)(A,{isOpen:T,node:y,onSave:bu,onClose:()=>U(!1),isAnthropic:be}),!bf&&(0,d.jsx)(B,{isOpen:aj,providerAlias:bj,providerDisplayAlias:bk,onSave:async a=>{await bC(a,"llm",bj),ak(!1)},onClose:()=>ak(!1)}),"codex"===g&&(0,d.jsx)(D,{isOpen:P,onClose:()=>Q(!1),onSuccess:bt}),(0,d.jsx)(j.uo,{isOpen:aN,onClose:()=>aO(!1),onConfirm:()=>{(aO(!1),a8)?a2():a4()},title:"Risk Notice",message:a6?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(j.uo,{isOpen:!!aL,onClose:()=>aM(null),onConfirm:aL?.onConfirm,title:aL?.title||"Confirm",message:aL?.message,variant:"danger"})]}):(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}D.propTypes={isOpen:r().bool.isRequired,onClose:r().func.isRequired,onSuccess:r().func}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69264:(a,b,c)=>{Promise.resolve().then(c.bind(c,60628))},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},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")},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})},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")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},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")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},83997:a=>{"use strict";a.exports=require("tty")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},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 \"/home/letruonggiang/work/9router/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.")},"/home/letruonggiang/work/9router/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},94735:a=>{"use strict";a.exports=require("events")},95205:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,93110)),"/home/letruonggiang/work/9router/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,30508)),"/home/letruonggiang/work/9router/src/app/(dashboard)/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,50385)),"/home/letruonggiang/work/9router/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next-cli-build",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/(dashboard)/dashboard/providers/[id]/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
11
+ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7774,1260,319,6482,3913,1220,914,5002,6070,8920,6306,3390,1275,318,8895,6182,6457,8271,8914,412,5692],()=>b(b.s=95205));module.exports=c})();