vansrouter 0.91.21 → 0.91.30

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 (1206) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +27 -20
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/react-loadable-manifest.json +19 -23
  6. package/app/.next-cli-build/routes-manifest.json +42 -0
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -28
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +6 -6
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-fitness/page.js +2 -2
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-fitness/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-fitness/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  80. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.rsc +2 -2
  84. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +2 -2
  85. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +2 -2
  90. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  91. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  94. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  95. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  96. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  98. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  101. package/app/.next-cli-build/server/app/api/auth/check/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/check/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +35 -16
  118. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -2
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  124. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  126. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +4 -0
  128. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -0
  129. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route_client-reference-manifest.js +1 -0
  130. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +2 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -2
  139. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -0
  141. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -0
  142. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route_client-reference-manifest.js +1 -0
  143. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +4 -5
  144. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -2
  146. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +3 -0
  150. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -0
  151. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route_client-reference-manifest.js +1 -0
  152. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +7 -8
  153. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +6 -7
  155. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +3 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  159. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +16 -0
  161. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -0
  162. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route_client-reference-manifest.js +1 -0
  163. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  164. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -2
  166. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -0
  168. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -0
  169. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route_client-reference-manifest.js +1 -0
  170. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +2 -0
  171. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -0
  172. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route_client-reference-manifest.js +1 -0
  173. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -0
  176. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -0
  177. package/app/.next-cli-build/server/app/api/combos/presets/route_client-reference-manifest.js +1 -0
  178. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  203. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  205. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  237. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +2 -2
  265. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/gcp-projects/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/gcp-projects/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/bulk/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/bulk/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/[name]/reset/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/[name]/reset/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +2 -2
  289. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/fitness/clear/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/fitness/clear/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +3 -3
  301. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +3 -3
  303. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/proxy-pools/fitness/clear-all/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/proxy-pools/fitness/clear-all/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/proxy-pools/fitness/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/proxy-pools/fitness/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +3 -3
  311. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  313. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  315. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  317. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  319. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  321. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  323. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  325. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  343. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  365. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/request-details/[id]/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/request-details/[id]/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  387. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  401. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  441. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  443. package/app/.next-cli-build/server/app/callback.html +1 -1
  444. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  445. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  446. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  447. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  448. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  449. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  450. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  452. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  453. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  454. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  456. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  458. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  460. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  461. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  463. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  464. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  468. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  470. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  473. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  478. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  480. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  483. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  484. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  487. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  488. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  489. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  490. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  491. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  493. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  494. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  498. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  499. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  501. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  502. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  504. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  505. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  508. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  509. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  511. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  512. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  514. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  515. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  518. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  519. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  521. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  522. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  523. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  524. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  530. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  532. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  535. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  540. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  542. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  543. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.html +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.rsc +6 -6
  545. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard/proxy-fitness/__PAGE__.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard/proxy-fitness.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  549. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_full.segment.rsc +6 -6
  550. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_head.segment.rsc +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_index.segment.rsc +4 -4
  552. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_tree.segment.rsc +2 -2
  553. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  555. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  557. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  559. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  560. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  562. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  563. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  565. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  566. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  567. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  568. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  569. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  570. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  571. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  572. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  573. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  574. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  575. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  576. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  578. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  579. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  580. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  581. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  582. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  583. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  584. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  585. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  588. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  589. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  591. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  592. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  594. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  595. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  596. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  598. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  599. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  600. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  601. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  602. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  603. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  604. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  605. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  606. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  608. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  609. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  610. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  612. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  613. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  614. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  615. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  616. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  618. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  619. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  620. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  622. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  623. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  624. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  625. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  626. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  628. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  629. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  630. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  631. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  632. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  633. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  634. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  635. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  636. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  637. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  638. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  639. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  640. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  641. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  642. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  643. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  644. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  645. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  646. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  647. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  648. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  649. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  650. package/app/.next-cli-build/server/app/landing.html +1 -1
  651. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  652. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  653. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  654. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  655. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  656. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  657. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  658. package/app/.next-cli-build/server/app/login/page.js +2 -2
  659. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  660. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  661. package/app/.next-cli-build/server/app/login.html +1 -1
  662. package/app/.next-cli-build/server/app/login.rsc +5 -5
  663. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  664. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  665. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  666. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  667. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  668. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  669. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +1 -1
  670. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  671. package/app/.next-cli-build/server/app/masuk/page.js +2 -2
  672. package/app/.next-cli-build/server/app/masuk/page.js.nft.json +1 -1
  673. package/app/.next-cli-build/server/app/masuk/page_client-reference-manifest.js +1 -1
  674. package/app/.next-cli-build/server/app-paths-manifest.json +27 -20
  675. package/app/.next-cli-build/server/chunks/124.js +1 -0
  676. package/app/.next-cli-build/server/chunks/1248.js +1 -1
  677. package/app/.next-cli-build/server/chunks/1253.js +1 -1
  678. package/app/.next-cli-build/server/chunks/127.js +1 -1
  679. package/app/.next-cli-build/server/chunks/{154.js → 1579.js} +26 -8
  680. package/app/.next-cli-build/server/chunks/1685.js +2 -2
  681. package/app/.next-cli-build/server/chunks/1688.js +2 -2
  682. package/app/.next-cli-build/server/chunks/1945.js +1 -1
  683. package/app/.next-cli-build/server/chunks/1950.js +66 -0
  684. package/app/.next-cli-build/server/chunks/2365.js +1 -0
  685. package/app/.next-cli-build/server/chunks/2411.js +1 -1
  686. package/app/.next-cli-build/server/chunks/2504.js +1 -1
  687. package/app/.next-cli-build/server/chunks/2557.js +11 -17
  688. package/app/.next-cli-build/server/chunks/2732.js +1 -1
  689. package/app/.next-cli-build/server/chunks/2884.js +1 -1
  690. package/app/.next-cli-build/server/chunks/2927.js +2 -2
  691. package/app/.next-cli-build/server/chunks/3040.js +2 -2
  692. package/app/.next-cli-build/server/chunks/314.js +1 -1
  693. package/app/.next-cli-build/server/chunks/3398.js +8 -8
  694. package/app/.next-cli-build/server/chunks/3405.js +2 -2
  695. package/app/.next-cli-build/server/chunks/3519.js +2 -2
  696. package/app/.next-cli-build/server/chunks/3621.js +1 -0
  697. package/app/.next-cli-build/server/chunks/3750.js +1 -1
  698. package/app/.next-cli-build/server/chunks/3912.js +9 -0
  699. package/app/.next-cli-build/server/chunks/3946.js +1 -0
  700. package/app/.next-cli-build/server/chunks/4004.js +2 -2
  701. package/app/.next-cli-build/server/chunks/4043.js +1 -0
  702. package/app/.next-cli-build/server/chunks/4105.js +1 -1
  703. package/app/.next-cli-build/server/chunks/4502.js +13 -15
  704. package/app/.next-cli-build/server/chunks/4539.js +2 -2
  705. package/app/.next-cli-build/server/chunks/{8011.js → 4549.js} +1 -2
  706. package/app/.next-cli-build/server/chunks/4574.js +53 -49
  707. package/app/.next-cli-build/server/chunks/4836.js +1 -1
  708. package/app/.next-cli-build/server/chunks/5300.js +1 -1
  709. package/app/.next-cli-build/server/chunks/5538.js +1 -0
  710. package/app/.next-cli-build/server/chunks/5570.js +1 -0
  711. package/app/.next-cli-build/server/chunks/5577.js +1 -1
  712. package/app/.next-cli-build/server/chunks/5598.js +1 -1
  713. package/app/.next-cli-build/server/chunks/{6807.js → 5860.js} +1 -1
  714. package/app/.next-cli-build/server/chunks/6165.js +2 -2
  715. package/app/.next-cli-build/server/chunks/622.js +1 -0
  716. package/app/.next-cli-build/server/chunks/6385.js +1 -1
  717. package/app/.next-cli-build/server/chunks/6589.js +7 -0
  718. package/app/.next-cli-build/server/chunks/6723.js +1 -1
  719. package/app/.next-cli-build/server/chunks/6737.js +1 -0
  720. package/app/.next-cli-build/server/chunks/7006.js +2 -2
  721. package/app/.next-cli-build/server/chunks/7074.js +3 -3
  722. package/app/.next-cli-build/server/chunks/7104.js +1 -1
  723. package/app/.next-cli-build/server/chunks/7502.js +1 -1
  724. package/app/.next-cli-build/server/chunks/7656.js +27 -0
  725. package/app/.next-cli-build/server/chunks/7693.js +2 -2
  726. package/app/.next-cli-build/server/chunks/7842.js +1 -0
  727. package/app/.next-cli-build/server/chunks/7863.js +1 -1
  728. package/app/.next-cli-build/server/chunks/7901.js +1 -0
  729. package/app/.next-cli-build/server/chunks/7938.js +2 -2
  730. package/app/.next-cli-build/server/chunks/7950.js +1 -1
  731. package/app/.next-cli-build/server/chunks/8104.js +1 -0
  732. package/app/.next-cli-build/server/chunks/8413.js +1 -1
  733. package/app/.next-cli-build/server/chunks/8691.js +2 -2
  734. package/app/.next-cli-build/server/chunks/8786.js +1 -0
  735. package/app/.next-cli-build/server/chunks/88.js +1 -1
  736. package/app/.next-cli-build/server/chunks/8941.js +1 -1
  737. package/app/.next-cli-build/server/chunks/912.js +1 -1
  738. package/app/.next-cli-build/server/chunks/{2764.js → 9306.js} +1 -1
  739. package/app/.next-cli-build/server/chunks/9404.js +1 -0
  740. package/app/.next-cli-build/server/chunks/9808.js +7 -0
  741. package/app/.next-cli-build/server/chunks/9974.js +1 -1
  742. package/app/.next-cli-build/server/instrumentation.js +1 -1
  743. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  744. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  745. package/app/.next-cli-build/server/middleware.js +5 -5
  746. package/app/.next-cli-build/server/pages/404.html +1 -1
  747. package/app/.next-cli-build/server/pages/500.html +1 -1
  748. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  749. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  750. package/app/.next-cli-build/static/E9fXOaI2LcUxzAal-qB_G/_buildManifest.js +1 -0
  751. package/app/.next-cli-build/static/chunks/1342-9835342a614a64b4.js +1 -0
  752. package/app/.next-cli-build/static/chunks/{2884.9a2db949e26c550b.js → 2884.46157ab83818a990.js} +1 -1
  753. package/app/.next-cli-build/static/chunks/3178-c8b2ded55709f2d2.js +1 -0
  754. package/app/.next-cli-build/static/chunks/{3257.4095ef9514389f69.js → 3257.562cf9b39c3d52e4.js} +1 -1
  755. package/app/.next-cli-build/static/chunks/{3386.c9a6be6fd4e818a6.js → 3386.1bfc303d22916972.js} +1 -1
  756. package/app/.next-cli-build/static/chunks/3758-f820cbe5bbed8ed5.js +66 -0
  757. package/app/.next-cli-build/static/chunks/3809.a27517d640eed59c.js +1 -0
  758. package/app/.next-cli-build/static/chunks/{406.7447d162fc1137ef.js → 406.8e37f15c32fac09d.js} +1 -1
  759. package/app/.next-cli-build/static/chunks/4385-e3eb6b7c4b7dfb22.js +1 -0
  760. package/app/.next-cli-build/static/chunks/4964.086f3a95e52cdf64.js +7 -0
  761. package/app/.next-cli-build/static/chunks/5331.128ab40951332f33.js +1 -0
  762. package/app/.next-cli-build/static/chunks/{5337.0f3e559687a6f415.js → 5337.6a61522e6c696f60.js} +1 -1
  763. package/app/.next-cli-build/static/chunks/{6474.d4e25fbe7c09068f.js → 6474.fd5dccfa8449f5f9.js} +1 -1
  764. package/app/.next-cli-build/static/chunks/{6909.20637e0929ccd959.js → 6909.929d7fd212a31a66.js} +1 -1
  765. package/app/.next-cli-build/static/chunks/{8914-58cf85ef9bb0b6e0.js → 8914-cff0fbfad05fc69b.js} +3 -3
  766. package/app/.next-cli-build/static/chunks/{9131-f4afa0414d45c1d1.js → 9131-8865c2f5b2d104bf.js} +2 -2
  767. package/app/.next-cli-build/static/chunks/{9146.7174fc5feff1bf58.js → 9146.51c9e590114c99ab.js} +1 -1
  768. package/app/.next-cli-build/static/chunks/941.1766407a48f890e1.js +1 -0
  769. package/app/.next-cli-build/static/chunks/{5338-bca3ce9343d90c4f.js → 9643-1650acc296f77253.js} +29 -11
  770. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-8d2cf057877e520c.js → page-96728a43a2ce920c.js} +1 -1
  771. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-7c93b16b43de2c8f.js → page-3004f4af215b215a.js} +1 -1
  772. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-9854c7db29f0cb69.js → page-71a1f0244d4d1287.js} +1 -1
  773. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-c15b5f331606e3aa.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-91427dc2416753e5.js → page-7cf7e96e3f12d777.js} +1 -1
  775. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-e79f5fbcbd3662d0.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-07eea31f525f94ed.js → page-7e8a0e7bafdd972d.js} +2 -2
  777. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-7caa1878034401a6.js → page-5bd5188ca9e08f60.js} +1 -1
  778. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-15c5617ad2c27966.js → page-b19583351ad0149d.js} +2 -2
  779. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-fb0d7d79c84c197c.js → page-5496dd8e8a1e4a1e.js} +1 -1
  780. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-01af83ff8590888e.js → page-6114fb82946445cb.js} +1 -1
  781. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-c30fcb1ed5f77411.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-97b63031e33bafba.js → page-202871f51690bc61.js} +1 -1
  783. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-728c2dc02d8273eb.js +27 -0
  784. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-a40e2e0af6a60760.js → page-8cf917b2f8241886.js} +1 -1
  785. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-bcd99ea45b8e3f0b.js → page-6febfa2b9b61037f.js} +1 -1
  786. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-fitness/{page-a6fbe7c554c97288.js → page-c54081ae07c59029.js} +1 -1
  787. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-c8a179ca8b3961a1.js → page-d35b045cc4d9e513.js} +2 -2
  788. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-1ccca37edb21a2c2.js → page-55629dba8eb114d7.js} +1 -1
  789. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-61d3b94595ff6592.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-6b6aa4440b9bbdd4.js → page-5a509b067cce0c79.js} +1 -1
  791. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-540d37c2987cd9a7.js → page-c629e15e8e3f798f.js} +1 -1
  792. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-14b9b1f4c2cfffbb.js → page-607c073b7406e31e.js} +1 -1
  793. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-1cdf081b553a1b83.js → page-565722d50146d9d0.js} +1 -1
  794. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-829e3939151d724b.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/_global-error/page-1bef1cfa12175e17.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/auth/check/route-1bef1cfa12175e17.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-1bef1cfa12175e17.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-1bef1cfa12175e17.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-1bef1cfa12175e17.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-1bef1cfa12175e17.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-1bef1cfa12175e17.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-1bef1cfa12175e17.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-1bef1cfa12175e17.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-1bef1cfa12175e17.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1bef1cfa12175e17.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-1bef1cfa12175e17.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-1bef1cfa12175e17.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-1bef1cfa12175e17.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-1bef1cfa12175e17.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-1bef1cfa12175e17.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-1bef1cfa12175e17.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1bef1cfa12175e17.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1bef1cfa12175e17.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-1bef1cfa12175e17.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-1bef1cfa12175e17.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-1bef1cfa12175e17.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-1bef1cfa12175e17.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-1bef1cfa12175e17.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-1bef1cfa12175e17.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-1bef1cfa12175e17.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-1bef1cfa12175e17.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-1bef1cfa12175e17.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-1bef1cfa12175e17.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-1bef1cfa12175e17.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-1bef1cfa12175e17.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-1bef1cfa12175e17.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-1bef1cfa12175e17.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-1bef1cfa12175e17.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-1bef1cfa12175e17.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-1bef1cfa12175e17.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/combos/route-1bef1cfa12175e17.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-1bef1cfa12175e17.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-1bef1cfa12175e17.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-1bef1cfa12175e17.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-1bef1cfa12175e17.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-1bef1cfa12175e17.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-1bef1cfa12175e17.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/health/route-1bef1cfa12175e17.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/init/route-1bef1cfa12175e17.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-1bef1cfa12175e17.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/keys/route-1bef1cfa12175e17.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/locale/route-1bef1cfa12175e17.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-1bef1cfa12175e17.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-1bef1cfa12175e17.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1bef1cfa12175e17.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1bef1cfa12175e17.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-1bef1cfa12175e17.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-1bef1cfa12175e17.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-1bef1cfa12175e17.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-1bef1cfa12175e17.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-1bef1cfa12175e17.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-1bef1cfa12175e17.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-1bef1cfa12175e17.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-1bef1cfa12175e17.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/models/route-1bef1cfa12175e17.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/models/test/route-1bef1cfa12175e17.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-1bef1cfa12175e17.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-1bef1cfa12175e17.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-1bef1cfa12175e17.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-1bef1cfa12175e17.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-1bef1cfa12175e17.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-1bef1cfa12175e17.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-1bef1cfa12175e17.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-1bef1cfa12175e17.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-1bef1cfa12175e17.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-1bef1cfa12175e17.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-1bef1cfa12175e17.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-1bef1cfa12175e17.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-1bef1cfa12175e17.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-1bef1cfa12175e17.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/pricing/route-1bef1cfa12175e17.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-1bef1cfa12175e17.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-1bef1cfa12175e17.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-1bef1cfa12175e17.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/gcp-projects/route-1bef1cfa12175e17.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-1bef1cfa12175e17.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-1bef1cfa12175e17.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-1bef1cfa12175e17.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-1bef1cfa12175e17.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/providers/bulk/route-1bef1cfa12175e17.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/[name]/reset/route-1bef1cfa12175e17.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/route-1bef1cfa12175e17.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-1bef1cfa12175e17.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-1bef1cfa12175e17.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/providers/route-1bef1cfa12175e17.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-1bef1cfa12175e17.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-1bef1cfa12175e17.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-1bef1cfa12175e17.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/fitness/clear/route-1bef1cfa12175e17.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-1bef1cfa12175e17.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-1bef1cfa12175e17.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-1bef1cfa12175e17.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-1bef1cfa12175e17.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/fitness/clear-all/route-1bef1cfa12175e17.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/fitness/route-1bef1cfa12175e17.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-1bef1cfa12175e17.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-1bef1cfa12175e17.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-1bef1cfa12175e17.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-1bef1cfa12175e17.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-1bef1cfa12175e17.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-1bef1cfa12175e17.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-1bef1cfa12175e17.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-1bef1cfa12175e17.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-1bef1cfa12175e17.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-1bef1cfa12175e17.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-1bef1cfa12175e17.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-1bef1cfa12175e17.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-1bef1cfa12175e17.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/settings/route-1bef1cfa12175e17.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-1bef1cfa12175e17.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/tags/route-1bef1cfa12175e17.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-1bef1cfa12175e17.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-1bef1cfa12175e17.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-1bef1cfa12175e17.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-1bef1cfa12175e17.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-1bef1cfa12175e17.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-1bef1cfa12175e17.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-1bef1cfa12175e17.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-1bef1cfa12175e17.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-1bef1cfa12175e17.js +1 -0
  921. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-1bef1cfa12175e17.js +1 -0
  922. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-1bef1cfa12175e17.js +1 -0
  923. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-1bef1cfa12175e17.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-1bef1cfa12175e17.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-1bef1cfa12175e17.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-1bef1cfa12175e17.js +1 -0
  927. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-1bef1cfa12175e17.js +1 -0
  928. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-1bef1cfa12175e17.js +1 -0
  929. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-1bef1cfa12175e17.js +1 -0
  930. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-1bef1cfa12175e17.js +1 -0
  931. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/[id]/route-1bef1cfa12175e17.js +1 -0
  932. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-1bef1cfa12175e17.js +1 -0
  933. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-1bef1cfa12175e17.js +1 -0
  934. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-1bef1cfa12175e17.js +1 -0
  935. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-1bef1cfa12175e17.js +1 -0
  936. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-1bef1cfa12175e17.js +1 -0
  937. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-1bef1cfa12175e17.js +1 -0
  938. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-1bef1cfa12175e17.js +1 -0
  939. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-1bef1cfa12175e17.js +1 -0
  940. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-1bef1cfa12175e17.js +1 -0
  941. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-1bef1cfa12175e17.js +1 -0
  942. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-1bef1cfa12175e17.js +1 -0
  943. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-1bef1cfa12175e17.js +1 -0
  944. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-1bef1cfa12175e17.js +1 -0
  945. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-1bef1cfa12175e17.js +1 -0
  946. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-1bef1cfa12175e17.js +1 -0
  947. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-1bef1cfa12175e17.js +1 -0
  948. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-1bef1cfa12175e17.js +1 -0
  949. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-1bef1cfa12175e17.js +1 -0
  950. package/app/.next-cli-build/static/chunks/app/api/v1/route-1bef1cfa12175e17.js +1 -0
  951. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-1bef1cfa12175e17.js +1 -0
  952. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-1bef1cfa12175e17.js +1 -0
  953. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-1bef1cfa12175e17.js +1 -0
  954. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-1bef1cfa12175e17.js +1 -0
  955. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-1bef1cfa12175e17.js +1 -0
  956. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-1bef1cfa12175e17.js +1 -0
  957. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-1bef1cfa12175e17.js +1 -0
  958. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-1bef1cfa12175e17.js +1 -0
  959. package/app/.next-cli-build/static/chunks/app/api/version/route-1bef1cfa12175e17.js +1 -0
  960. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-1bef1cfa12175e17.js +1 -0
  961. package/app/.next-cli-build/static/chunks/app/api/version/update/route-1bef1cfa12175e17.js +1 -0
  962. package/app/.next-cli-build/static/chunks/app/callback/{page-501f35fcad0ae65c.js → page-7f7a73f46ef0e567.js} +1 -1
  963. package/app/.next-cli-build/static/chunks/app/landing/page-1c9aceed2518a7cf.js +1 -0
  964. package/app/.next-cli-build/static/chunks/app/{layout-02633570bc545d3b.js → layout-8ba5cd62a94327a0.js} +1 -1
  965. package/app/.next-cli-build/static/chunks/app/login/{page-3bfabe4dc89ad6c4.js → page-a3af87402da40101.js} +1 -1
  966. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-1bef1cfa12175e17.js +1 -0
  967. package/app/.next-cli-build/static/chunks/app/masuk/{page-d24ad3ff5c276f36.js → page-23714324c6ceceda.js} +1 -1
  968. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-1bef1cfa12175e17.js +1 -0
  969. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-1bef1cfa12175e17.js +1 -0
  970. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-1bef1cfa12175e17.js +1 -0
  971. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-1bef1cfa12175e17.js +1 -0
  972. package/app/.next-cli-build/static/chunks/webpack-8d5df0eb3e3a6c37.js +1 -0
  973. package/app/.next-cli-build/static/css/3ad4070e34d43663.css +1 -0
  974. package/app/custom-server.js +37 -37
  975. package/app/package.json +1 -3
  976. package/app/public/i18n/literals/fa.json +17 -1
  977. package/app/public/providers/codewhale.svg +9 -0
  978. package/app/public/providers/crush.png +0 -0
  979. package/app/public/providers/forge.png +0 -0
  980. package/app/public/providers/omp.png +0 -0
  981. package/app/public/providers/pi.svg +6 -0
  982. package/app/public/providers/smelt.svg +101 -0
  983. package/app/src/lib/db/adapters/betterSqliteAdapter.js +12 -4
  984. package/app/src/lib/db/adapters/nodeSqliteAdapter.js +12 -3
  985. package/app/src/lib/db/adapters/sqljsAdapter.js +13 -6
  986. package/app/src/lib/db/migrate.js +299 -299
  987. package/app/src/mitm/server.js +27 -27
  988. package/app/src/shared/services/quotaAutoPing.js +313 -313
  989. package/hooks/sqliteRuntime.js +188 -188
  990. package/package.json +2 -5
  991. package/src/cli/api/client.js +556 -556
  992. package/src/cli/commands/xaiVideo.js +300 -300
  993. package/src/cli/menus/combos.js +0 -103
  994. package/src/cli/menus/providers.js +868 -858
  995. package/src/cli/menus/settings.js +204 -204
  996. package/src/cli/utils/modelSelector.js +189 -51
  997. package/app/.next-cli-build/server/chunks/1725.js +0 -1
  998. package/app/.next-cli-build/server/chunks/2445.js +0 -1
  999. package/app/.next-cli-build/server/chunks/32.js +0 -9
  1000. package/app/.next-cli-build/server/chunks/3539.js +0 -1
  1001. package/app/.next-cli-build/server/chunks/3736.js +0 -1
  1002. package/app/.next-cli-build/server/chunks/4029.js +0 -7
  1003. package/app/.next-cli-build/server/chunks/4816.js +0 -1
  1004. package/app/.next-cli-build/server/chunks/5006.js +0 -7
  1005. package/app/.next-cli-build/server/chunks/5009.js +0 -1
  1006. package/app/.next-cli-build/server/chunks/5050.js +0 -1
  1007. package/app/.next-cli-build/server/chunks/5198.js +0 -1
  1008. package/app/.next-cli-build/server/chunks/5302.js +0 -1
  1009. package/app/.next-cli-build/server/chunks/6120.js +0 -1
  1010. package/app/.next-cli-build/server/chunks/6793.js +0 -1
  1011. package/app/.next-cli-build/server/chunks/6931.js +0 -1
  1012. package/app/.next-cli-build/server/chunks/7425.js +0 -1
  1013. package/app/.next-cli-build/server/chunks/7592.js +0 -66
  1014. package/app/.next-cli-build/server/chunks/8356.js +0 -1
  1015. package/app/.next-cli-build/server/chunks/8695.js +0 -1
  1016. package/app/.next-cli-build/server/chunks/9162.js +0 -1
  1017. package/app/.next-cli-build/server/chunks/9614.js +0 -7
  1018. package/app/.next-cli-build/server/chunks/9784.js +0 -1
  1019. package/app/.next-cli-build/server/chunks/9984.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/1049.adc9916d5a6b95f8.js +0 -7
  1021. package/app/.next-cli-build/static/chunks/1399-71db70ab3102530f.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/2318-288d3ff89298deb7.js +0 -66
  1023. package/app/.next-cli-build/static/chunks/2940-b6dd0c5879412cea.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/4385-ce7b55264de51d47.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/5331.049b1512362de1f4.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/5334-4a80ee40870b70ae.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/5479-20746781c1de7eb2.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/6676.a4b23fc11d3037fd.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/9078.ea6aeb4af0c25e5d.js +0 -7
  1030. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-5de110c9d826db7a.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-e19a996981cbb56d.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-694ccd630a55547c.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-1fdc31375a54bb60.js +0 -27
  1034. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-fce8c9b1ef1963db.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-8f58062b0584c945.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/_global-error/page-17aa0c4536dd4f4c.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/auth/check/route-17aa0c4536dd4f4c.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-17aa0c4536dd4f4c.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-17aa0c4536dd4f4c.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-17aa0c4536dd4f4c.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-17aa0c4536dd4f4c.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-17aa0c4536dd4f4c.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-17aa0c4536dd4f4c.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-17aa0c4536dd4f4c.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-17aa0c4536dd4f4c.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-17aa0c4536dd4f4c.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-17aa0c4536dd4f4c.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-17aa0c4536dd4f4c.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-17aa0c4536dd4f4c.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-17aa0c4536dd4f4c.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-17aa0c4536dd4f4c.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-17aa0c4536dd4f4c.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-17aa0c4536dd4f4c.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-17aa0c4536dd4f4c.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-17aa0c4536dd4f4c.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-17aa0c4536dd4f4c.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-17aa0c4536dd4f4c.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-17aa0c4536dd4f4c.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-17aa0c4536dd4f4c.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-17aa0c4536dd4f4c.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-17aa0c4536dd4f4c.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-17aa0c4536dd4f4c.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-17aa0c4536dd4f4c.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/combos/route-17aa0c4536dd4f4c.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-17aa0c4536dd4f4c.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-17aa0c4536dd4f4c.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-17aa0c4536dd4f4c.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-17aa0c4536dd4f4c.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-17aa0c4536dd4f4c.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-17aa0c4536dd4f4c.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/health/route-17aa0c4536dd4f4c.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/init/route-17aa0c4536dd4f4c.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/keys/route-17aa0c4536dd4f4c.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/locale/route-17aa0c4536dd4f4c.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-17aa0c4536dd4f4c.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-17aa0c4536dd4f4c.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-17aa0c4536dd4f4c.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-17aa0c4536dd4f4c.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-17aa0c4536dd4f4c.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-17aa0c4536dd4f4c.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-17aa0c4536dd4f4c.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-17aa0c4536dd4f4c.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-17aa0c4536dd4f4c.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-17aa0c4536dd4f4c.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-17aa0c4536dd4f4c.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-17aa0c4536dd4f4c.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/models/route-17aa0c4536dd4f4c.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/models/test/route-17aa0c4536dd4f4c.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-17aa0c4536dd4f4c.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-17aa0c4536dd4f4c.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-17aa0c4536dd4f4c.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-17aa0c4536dd4f4c.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-17aa0c4536dd4f4c.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-17aa0c4536dd4f4c.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-17aa0c4536dd4f4c.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-17aa0c4536dd4f4c.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-17aa0c4536dd4f4c.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-17aa0c4536dd4f4c.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-17aa0c4536dd4f4c.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-17aa0c4536dd4f4c.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-17aa0c4536dd4f4c.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-17aa0c4536dd4f4c.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/pricing/route-17aa0c4536dd4f4c.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-17aa0c4536dd4f4c.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-17aa0c4536dd4f4c.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/gcp-projects/route-17aa0c4536dd4f4c.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-17aa0c4536dd4f4c.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-17aa0c4536dd4f4c.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-17aa0c4536dd4f4c.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/providers/bulk/route-17aa0c4536dd4f4c.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/[name]/reset/route-17aa0c4536dd4f4c.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/route-17aa0c4536dd4f4c.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-17aa0c4536dd4f4c.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-17aa0c4536dd4f4c.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/providers/route-17aa0c4536dd4f4c.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-17aa0c4536dd4f4c.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-17aa0c4536dd4f4c.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-17aa0c4536dd4f4c.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/fitness/clear/route-17aa0c4536dd4f4c.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-17aa0c4536dd4f4c.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-17aa0c4536dd4f4c.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-17aa0c4536dd4f4c.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/fitness/clear-all/route-17aa0c4536dd4f4c.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/fitness/route-17aa0c4536dd4f4c.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-17aa0c4536dd4f4c.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-17aa0c4536dd4f4c.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-17aa0c4536dd4f4c.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-17aa0c4536dd4f4c.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-17aa0c4536dd4f4c.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-17aa0c4536dd4f4c.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-17aa0c4536dd4f4c.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-17aa0c4536dd4f4c.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-17aa0c4536dd4f4c.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-17aa0c4536dd4f4c.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-17aa0c4536dd4f4c.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-17aa0c4536dd4f4c.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-17aa0c4536dd4f4c.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/settings/route-17aa0c4536dd4f4c.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-17aa0c4536dd4f4c.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/tags/route-17aa0c4536dd4f4c.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-17aa0c4536dd4f4c.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-17aa0c4536dd4f4c.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-17aa0c4536dd4f4c.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-17aa0c4536dd4f4c.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-17aa0c4536dd4f4c.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-17aa0c4536dd4f4c.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-17aa0c4536dd4f4c.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-17aa0c4536dd4f4c.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-17aa0c4536dd4f4c.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-17aa0c4536dd4f4c.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-17aa0c4536dd4f4c.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-17aa0c4536dd4f4c.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-17aa0c4536dd4f4c.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-17aa0c4536dd4f4c.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-17aa0c4536dd4f4c.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-17aa0c4536dd4f4c.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-17aa0c4536dd4f4c.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-17aa0c4536dd4f4c.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-17aa0c4536dd4f4c.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-17aa0c4536dd4f4c.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-17aa0c4536dd4f4c.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-17aa0c4536dd4f4c.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-17aa0c4536dd4f4c.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-17aa0c4536dd4f4c.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-17aa0c4536dd4f4c.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-17aa0c4536dd4f4c.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-17aa0c4536dd4f4c.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-17aa0c4536dd4f4c.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-17aa0c4536dd4f4c.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-17aa0c4536dd4f4c.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-17aa0c4536dd4f4c.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-17aa0c4536dd4f4c.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-17aa0c4536dd4f4c.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-17aa0c4536dd4f4c.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-17aa0c4536dd4f4c.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-17aa0c4536dd4f4c.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-17aa0c4536dd4f4c.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/v1/route-17aa0c4536dd4f4c.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-17aa0c4536dd4f4c.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-17aa0c4536dd4f4c.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-17aa0c4536dd4f4c.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-17aa0c4536dd4f4c.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-17aa0c4536dd4f4c.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-17aa0c4536dd4f4c.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-17aa0c4536dd4f4c.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/version/route-17aa0c4536dd4f4c.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-17aa0c4536dd4f4c.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/version/update/route-17aa0c4536dd4f4c.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/landing/page-e42a61eee9f904dc.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-17aa0c4536dd4f4c.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-17aa0c4536dd4f4c.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-17aa0c4536dd4f4c.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-17aa0c4536dd4f4c.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-17aa0c4536dd4f4c.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/webpack-81a7adaed327dd6b.js +0 -1
  1203. package/app/.next-cli-build/static/css/c78f5cc987a85267.css +0 -1
  1204. package/app/.next-cli-build/static/yvUSImiXUeMIOPHHzKVq_/_buildManifest.js +0 -1
  1205. /package/app/.next-cli-build/static/{yvUSImiXUeMIOPHHzKVq_ → E9fXOaI2LcUxzAal-qB_G}/_ssgManifest.js +0 -0
  1206. /package/app/.next-cli-build/static/chunks/{2920-d6cf02087e8d0773.js → 2920.d6cf02087e8d0773.js} +0 -0
@@ -1,18 +1,17 @@
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")},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")},9517:(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})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13018:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,88844,23))},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")},26915:a=>{"use strict";a.exports=import("playwright-core")},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")},31637:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(8824),e=c(59399),f=c(68673),g=c(34958),h=c(83760),i=c(9410),j=c(75881),k=c(29578),l=c(28112),m=c(71642),n=c(26352),o=c(68004),p=c(970),q=c(72647),r=c(261),s=c(45123),t=c(88768),u=c(26713),v=c(33610),w=c(82623),x=c(92819),y=c(7572),z=c(50932),A=c(14920),B=c(97908),C=c(86439),D=c(77068),E=c(86728),F=c(16492),G=c(92304),H=c(77257),I=c(70722),J=c(62576),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,63240)),"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"]},["new"]]},{"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,61643)),"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/layout.js"],error:[()=>Promise.resolve().then(c.bind(c,35411)),"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/error.js"],"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,52170,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,36939,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,52158,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,8453))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,26478)),"/home/runner/work/VansRouter/VansRouter/src/app/layout.js"],error:[()=>Promise.resolve().then(c.bind(c,71503)),"/home/runner/work/VansRouter/VansRouter/src/app/error.js"],"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,52170,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,36939,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,52158,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,8453))).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(2337).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}}},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")},35411:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(35732).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/error.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/runner/work/VansRouter/VansRouter/src/app/(dashboard)/error.js","default")},37067:a=>{"use strict";a.exports=require("node:http")},37539:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>V});var d=c(66238),e=c(71183),f=c(68344),g=c(84725),h=c.n(g);c(15901),c(1219);var i=c(95988),j=c(43736),k=c(53207),l=c(47953),m=c(48444),n=c(46120);c(79300);let o=["none","low","medium","high"],p=["none","thinking"],q=["none","low","medium","high","max"],r={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":q,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":o,zai:p,qwen:o,kimi:q,deepseek:["none","high","max"],minimax:p,hunyuan:o,step:o},s=["none","minimal","low","medium","high","xhigh","max"],t=[{provider:"codex",pattern:"*gpt-5.6-sol*",levels:s},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:s},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:s},{pattern:"*gpt-5.6-sol*",levels:["none","minimal","low","medium","high","xhigh","max"]},{pattern:"*claude*opus-5*",levels:q},{pattern:"*codex*",levels:["low","medium","high","xhigh"]}];function u(a,b){if("kiro"===a&&null===function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=b.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!c)return null;let[,d,e]=c,f=Number(d),g=void 0===e?null:Number(e);return f<4||4===f&&(null===g||g<=5||null!==g&&g>=1e3)?null:"output_config"}(b))return null;let c=(0,m.nl)(a,b);if(!c.reasoning)return null;let d=t.find(c=>(!c.provider||c.provider===a)&&(0,n.gH)(c.pattern,b)),e=d?.levels||r[c.thinkingFormat]||o;return!1===c.thinkingCanDisable&&(e=e.filter(a=>"none"!==a)),e}var v=c(87571),w=c(55009),x=c(7272);let y=new Map;async function z(a){if(!a?.url||!a?.type)return[];let b=y.get(a.url);if(b&&Date.now()<b.expiresAt)return b.data;try{let b=new URLSearchParams({url:a.url,type:a.type}),c=await fetch(`/api/providers/suggested-models?${b}`);if(!c.ok)return[];let d=(await c.json()).data??[];return y.set(a.url,{data:d,expiresAt:Date.now()+6e5}),d}catch{return[]}}function A({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}function B({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}){let p="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:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:p?{color:p}: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.CapacityBadges,{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 C({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 D({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:k,onDeleteCustomModel:l,connections:m,isAnthropic:n}){let[o,p]=(0,e.useState)(""),[q,r]=(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=A({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),B=async()=>{if(!o.trim()||q)return;let a=o.trim();if(z.some(b=>b.id===a))return void alert("Model already exists for this provider.");r(!0);try{await k(a),p("")}catch(a){console.log("Error adding model:",a)}finally{r(!1)}},E=async()=>{if(s)return;let a=m.find(a=>!1!==a.isActive);if(a){t(!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&&(z.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{t(!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=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&B(),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.Button,{size:"sm",icon:"add",onClick:B,disabled:!o.trim()||q,children:q?"Adding...":"Add"}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"download",onClick:E,disabled:!F||s,children:s?"Importing...":"Import from /models"})]}),!F&&(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(({id:c,alias:e,source:f})=>(0,d.jsx)(C,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:m.length>0?()=>y(c):void 0,testStatus:w[c],isTesting:u===c},`${f}-${a}/${c}`))})]})}var E=c(9517);function F({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 G({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,modelAssignmentOptions:q=null,onModelAssignmentChange:r=null,strictModelAssignment:s=!1}){let[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),x=(0,e.useRef)(null),y=new Map((b||[]).map(a=>[a.id,a])),z=a.providerSpecificData?.proxyPoolIds||(a.providerSpecificData?.proxyPoolId?[a.providerSpecificData.proxyPoolId]:[]),A=a.providerSpecificData?.proxyRotationStrategy||"none",B=z[0]||a.providerSpecificData?.proxyPoolId||null,C=B?y.get(B):null,D=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,H=!!B||D,I=z.length>1?`${z.length} pools (${A})`:C?`Pool: ${C.name}`:B?`Pool: ${B} (inactive/missing)`:D?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",J=p?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",K="";if(C?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=C?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);K=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{K=b}}let L=C?.noProxy||a.providerSpecificData?.connectionNoProxy||"",M="default";C?.isActive===!0?M="success":(B||D)&&(M="error");let N=async a=>{w(!0);try{"__none__"===a?await l(null):await l(a),u(!1)}finally{w(!1)}},O=async(a,b)=>{let c=b.filter(a=>y.get(a)?.isActive===!0);if(c.length){w(!0);try{await l({proxyPoolIds:c,proxyRotationStrategy:a}),u(!1)}finally{w(!1)}}},P=a.authType||(c?"oauth":"apikey"),Q="oauth"===P,R="cookie"===P,S=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(Q?"OAuth Account":R?"Cookie Account":"API Key"),T=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,[U,V]=(0,e.useState)(!1),W=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,X="unavailable"!==a.testStatus||U?a.testStatus:"active",Y=()=>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:R?"cookie":Q?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:S}),T&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:T}),(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.Badge,{variant:(0,E.g)(a.isActive,X),size:"sm",dot:!0,children:!1===a.isActive?"disabled":X||"Unknown"}),(0,d.jsx)(j.Badge,{variant:"default",size:"sm",children:Q?"OAuth":R?"Cookie":"API Key"}),H&&(0,d.jsx)(j.Badge,{variant:M,size:"sm",children:"Proxy"}),U&&!1!==a.isActive&&(0,d.jsx)(F,{until:W}),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]}),Y()&&(0,d.jsx)(j.Badge,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:Y()})]}),H&&(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:I,children:I}),K&&(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:K}),L&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:L,children:["no_proxy: ",L]})]}),q&&r&&(0,d.jsxs)("select",{value:Object.prototype.hasOwnProperty.call(a.providerSpecificData||{},"assignedModel")?a.providerSpecificData.assignedModel||"":a.providerSpecificData?.freebuffModel||"",onChange:a=>r(a.target.value),disabled:!s,className:"mt-2 max-w-full rounded-md border border-border bg-background px-2 py-1 text-[11px] text-text-main",title:"Model assignment",children:[(0,d.jsx)("option",{value:"",children:"Unassigned"}),q.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))]})]})]}),(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:x,children:[(0,d.jsxs)("button",{type:"button",onClick:()=>u(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 ${H?"text-primary":"text-text-muted hover:text-primary"}`,disabled:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:v?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),t&&(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:["smart"===A&&(0,d.jsx)("p",{className:"px-3 py-1 text-[10px] text-text-muted",children:"Smart skips unfit pools for this provider/model."}),(0,d.jsx)("button",{type:"button",onClick:()=>N("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!B?"text-primary font-medium":"text-text-main"}`,children:"None"}),(0,d.jsx)("p",{className:"px-3 pt-2 text-[10px] font-medium uppercase text-text-muted",children:"Rotation"}),["fill-first","round-robin","random","smart"].map(a=>(0,d.jsx)("button",{type:"button",onClick:()=>O(a,z.length>1?z:(b||[]).filter(a=>a.isActive).map(a=>a.id)),disabled:v,className:`w-full px-3 py-1.5 text-left text-sm hover:bg-black/5 dark:hover:bg-white/5 ${A===a?"font-medium text-primary":"text-text-main"}`,children:"smart"===a?"Smart (provider/model aware)":a},a)),(0,d.jsx)("p",{className:"px-3 pt-2 text-[10px] font-medium uppercase text-text-muted",children:"Single pool"}),(b||[]).map(a=>(0,d.jsx)("button",{type:"button",onClick:()=>N(a.id),disabled:v||!0!==a.isActive,className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${B===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),p&&(0,d.jsx)(j.Tooltip,{text:J,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.Toggle,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}var H=c(79822),I=c.n(H);let J=`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")},2349:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>U});var d=c(66238),e=c(71183),f=c(68344),g=c(84725),h=c.n(g);c(15901),c(1219);var i=c(95988),j=c(76737),k=c(53207),l=c(47953),m=c(48444),n=c(46120);c(27464),c(57612);let o=["none","low","medium","high"],p=["none","thinking"],q=["none","low","medium","high","max"],r=["none","low","medium","high","xhigh","max"],s={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":q,"claude-budget":r,"gemini-level":["minimal","low","medium","high"],"gemini-budget":o,zai:p,qwen:o,kimi:q,deepseek:["none","high","max"],commandcode:r,minimax:p,hunyuan:o,step:o},t=["none","minimal","low","medium","high","xhigh","max"],u=[{provider:"codex",pattern:"*gpt-5.6-sol*",levels:t},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:t},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:t},{pattern:"*gpt-5.6-sol*",levels:["none","minimal","low","medium","high","xhigh","max"]},{pattern:"*claude*opus-5*",levels:q},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{provider:"deepseek",pattern:"*deepseek-v4.1-flash*",levels:["none","low","medium","high","xhigh","max"]},{provider:"ollama",pattern:"*deepseek-v4.1-flash*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]}];function v(a,b){if("kiro"===a&&null===function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=b.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!c)return null;let[,d,e]=c,f=Number(d),g=void 0===e?null:Number(e);return f<4||4===f&&(null===g||g<=5||null!==g&&g>=1e3)?null:"output_config"}(b))return null;let c=(0,m.nl)(a,b);if(!c.reasoning)return null;let d=u.find(c=>(!c.provider||c.provider===a)&&(0,n.gH)(c.pattern,b)),e=d?.levels||s[c.thinkingFormat]||o;return!1===c.thinkingCanDisable&&(e=e.filter(a=>"none"!==a)),e}var w=c(87571),x=c(55009),y=c(7272);let z=new Map;async function A(a){if(!a?.url||!a?.type)return[];let b=z.get(a.url);if(b&&Date.now()<b.expiresAt)return b.data;try{let b=new URLSearchParams({url:a.url,type:a.type}),c=await fetch(`/api/providers/suggested-models?${b}`);if(!c.ok)return[];let d=(await c.json()).data??[];return z.set(a.url,{data:d,expiresAt:Date.now()+6e5}),d}catch{return[]}}function B({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}function C({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}){let p="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:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:p?{color:p}: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.CapacityBadges,{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 D({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 E({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:k,onDeleteCustomModel:l,connections:m,isAnthropic:n}){let[o,p]=(0,e.useState)(""),[q,r]=(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=B({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),A=async()=>{if(!o.trim()||q)return;let a=o.trim();if(z.some(b=>b.id===a))return void alert("Model already exists for this provider.");r(!0);try{await k(a),p("")}catch(a){console.log("Error adding model:",a)}finally{r(!1)}},C=async()=>{if(s)return;let a=m.find(a=>!1!==a.isActive);if(a){t(!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&&(z.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{t(!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=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&A(),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.Button,{size:"sm",icon:"add",onClick:A,disabled:!o.trim()||q,children:q?"Adding...":"Add"}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"download",onClick:C,disabled:!F||s,children:s?"Importing...":"Import from /models"})]}),!F&&(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(({id:c,alias:e,source:f})=>(0,d.jsx)(D,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:m.length>0?()=>y(c):void 0,testStatus:w[c],isTesting:u===c},`${f}-${a}/${c}`))})]})}var F=c(9517);function G({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function H({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,modelAssignmentOptions:q=null,onModelAssignmentChange:r=null,strictModelAssignment:s=!1}){let[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),x=(0,e.useRef)(null),y=new Map((b||[]).map(a=>[a.id,a])),z=a.providerSpecificData?.proxyPoolIds||(a.providerSpecificData?.proxyPoolId?[a.providerSpecificData.proxyPoolId]:[]),A=a.providerSpecificData?.proxyRotationStrategy||"none",B=z[0]||a.providerSpecificData?.proxyPoolId||null,C=B?y.get(B):null,D=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,E=!!B||D,I=z.length>1?`${z.length} pools (${A})`:C?`Pool: ${C.name}`:B?`Pool: ${B} (inactive/missing)`:D?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",J=p?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",K="";if(C?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=C?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);K=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{K=b}}let L=C?.noProxy||a.providerSpecificData?.connectionNoProxy||"",M="default";C?.isActive===!0?M="success":(B||D)&&(M="error");let N=async a=>{w(!0);try{"__none__"===a?await l(null):await l(a),u(!1)}finally{w(!1)}},O=async(a,b)=>{let c=b.filter(a=>y.get(a)?.isActive===!0);if(c.length){w(!0);try{await l({proxyPoolIds:c,proxyRotationStrategy:a}),u(!1)}finally{w(!1)}}},P=a.authType||(c?"oauth":"apikey"),Q="oauth"===P,R="cookie"===P,S=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(Q?"OAuth Account":R?"Cookie Account":"API Key"),T=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,[U,V]=(0,e.useState)(!1),W=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,X="unavailable"!==a.testStatus||U?a.testStatus:"active",Y=()=>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:R?"cookie":Q?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:S}),T&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:T}),(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.Badge,{variant:(0,F.g)(a.isActive,X),size:"sm",dot:!0,children:!1===a.isActive?"disabled":X||"Unknown"}),(0,d.jsx)(j.Badge,{variant:"default",size:"sm",children:Q?"OAuth":R?"Cookie":"API Key"}),E&&(0,d.jsx)(j.Badge,{variant:M,size:"sm",children:"Proxy"}),U&&!1!==a.isActive&&(0,d.jsx)(G,{until:W}),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]}),Y()&&(0,d.jsx)(j.Badge,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:Y()})]}),E&&(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:I,children:I}),K&&(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:K}),L&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:L,children:["no_proxy: ",L]})]}),q&&r&&(0,d.jsxs)("select",{value:Object.prototype.hasOwnProperty.call(a.providerSpecificData||{},"assignedModel")?a.providerSpecificData.assignedModel||"":a.providerSpecificData?.freebuffModel||"",onChange:a=>r(a.target.value),disabled:!s,className:"mt-2 max-w-full rounded-md border border-border bg-background px-2 py-1 text-[11px] text-text-main",title:"Model assignment",children:[(0,d.jsx)("option",{value:"",children:"Unassigned"}),q.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))]})]})]}),(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:x,children:[(0,d.jsxs)("button",{type:"button",onClick:()=>u(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 ${E?"text-primary":"text-text-muted hover:text-primary"}`,disabled:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:v?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),t&&(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:["smart"===A&&(0,d.jsx)("p",{className:"px-3 py-1 text-[10px] text-text-muted",children:"Smart skips unfit pools for this provider/model."}),(0,d.jsx)("button",{type:"button",onClick:()=>N("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!B?"text-primary font-medium":"text-text-main"}`,children:"None"}),(0,d.jsx)("p",{className:"px-3 pt-2 text-[10px] font-medium uppercase text-text-muted",children:"Rotation"}),["fill-first","round-robin","random","smart"].map(a=>(0,d.jsx)("button",{type:"button",onClick:()=>O(a,z.length>1?z:(b||[]).filter(a=>a.isActive).map(a=>a.id)),disabled:v,className:`w-full px-3 py-1.5 text-left text-sm hover:bg-black/5 dark:hover:bg-white/5 ${A===a?"font-medium text-primary":"text-text-main"}`,children:"smart"===a?"Smart (provider/model aware)":a},a)),(0,d.jsx)("p",{className:"px-3 pt-2 text-[10px] font-medium uppercase text-text-muted",children:"Single pool"}),(b||[]).map(a=>(0,d.jsx)("button",{type:"button",onClick:()=>N(a.id),disabled:v||!0!==a.isActive,className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${B===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),p&&(0,d.jsx)(j.Tooltip,{text:J,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.Toggle,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}let I=`name1|sk-key1
3
2
  name2|sk-key2
4
- sk-key-only-auto-named`;function K({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:l,proxyPools:m,error:n,existingNames:o,onSave:p,onBulkDone:q,onClose:r}){let s="__none__",t="ollama-local"===b,u="cookie"===h,v="xai"===b&&!u,w=u?"Cookie Value":"API Key",x="azure"===b,y="cloudflare-ai"===b,z=k.Q2?.[b]?.regions||null,A=k.Q2?.[b]?.defaultRegion||z?.[0]?.id||"",[B,C]=(0,e.useState)({name:"",apiKey:"",priority:1,proxyPoolId:s,ollamaHostUrl:""}),[D,E]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[F,G]=(0,e.useState)({accountId:""}),[H,I]=(0,e.useState)(A),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(null),[P,Q]=(0,e.useState)(!1),R=y?`name1|sk-key1|acc123456
3
+ sk-key-only-auto-named`;function J({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:l,proxyPools:m,error:n,existingNames:o,onSave:p,onBulkDone:q,onClose:r}){let s="__none__",t="ollama-local"===b,u="cookie"===h,v="xai"===b&&!u,w=u?"Cookie Value":"API Key",x="azure"===b,y="cloudflare-ai"===b,z=k.Q2?.[b]?.regions||null,A=k.Q2?.[b]?.defaultRegion||z?.[0]?.id||"",[B,C]=(0,e.useState)({name:"",apiKey:"",priority:1,proxyPoolId:s,ollamaHostUrl:""}),[D,E]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[F,G]=(0,e.useState)({accountId:""}),[H,K]=(0,e.useState)(A),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(null),[P,Q]=(0,e.useState)(!1),R=y?`name1|sk-key1|acc123456
5
4
  name2|sk-key2|def789012
6
5
  sk-key-only-auto-named`:"exa"===b?`account-1|exa-key-1
7
6
  account-2|exa-key-2
8
- exa-key-only-auto-named`:J,[S,T]=(0,e.useState)("single"),[U,V]=(0,e.useState)(""),[W,X]=(0,e.useState)(null),Y=()=>t&&B.ollamaHostUrl.trim()?{baseUrl:B.ollamaHostUrl.trim()}:x?{azureEndpoint:D.azureEndpoint,apiVersion:D.apiVersion,deployment:D.deployment,organization:D.organization}:y?{accountId:F.accountId}:z&&H?{region:H}:void 0,Z=async()=>{M(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:B.apiKey,providerSpecificData:Y()})}),c=await a.json();O(c.valid?"success":"failed")}catch{O("failed")}finally{M(!1)}},$=async()=>{if(b&&(t||B.apiKey)&&(t||B.name)){Q(!0);try{let a=!1;try{M(!0),O(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:B.apiKey,providerSpecificData:Y()})});a=!!(await c.json()).valid,O(a?"success":"failed")}catch{O("failed")}finally{M(!1)}await p({name:B.name||(t?"Ollama Local":""),apiKey:B.apiKey,priority:B.priority,proxyPoolId:B.proxyPoolId===s?null:B.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:Y()})}finally{Q(!1)}}},_=async()=>{let a=U.split("\n");if(!a.length)return;let c=function(a,b,c={}){let{isCloudflareAi:d=!1}=c,e=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),f=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let g=function(a,b={}){let{isCloudflareAi:c=!1}=b,d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:d});if(!g||!g.apiKey)continue;let h=g.baseName,i=1;for(;a=`${h} ${i}`,e.has(a.toLowerCase());)i+=1;e.add(a.toLowerCase());let j={name:a,apiKey:g.apiKey,skipped:!1};g.providerSpecificData&&(j.providerSpecificData=g.providerSpecificData),f.push(j)}return f}(a,o,{isCloudflareAi:y});if(!c.length)return;Q(!0),X(null);let d=0,e=0;try{let a=await fetch("/api/providers/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:c.map(a=>({provider:b,apiKey:a.apiKey,name:a.name,priority:1,providerSpecificData:a.providerSpecificData}))})}),f=await a.json();d=Array.isArray(f.results)?f.results.filter(a=>a.ok).length:0,e=c.length-d}catch{e=c.length}Q(!1),X({success:d,failed:e}),d>0&&q&&q()};return b?(0,d.jsx)(j.Modal,{isOpen:a,title:`Add ${c||b} ${w}`,onClose:r,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.Button,{size:"sm",variant:"single"===S?"primary":"ghost",onClick:()=>{T("single"),X(null)},children:"Single"}),(0,d.jsx)(j.Button,{size:"sm",variant:"bulk"===S?"primary":"ghost",onClick:()=>{T("bulk"),X(null)},children:"Bulk Add"})]}),"bulk"===S&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y?(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"exa"===b?(0,d.jsxs)(d.Fragment,{children:["One Exa account per line: ",(0,d.jsx)("code",{children:"name|apiKey"})," or ",(0,d.jsx)("code",{children:"apiKey"}),". Keys are stored without a billable probe; runtime rotates on auth, quota, and rate-limit errors."]}):(0,d.jsxs)(d.Fragment,{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:R,value:U,onChange:a=>V(a.target.value)}),W&&(0,d.jsxs)("div",{className:`text-sm font-medium ${W.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",W.success," added",W.failed>0?`, ✗ ${W.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{onClick:_,fullWidth:!0,disabled:P||!U.trim(),children:P?"Adding...":"Add All Keys"}),(0,d.jsx)(j.Button,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===S&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.Input,{label:"Name",value:B.name,onChange:a=>C({...B,name:a.target.value}),placeholder:t?"Ollama Local":"Production Key"}),t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{label:"Ollama Host URL",value:B.ollamaHostUrl,onChange:a=>C({...B,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.Button,{onClick:Z,disabled:L||P,variant:"secondary",children:L?"Checking...":"Check"})})]}),!t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{label:w,type:u?"text":"password",value:B.apiKey,onChange:a=>C({...B,apiKey:a.target.value}),placeholder:u?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.Button,{onClick:Z,disabled:!B.apiKey||L||P,variant:"secondary",children:L?"Checking...":"Check"})})]}),v&&(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."}),u&&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?:\/\//,"")]})]})]}),z&&(0,d.jsx)(j.Select,{label:"Region",value:H,onChange:a=>I(a.target.value),options:z.map(a=>({value:a.id,label:a.label}))}),t&&(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"}),")."]}),N&&(0,d.jsx)(j.Badge,{variant:"success"===N?"success":"error",children:"success"===N?"Valid":"Invalid"}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),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:"Cloudflare Workers AI"}),(0,d.jsx)(j.Input,{label:"Account ID",value:F.accountId,onChange:a=>G({...F,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"})]})]}),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:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.Input,{label:"Azure Endpoint",value:D.azureEndpoint,onChange:a=>E({...D,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(j.Input,{label:"Deployment Name",value:D.deployment,onChange:a=>E({...D,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(j.Input,{label:"API Version",value:D.apiVersion,onChange:a=>E({...D,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(j.Input,{label:"Organization",value:D.organization,onChange:a=>E({...D,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(j.Input,{label:"Priority",type:"number",value:B.priority,onChange:a=>C({...B,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(j.Select,{label:"Proxy Pool",value:B.proxyPoolId,onChange:a=>C({...B,proxyPoolId:a.target.value}),options:[{value:s,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.Button,{onClick:$,fullWidth:!0,disabled:P||!t&&(!B.name||!B.apiKey)||x&&(!D.azureEndpoint||!D.deployment||!D.organization)||y&&!F.accountId,children:P?"Saving...":"Save"}),(0,d.jsx)(j.Button,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}K.propTypes={isOpen:I().bool.isRequired,provider:I().string,providerName:I().string,isCompatible:I().bool,isAnthropic:I().bool,authType:I().string,authHint:I().string,website:I().string,proxyPools:I().arrayOf(I().shape({id:I().string,name:I().string})),error:I().string,existingNames:I().arrayOf(I().string),onSave:I().func.isRequired,onBulkDone:I().func,onClose:I().func.isRequired};let L=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function M({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)(()=>({name:b?.name||"",prefix:b?.prefix||"",apiType:b?.apiType||"chat",baseUrl:b?.baseUrl||(g?"https://api.anthropic.com/v1":"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,v]=(0,e.useState)(b);b!==u&&(v(b),b&&i({name:b.name||"",prefix:b.prefix||"",apiType:b.apiType||"chat",baseUrl:b.baseUrl||(g?"https://api.anthropic.com/v1":"https://api.openai.com/v1")}));let w=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)}}},x=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.Modal,{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.Input,{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.Input,{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.Select,{label:"API Type",options:L,value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(j.Input,{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.Input,{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.Button,{onClick:x,disabled:!m||q||!h.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(j.Input,{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.Badge,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{onClick:w,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||k,children:k?"Saving...":"Save"}),(0,d.jsx)(j.Button,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function N(a,b){switch(b.type){case"RESET":return{modelId:"",testStatus:null,testError:"",saving:!1};case"SET_MODEL":return{...a,modelId:b.value,testStatus:null,testError:""};case"TEST_START":return{...a,testStatus:"testing",testError:""};case"TEST_RESULT":return{...a,testStatus:b.ok?"ok":"error",testError:b.error||""};case"SAVE_START":return{...a,saving:!0};case"SAVE_DONE":return{...a,saving:!1};default:return a}}function O({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useReducer)(N,{modelId:"",testStatus:null,testError:"",saving:!1}),{modelId:k,testStatus:l,testError:m,saving:n}=h,[o,p]=(0,e.useState)(!1);a&&!o?(p(!0),i({type:"RESET"})):!a&&o&&p(!1);let q=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},r=async()=>{let a=q(k.trim());if(a){i({type:"TEST_START"});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();i({type:"TEST_RESULT",ok:d.ok,error:d.error})}catch(a){i({type:"TEST_RESULT",ok:!1,error:a.message})}}},s=async()=>{let a=q(k.trim());if(a&&!n){i({type:"SAVE_START"});try{await f(a)}finally{i({type:"SAVE_DONE"})}}};return(0,d.jsx)(j.Modal,{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",{htmlFor:"add-custom-model-id",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",{id:"add-custom-model-id",type:"text",value:k,onChange:a=>i({type:"SET_MODEL",value:a.target.value}),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"}),(0,d.jsx)(j.Button,{variant:"secondary",icon:"science",loading:"testing"===l,onClick:r,disabled:!k.trim()||"testing"===l,children:"testing"===l?"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(k.trim())||"model-id"})]})]}),"ok"===l&&(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"===l&&(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.Button,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(j.Button,{onClick:s,fullWidth:!0,size:"sm",disabled:!k.trim()||n,children:n?"Adding...":"Add Model"})]})]})})}let P=`[
7
+ exa-key-only-auto-named`:I,[S,T]=(0,e.useState)("single"),[U,V]=(0,e.useState)(""),[W,X]=(0,e.useState)(null),Y=()=>t&&B.ollamaHostUrl.trim()?{baseUrl:B.ollamaHostUrl.trim()}:x?{azureEndpoint:D.azureEndpoint,apiVersion:D.apiVersion,deployment:D.deployment,organization:D.organization}:y?{accountId:F.accountId}:z&&H?{region:H}:void 0,Z=async()=>{M(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:B.apiKey,providerSpecificData:Y()})}),c=await a.json();O(c.valid?"success":"failed")}catch{O("failed")}finally{M(!1)}},$=async()=>{if(b&&(t||B.apiKey)&&(t||B.name)){Q(!0);try{let a=!1;try{M(!0),O(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:B.apiKey,providerSpecificData:Y()})});a=!!(await c.json()).valid,O(a?"success":"failed")}catch{O("failed")}finally{M(!1)}await p({name:B.name||(t?"Ollama Local":""),apiKey:B.apiKey,priority:B.priority,proxyPoolId:B.proxyPoolId===s?null:B.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:Y()})}finally{Q(!1)}}},_=async()=>{let a=U.split("\n");if(!a.length)return;let c=function(a,b,c={}){let{isCloudflareAi:d=!1}=c,e=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),f=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let g=function(a,b={}){let{isCloudflareAi:c=!1}=b,d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:d});if(!g||!g.apiKey)continue;let h=g.baseName,i=1;for(;a=`${h} ${i}`,e.has(a.toLowerCase());)i+=1;e.add(a.toLowerCase());let j={name:a,apiKey:g.apiKey,skipped:!1};g.providerSpecificData&&(j.providerSpecificData=g.providerSpecificData),f.push(j)}return f}(a,o,{isCloudflareAi:y});if(!c.length)return;Q(!0),X(null);let d=0,e=0;try{let a=await fetch("/api/providers/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:c.map(a=>({provider:b,apiKey:a.apiKey,name:a.name,priority:1,providerSpecificData:a.providerSpecificData}))})}),f=await a.json();d=Array.isArray(f.results)?f.results.filter(a=>a.ok).length:0,e=c.length-d}catch{e=c.length}Q(!1),X({success:d,failed:e}),d>0&&q&&q()};return b?(0,d.jsx)(j.Modal,{isOpen:a,title:`Add ${c||b} ${w}`,onClose:r,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.Button,{size:"sm",variant:"single"===S?"primary":"ghost",onClick:()=>{T("single"),X(null)},children:"Single"}),(0,d.jsx)(j.Button,{size:"sm",variant:"bulk"===S?"primary":"ghost",onClick:()=>{T("bulk"),X(null)},children:"Bulk Add"})]}),"bulk"===S&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y?(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"exa"===b?(0,d.jsxs)(d.Fragment,{children:["One Exa account per line: ",(0,d.jsx)("code",{children:"name|apiKey"})," or ",(0,d.jsx)("code",{children:"apiKey"}),". Keys are stored without a billable probe; runtime rotates on auth, quota, and rate-limit errors."]}):(0,d.jsxs)(d.Fragment,{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:R,value:U,onChange:a=>V(a.target.value)}),W&&(0,d.jsxs)("div",{className:`text-sm font-medium ${W.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",W.success," added",W.failed>0?`, ✗ ${W.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{onClick:_,fullWidth:!0,disabled:P||!U.trim(),children:P?"Adding...":"Add All Keys"}),(0,d.jsx)(j.Button,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===S&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.Input,{label:"Name",value:B.name,onChange:a=>C({...B,name:a.target.value}),placeholder:t?"Ollama Local":"Production Key"}),t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{label:"Ollama Host URL",value:B.ollamaHostUrl,onChange:a=>C({...B,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.Button,{onClick:Z,disabled:L||P,variant:"secondary",children:L?"Checking...":"Check"})})]}),!t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{label:w,type:u?"text":"password",value:B.apiKey,onChange:a=>C({...B,apiKey:a.target.value}),placeholder:u?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.Button,{onClick:Z,disabled:!B.apiKey||L||P,variant:"secondary",children:L?"Checking...":"Check"})})]}),v&&(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."}),u&&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?:\/\//,"")]})]})]}),z&&(0,d.jsx)(j.Select,{label:"Region",value:H,onChange:a=>K(a.target.value),options:z.map(a=>({value:a.id,label:a.label}))}),t&&(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"}),")."]}),N&&(0,d.jsx)(j.Badge,{variant:"success"===N?"success":"error",children:"success"===N?"Valid":"Invalid"}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),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:"Cloudflare Workers AI"}),(0,d.jsx)(j.Input,{label:"Account ID",value:F.accountId,onChange:a=>G({...F,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"})]})]}),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:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.Input,{label:"Azure Endpoint",value:D.azureEndpoint,onChange:a=>E({...D,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(j.Input,{label:"Deployment Name",value:D.deployment,onChange:a=>E({...D,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(j.Input,{label:"API Version",value:D.apiVersion,onChange:a=>E({...D,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(j.Input,{label:"Organization",value:D.organization,onChange:a=>E({...D,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(j.Input,{label:"Priority",type:"number",value:B.priority,onChange:a=>C({...B,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(j.Select,{label:"Proxy Pool",value:B.proxyPoolId,onChange:a=>C({...B,proxyPoolId:a.target.value}),options:[{value:s,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.Button,{onClick:$,fullWidth:!0,disabled:P||!t&&(!B.name||!B.apiKey)||x&&(!D.azureEndpoint||!D.deployment||!D.organization)||y&&!F.accountId,children:P?"Saving...":"Save"}),(0,d.jsx)(j.Button,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}let K=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function L({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)(()=>({name:b?.name||"",prefix:b?.prefix||"",apiType:b?.apiType||"chat",baseUrl:b?.baseUrl||(g?"https://api.anthropic.com/v1":"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,v]=(0,e.useState)(b);b!==u&&(v(b),b&&i({name:b.name||"",prefix:b.prefix||"",apiType:b.apiType||"chat",baseUrl:b.baseUrl||(g?"https://api.anthropic.com/v1":"https://api.openai.com/v1")}));let w=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)}}},x=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.Modal,{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.Input,{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.Input,{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.Select,{label:"API Type",options:K,value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(j.Input,{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.Input,{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.Button,{onClick:x,disabled:!m||q||!h.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(j.Input,{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.Badge,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{onClick:w,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||k,children:k?"Saving...":"Save"}),(0,d.jsx)(j.Button,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function M(a,b){switch(b.type){case"RESET":return{modelId:"",testStatus:null,testError:"",saving:!1};case"SET_MODEL":return{...a,modelId:b.value,testStatus:null,testError:""};case"TEST_START":return{...a,testStatus:"testing",testError:""};case"TEST_RESULT":return{...a,testStatus:b.ok?"ok":"error",testError:b.error||""};case"SAVE_START":return{...a,saving:!0};case"SAVE_DONE":return{...a,saving:!1};default:return a}}function N({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useReducer)(M,{modelId:"",testStatus:null,testError:"",saving:!1}),{modelId:k,testStatus:l,testError:m,saving:n}=h,[o,p]=(0,e.useState)(!1);a&&!o?(p(!0),i({type:"RESET"})):!a&&o&&p(!1);let q=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},r=async()=>{let a=q(k.trim());if(a){i({type:"TEST_START"});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();i({type:"TEST_RESULT",ok:d.ok,error:d.error})}catch(a){i({type:"TEST_RESULT",ok:!1,error:a.message})}}},s=async()=>{let a=q(k.trim());if(a&&!n){i({type:"SAVE_START"});try{await f(a)}finally{i({type:"SAVE_DONE"})}}};return(0,d.jsx)(j.Modal,{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",{htmlFor:"add-custom-model-id",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",{id:"add-custom-model-id",type:"text",value:k,onChange:a=>i({type:"SET_MODEL",value:a.target.value}),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"}),(0,d.jsx)(j.Button,{variant:"secondary",icon:"science",loading:"testing"===l,onClick:r,disabled:!k.trim()||"testing"===l,children:"testing"===l?"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(k.trim())||"model-id"})]})]}),"ok"===l&&(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"===l&&(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.Button,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(j.Button,{onClick:s,fullWidth:!0,size:"sm",disabled:!k.trim()||n,children:n?"Adding...":"Add Model"})]})]})})}let O=`[
9
8
  {
10
9
  "accessToken": "eyJhbGc...",
11
10
  "refreshToken": "rt_...",
12
11
  "idToken": "eyJhbGc...",
13
12
  "email": "user@example.com"
14
13
  }
15
- ]`;function Q({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),o=()=>{h||(g(""),l(""),n(null),b())},p=async()=>{var a;let b;l(""),n(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,x.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,x.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,x.Tl)("Request failed"))}finally{i(!1)}},q=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(j.Modal,{isOpen:a,title:(0,x.Tl)("Bulk Add Codex Accounts"),onClose:o,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,x.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:P,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,x.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,x.Tl)("failed")}`:""]}),q.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:q.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.Button,{onClick:p,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,x.Tl)("Importing..."):(0,x.Tl)("Import All")}),(0,d.jsx)(j.Button,{onClick:o,variant:"ghost",fullWidth:!0,disabled:h,children:(0,x.Tl)("Close")})]})]})})}let R=`[
14
+ ]`;function P({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),o=()=>{h||(g(""),l(""),n(null),b())},p=async()=>{var a;let b;l(""),n(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,y.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,y.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,y.Tl)("Request failed"))}finally{i(!1)}},q=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(j.Modal,{isOpen:a,title:(0,y.Tl)("Bulk Add Codex Accounts"),onClose:o,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,y.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:O,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,y.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,y.Tl)("failed")}`:""]}),q.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:q.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.Button,{onClick:p,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,y.Tl)("Importing..."):(0,y.Tl)("Import All")}),(0,d.jsx)(j.Button,{onClick:o,variant:"ghost",fullWidth:!0,disabled:h,children:(0,y.Tl)("Close")})]})]})})}let Q=`[
16
15
  {
17
16
  "access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
18
17
  "refresh_token": "LZhriF9bf88pPykpXCuZ9...",
@@ -25,4 +24,5 @@ exa-key-only-auto-named`:J,[S,T]=(0,e.useState)("single"),[U,V]=(0,e.useState)("
25
24
  "id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
26
25
  "email": "account2@example.com"
27
26
  }
28
- ]`;function S(a){let b,c=a.trim();if(!c)return[];try{b=JSON.parse(c)}catch(a){try{let a=c;a.startsWith("[")||((a=a.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(a=a.slice(0,-1)),a=`[${a}]`),b=JSON.parse(a)}catch{throw a}}if(Array.isArray(b))return b;if(b&&"object"==typeof b)return Array.isArray(b.accounts)?b.accounts:[b];throw Error("Input must be a JSON object or array of objects")}function T({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),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(null),s=(0,e.useRef)(null),t=()=>{h||(g(""),l(""),n(null),r(null),p(!1),b())},u=async a=>{if(!a||0===a.length)return;l("");let b=Array.from(a).filter(a=>a.name.endsWith(".json")||"application/json"===a.type||""===a.type);if(0===b.length)return void l((0,x.Tl)("Please select valid .json files"));try{let a=[];for(let c of b){let b=await c.text(),d=S(b);Array.isArray(d)?a.push(...d):d&&a.push(d)}if(0===a.length)return void l((0,x.Tl)("No accounts found in selected files"));g(JSON.stringify(a,null,2)),r({filesCount:b.length,accountsCount:a.length})}catch(a){l(`${(0,x.Tl)("Error reading files")}: ${a.message}`)}},v=async()=>{let a;l(""),n(null);try{a=S(f)}catch(a){l(`${(0,x.Tl)("Invalid JSON")}: ${a.message}`);return}if(!a||0===a.length)return void l((0,x.Tl)("No accounts found in input"));i(!0);try{let b=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:a})}),d=await b.json();if(!b.ok)return void l(d?.error||`Request failed: ${b.status}`);n(d),d.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,x.Tl)("Request failed"))}finally{i(!1)}},w=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(j.Modal,{isOpen:a,title:(0,x.Tl)("Bulk Add Grok CLI Accounts"),onClose:t,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,x.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,d.jsx)("input",{ref:s,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:a=>{u(a.target.files),a.target&&(a.target.value="")}}),(0,d.jsx)(j.Button,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>s.current?.click(),disabled:h,children:(0,x.Tl)("Upload JSON Files")})]}),(0,d.jsxs)("div",{onDragOver:a=>{a.preventDefault(),p(!0)},onDragLeave:a=>{a.preventDefault(),p(!1)},onDrop:a=>{a.preventDefault(),p(!1),a.dataTransfer?.files?.length>0&&u(a.dataTransfer.files)},className:`relative rounded border transition-colors ${o?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,d.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:R,value:f,onChange:a=>{g(a.target.value),r(null)},disabled:h}),o&&(0,d.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,d.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,x.Tl)("Drop .json files here")})]})]}),q&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,d.jsxs)("span",{children:[(0,x.Tl)("Loaded")," ",q.accountsCount," ",(0,x.Tl)("account(s) from")," ",q.filesCount," ",(0,x.Tl)("file(s)")]})]}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),m&&m.failed>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",m.failed," ",(0,x.Tl)("failed")]}),w.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:w.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.Button,{onClick:v,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,x.Tl)("Importing..."):(0,x.Tl)("Import All")}),(0,d.jsx)(j.Button,{onClick:t,variant:"ghost",fullWidth:!0,disabled:h,children:(0,x.Tl)("Close")})]})]})})}let U={claude:"claudeAutoPing",codex:"codexAutoPing"};function V(){let a,b,c,g,m=(0,f.useParams)(),n=(0,f.useRouter)(),o=m.id,{getCaps:p}=(0,w.y)(),[q,r]=(0,e.useState)([]),[s,t]=(0,e.useState)(!0),[y,C]=(0,e.useState)(null),[E,F]=(0,e.useState)([]),[H,I]=(0,e.useState)(!1),[J,L]=(0,e.useState)(!1),[N,P]=(0,e.useState)(!1),[R,S]=(0,e.useState)(""),[V,W]=(0,e.useState)(!1),[X,Y]=(0,e.useState)(!1),[Z,$]=(0,e.useState)(!1),[_,aa]=(0,e.useState)(!1),[ab,ac]=(0,e.useState)(!1),[ad,ae]=(0,e.useState)(null),[af,ag]=(0,e.useState)({}),[ah,ai]=(0,e.useState)([]),[aj,ak]=(0,e.useState)(!1),[al,am]=(0,e.useState)({}),[an,ao]=(0,e.useState)(""),[ap,aq]=(0,e.useState)(()=>new Set),[ar,as]=(0,e.useState)(!1),[at,au]=(0,e.useState)([]),[av,aw]=(0,e.useState)(1),[ax,ay]=(0,e.useState)("__none__"),[az,aA]=(0,e.useState)(!1),[aB,aC]=(0,e.useState)(null),[aD,aE]=(0,e.useState)(""),[aF,aG]=(0,e.useState)(!1),[aH,aI]=(0,e.useState)("auto"),[aJ,aK]=(0,e.useState)({enabled:!1,connections:{}}),[aL,aM]=(0,e.useState)([]),[aN,aO]=(0,e.useState)([]),[aP,aQ]=(0,e.useState)([]),[aR,aS]=(0,e.useState)([]),[aT,aU]=(0,e.useState)(null),[aV,aW]=(0,e.useState)(null),[aX,aY]=(0,e.useState)(!1),[aZ,a$]=(0,e.useState)(!1),[a_,a0]=(0,e.useState)(!1),[a1,a2]=(0,e.useState)(null),[a3,a4]=(0,e.useState)({}),[a5,a6]=(0,e.useState)(null),a7=(0,e.useRef)(!1),[a8,a9]=(0,e.useState)(!1),{copied:ba,copy:bb}=(0,v.C)(),bc=()=>{I(!0)},bd=()=>{bi?bc():(S(""),P(!0))},be=()=>{S(""),P(!0)},bf=()=>{bi?bd():be()},bg=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[o]||k.fg[o]||k.IS[o]||k.nJ[o]||k.br[o],bh=bg?.authModes||[],bi=!!k.zN[o]||!!k.IS[o]||bh.includes("oauth"),bj=!!k.fg[o]||bh.includes("apikey"),bk=!!k.IS[o]?.noAuth,bl=(0,l.KC)(o),bm="cursor"===o&&aN.length>0?aN:bl,bn=(0,k.wG)(o),bo=(0,k.mq)(o),bp=(0,k.gb)(o),bq=bo||bp,br=!bq&&bi&&bj,bs="xai"===o?"Grok Build OAuth":"grok-cli"===o?"Grok CLI Device Login":"kimi"===o?"Kimi Coding OAuth":"OAuth",bt="xai"===o?"xAI API Key":"kimi"===o?"Kimi API Key":"qoder"===o?"PAT":"API Key",bu=a=>{if(!aH||"auto"===aH)return null;let b=u(o,a);return b&&b.includes(aH)?aH:null},bv=bq?o:bn,bw=(a=new Map,b=b=>{b?.id&&!a.has(b.id)&&a.set(b.id,b)},bm.forEach(b),ah.forEach(a=>{a.providerAlias===bv&&"llm"===(a.kind||a.type||"llm")&&b(a)}),c=new Set(aR),[...a.values()].filter(a=>!c.has(a.id))),bx=(()=>{let a=new Set,b=new Set,c=c=>{if(!c||b.has(c))return;b.add(c);let d=u(o,c);d&&d.forEach(b=>{"none"!==b&&a.add(b)})};for(let a of bm)c(a.id);for(let a of aP)c(a.id);for(let a of ah)a.providerAlias===bv&&"llm"===(a.kind||a.type||"llm")&&c(a.id);return a.size?["auto",...a]:null})(),by=bq?y?.prefix||o:bn,bz=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bv)}`,{cache:"no-store"}),b=await a.json();a.ok&&aS(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bv]),bA=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bv,ids:[a]})})).ok&&await bz()}catch(a){console.log("Error disabling model:",a)}},bB=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bv)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bz()}catch(a){console.log("Error enabling model:",a)}},bC=async a=>{a.length&&aU({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aU(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bv,ids:a})})).ok&&await bz()}catch(a){console.log("Error disabling all models:",a)}}})},bD=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bv)}`,{method:"DELETE"})).ok&&await bz()}catch(a){console.log("Error enabling all models:",a)}},bE=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&ag(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bF=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ai(b.models||[])}catch(a){console.log("Error fetching custom models:",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(),g=await c.json(),h=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===o);r(a)}c.ok&&F(g.proxyPools||[]);let i=(h.providerStrategies||{})[o]||{};aC(i.fallbackStrategy||null),aE(null!=i.stickyRoundRobinLimit?String(i.stickyRoundRobinLimit):"1"),aG(!0===i.strictModelAssignment);let j=(h.providerThinking||{})[o]||{};aI(j.mode||"auto");let k=U[o],l=k&&h[k]||{};if(aK({enabled:!0===l.enabled,connections:l.connections||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===o)||null;if(!a&&bq)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===o)||null))break}C(a)}}catch(a){console.log("Error fetching connections:",a)}finally{t(!1)}},[o,bq]),bH=async a=>{try{let b=await fetch(`/api/provider-nodes/${o}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(C(c.node),await bG(),aa(!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={...d[o]||{}};a?e.fallbackStrategy=a:(delete e.fallbackStrategy,delete e.stickyRoundRobinLimit),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[o]:f[o]=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=>{aG(a);try{let b=await fetch("/api/settings",{cache:"no-store"}),c=(b.ok?await b.json():{}).providerStrategies||{};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:{...c,[o]:{...c[o]||{},strictModelAssignment:a}}})})}catch(a){console.log("Error saving Freebuff strict assignment:",a)}},bK=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{assignedModel:b||null}})})).ok&&r(c=>c.map(c=>c.id===a?{...c,providerSpecificData:{...c.providerSpecificData||{},assignedModel:b||null}}:c))}catch(a){console.log("Error saving Freebuff model assignment:",a)}},bL=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[o]={mode:a}:delete c[o],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},bM=async a=>{let b=U[o];if(b){aK(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},bN=async(a,b,c=bn)=>{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 bE();else{let b=await a.json();aW({title:(0,x.Tl)("Error"),message:b.error||"Failed to set alias",variant:"error"})}}catch(a){console.log("Error setting alias:",a)}},bO=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bE()}catch(a){console.log("Error deleting alias:",a)}},bP=async(a,b="llm",c=bv)=>{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 bF();else{let a=await d.json();aW({title:(0,x.Tl)("Error"),message:a.error||"Failed to add custom model",variant:"error"})}}catch(a){console.log("Error adding custom model:",a)}},bQ=async(a,b="llm",c=bv)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bF()}catch(a){console.log("Error deleting custom model:",a)}},bR=async()=>{if(a8)return;let a=q.find(a=>!1!==a.isActive);a9(!0);try{let b=[];if(a){let c=await fetch(`/api/providers/${a.id}/models`),d=await c.json();if(!c.ok)return void aW({title:(0,x.Tl)("Error"),message:d.error||(0,x.Tl)("Failed to fetch models"),variant:"error"});b=d.models||[]}else{let a=(k.zN[o]||k.fg[o]||k.IS[o]||k.nJ[o])?.modelsFetcher;if(!a)return void aW({title:(0,x.Tl)("Notice"),message:(0,x.Tl)("Please add an active connection first"),variant:"info"});b=await z(a)}let c=b.filter(a=>a?.id||a?.name||a?.model);if(0===c.length)return void aW({title:(0,x.Tl)("Notice"),message:(0,x.Tl)("No models returned"),variant:"info"});let d=RegExp(`^(?:${o}|${bv})/`),e=/embed|whisper|dall-e|dalle|imagen|moderation|rerank|tts/i,f=new Set([...bm.map(a=>a.id),...aP.map(a=>a.id),...ah.filter(a=>a.providerAlias===bv&&"llm"===(a.kind||a.type||"llm")).map(a=>a.id)]);for(let a of Object.values(af))"string"==typeof a&&(a.startsWith(`${bv}/`)?f.add(a.slice(bv.length+1)):a.startsWith(`${o}/`)&&f.add(a.slice(o.length+1)));let g=[];for(let a of c){let b=a.id||a.name||a.model,c=(0,l.CP)(a);if(c&&"llm"!==c||e.test(b))continue;let h=b.replace(d,"");!h||f.has(h)||(g.push({providerAlias:bv,id:h,type:"llm"}),f.add(h))}if(0===g.length)aW({title:(0,x.Tl)("Notice"),message:(0,x.Tl)("All models already exist, no new models added"),variant:"info"});else{let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:g})}),b=(await a.json()).count??g.length;await bF(),aW({title:(0,x.Tl)("Success"),message:(0,x.Tl)("Successfully added")+` ${b} `+(0,x.Tl)("models"),variant:"success"})}}catch(a){console.log("Error importing provider models:",a),aW({title:(0,x.Tl)("Error"),message:(0,x.Tl)("Error fetching models")+": "+a.message,variant:"error"})}finally{a9(!1)}},bS=async()=>{if(aZ||0===q.length)return;let a=Object.fromEntries(q.map(a=>[a.id,{state:"queued",error:null}]));a7.current=!1,a$(!0),a0(!1),a2(null),a4(a),a6({total:q.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<q.length;a+=1){if(a7.current){a6({total:q.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=q[a];a2(d.id),a4(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,a4(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,a4(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}a6({total:q.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<q.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{a2(null),a$(!1),a0(!1),a7.current=!1}},bT=async a=>{aU({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aU(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&r(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bU=()=>{bG(),I(!1)},bV=async a=>{S("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:o,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bG(),P(!1);return}S(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),S("Failed to save connection")}},bW=async a=>{try{(await fetch(`/api/providers/${ad.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bG(),$(!1))}catch(a){console.log("Error updating connection:",a)}},bX=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&r(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},bY=async(a,b)=>{let c=[...q];[c[a],c[b]]=[c[b],c[a]],r(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()}},bZ=q.filter(a=>at.includes(a.id)),{currentPage:b$,totalPages:b_,items:b0,start:b1}=function(a=[],b=1){let c=Array.isArray(a)?a:[],d=c.length,e=Math.max(1,Math.ceil(d/10)),f=Math.floor(Number(b)),g=Math.min(Number.isFinite(f)&&f>0?f:1,e),h=(g-1)*10,i=c.slice(h,h+10);return{currentPage:g,totalPages:e,totalItems:d,start:h,items:i,pageSize:10}}(q,av),b2=q.length>0&&at.length===q.length,b3=(()=>{if(0===bZ.length)return"";let a=new Set(bZ.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return"All selected currently unbound";let c=E.find(a=>a.id===b);return`All selected currently bound to ${c?.name||b}`}return"Selected connections have mixed proxy bindings"})(),b4=()=>{az||ac(!1)},b5=async(a,b)=>{let c=await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok)throw Error((await c.json().catch(()=>({}))).error||`Proxy update failed (${c.status})`);return c.json()},b6=async a=>{aA(!0);try{let b=[];for(let{connectionId:c,proxyPoolId:d,proxyPoolIds:e,proxyRotationStrategy:f}of a)try{let a=e?{proxyPoolIds:e,proxyRotationStrategy:f}:{proxyPoolId:d};await b5(c,a)}catch(a){console.log("Error applying proxy for",c,a),b.push(c)}if(await bG(),b.length>0)return void aW({title:(0,x.Tl)("Error"),message:`Updated with ${b.length} failed request(s). Retry the selected connections.`,variant:"error"});ac(!1),au([]),ay("__none__")}finally{aA(!1)}},b7=a=>b6((at.length>0?bZ:q).map(b=>({connectionId:b.id,proxyPoolId:a}))),b8=(0,d.jsxs)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:[b0.map((a,b)=>{let c,e=b1+b;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:(c=a.id,at.includes(c)),onChange:()=>{var b;return b=a.id,void au(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(G,{connection:a,proxyPools:E,isOAuth:bi,isFirst:0===e,isLast:e===q.length-1,onMoveUp:()=>bY(e,e-1),onMoveDown:()=>bY(e,e+1),onToggleActive:b=>bX(a.id,b),autoPing:U[o]&&"oauth"===a.authType?{on:!0===aJ.connections[a.id],onToggle:b=>{var c;return c=a.id,void bM({...aJ,connections:{...aJ.connections,[c]:b}})},provider:o}:null,onUpdateProxy:async b=>{try{let c="object"==typeof b?b:{proxyPoolId:b||null};if((await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).ok){let b={...a.providerSpecificData};c.proxyPoolIds?(b.proxyPoolIds=c.proxyPoolIds,b.proxyRotationStrategy=c.proxyRotationStrategy,delete b.proxyPoolId):(c.proxyPoolId?b.proxyPoolId=c.proxyPoolId:delete b.proxyPoolId,delete b.proxyPoolIds,delete b.proxyRotationStrategy),r(c=>c.map(c=>c.id===a.id?{...c,providerSpecificData:b}:c))}}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{ae(a),$(!0)},onDelete:()=>bT(a.id),oneByOneStatus:a3[a.id]||null,modelAssignmentOptions:"freebuff"===o?bw:null,onModelAssignmentChange:"freebuff"===o?b=>bK(a.id,b):null,strictModelAssignment:aF})})]},a.id)}),q.length>10&&(0,d.jsx)(j.Pagination,{currentPage:b$,pageSize:10,totalItems:q.length,onPageChange:aw})]}),b9=E.filter(a=>!0===a.isActive),ca=(0,d.jsx)(j.Modal,{isOpen:ab,onClose:b4,title:at.length>0?`Apply Proxy (${at.length} selected)`:`Apply Proxy (All ${q.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[b3&&(0,d.jsx)("p",{className:"text-xs text-text-muted bg-surface-2 px-3 py-2 rounded-lg border border-border/50",children:b3}),(0,d.jsxs)("div",{className:"flex flex-col divide-y divide-border/30 border border-border/50 rounded-xl overflow-hidden bg-surface",children:[(0,d.jsxs)("div",{className:"p-3 flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"px-3 pb-1 text-[10px] font-semibold uppercase tracking-wider text-text-muted",children:"Dynamic Strategies"}),(0,d.jsxs)("button",{type:"button",onClick:()=>{let a=E.filter(a=>!0===a.isActive);return 0===a.length?void aW({title:(0,x.Tl)("Notice"),message:"No active proxy pools available.",variant:"info"}):b6((at.length>0?bZ:q).map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},disabled:az||0===b9.length,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"sync_alt"}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("span",{className:"text-sm font-medium text-text-main",children:"One-to-one (rotate)"}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"Distribute active proxy pools round-robin"})]})]}),["fill-first","round-robin","random","smart"].map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>{let b;return(b=b9.map(a=>a.id).filter(a=>E.find(b=>b.id===a)?.isActive===!0)).length?b6((at.length>0?bZ:q).map(c=>({connectionId:c.id,proxyPoolIds:b,proxyRotationStrategy:a}))):void aW({title:(0,x.Tl)("Notice"),message:"No active proxy pools selected.",variant:"info"})},disabled:az||0===b9.length,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"autorenew"}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("span",{className:"text-sm font-medium text-text-main capitalize",children:[a," strategy"]}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"smart"===a?"Bypass pools marked unfit for provider/model":`Rotate over all active pools using ${a}`})]})]},a))]}),(0,d.jsxs)("div",{className:"p-3 flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"px-3 pb-1 text-[10px] font-semibold uppercase tracking-wider text-text-muted",children:"Static Assignment"}),(0,d.jsxs)("button",{type:"button",onClick:()=>b7(null),disabled:az,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"link_off"}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("span",{className:"text-sm font-medium text-text-main",children:"None (unbind all)"}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"Direct routing without proxy"})]})]}),E.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>b7(a.id),disabled:az||!0!==a.isActive,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"lan"}),(0,d.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,d.jsx)("span",{className:"truncate text-sm font-medium text-text-main",children:a.name}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted truncate mt-0.5",children:a.proxyUrl})]}),!0!==a.isActive&&(0,d.jsx)(j.Badge,{variant:"secondary",size:"sm",className:"ml-auto shrink-0",children:"inactive"})]},a.id))]})]}),az&&(0,d.jsx)("p",{className:"text-xs text-text-muted animate-pulse px-1",children:"Applying proxy configuration..."}),(0,d.jsx)(j.Button,{onClick:b4,variant:"ghost",fullWidth:!0,disabled:az,children:"Cancel"})]})}),cb=async a=>{if(!ap.has(a)){aq(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:`${bv}/${a}`})}),c=await b.json();am(b=>({...b,[a]:c.ok?"ok":"error"})),ao(c.ok?"":c.error||"Model not reachable")}catch{am(b=>({...b,[a]:"error"})),ao("Network error")}finally{aq(b=>{let c=new Set(b);return c.delete(a),c})}}};return s?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(j.CardSkeleton,{}),(0,d.jsx)(j.CardSkeleton,{})]}):bg?(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)(i.A,{providerId:bg.id,size:48,alt:bg.name,className:"shrink-0 rounded-lg",fallbackText:bg.textIcon||bg.id.slice(0,2).toUpperCase(),fallbackColor:bg.color}),(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:bg.name}),(bg.notice?.apiKeyUrl||bg.notice?.signupUrl||bg.website)&&(0,d.jsxs)("a",{href:bg.notice?.apiKeyUrl||bg.notice?.signupUrl||bg.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"}),bg.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[q.length," connection",1===q.length?"":"s"]})]})]})]}),bg.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:bg.deprecationNotice})]}),bg.notice?.text&&!bg.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:bg.notice.text}),bg.notice.apiKeyUrl&&(0,d.jsx)("a",{href:bg.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 →"})]}),bq&&y&&(0,d.jsx)(j.Card,{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:bp?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bp?"Messages API":"responses"===y.apiType?"Responses API":"Chat Completions"," \xb7 ",(y.baseUrl||"").replace(/\/$/,""),"/",bp?"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.Button,{size:"sm",icon:"add",onClick:()=>{S(""),P(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>aa(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aU({title:"Delete Compatible Node",message:`Delete this ${bp?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aU(null);try{(await fetch(`/api/provider-nodes/${o}`,{method:"DELETE"})).ok&&n.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bk?(0,d.jsx)(j.NoAuthProxyCard,{providerId:o}):(0,d.jsxs)(j.Card,{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.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[q.length>0&&E.length>0&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ac(!0),children:"Apply Proxy"}),q.length>0&&(0,d.jsxs)(d.Fragment,{children:[at.length>0&&(0,d.jsxs)(j.Button,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=at.length;0!==a&&aU({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aU(null);let a=0,b=[...at];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}r(a=>a.filter(a=>!b.includes(a.id))),au([]),a>0&&aW({title:(0,x.Tl)("Error"),message:`Deleted ${b.length-a} connection(s), ${a} failed.`,variant:"error"})}})},children:["Delete Selected (",at.length,")"]}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"sync",onClick:bS,disabled:aZ,children:aZ?"Testing Connection One-by-One...":"Test Connection One-by-One"}),aZ&&(0,d.jsx)(j.Button,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aZ&&(a7.current=!0,a0(!0))},disabled:a_,children:a_?"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.Toggle,{checked:"round-robin"===aB,onChange:a=>{let b=a?"round-robin":null,c=a?aD||"1":aD;a&&!aD&&aE("1"),aC(b),bI(b,c)}}),"round-robin"===aB&&(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:aD,onChange:a=>{var b;aE(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"})]})]}),"freebuff"===o&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-black/[0.03] pt-2 dark:border-white/[0.03]",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Strict Model Assignment"}),(0,d.jsx)("p",{className:"text-[10px] text-text-muted",children:"Only assigned accounts can serve each Freebuff model."})]}),(0,d.jsx)(j.Toggle,{checked:aF,onChange:bJ})]})]})]}),0===q.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:bi?"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"}),br&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bs," or ",bt,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:br?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:bd,children:bs}),(0,d.jsx)(j.Button,{size:"sm",icon:"key",onClick:be,children:bt})]}):(0,d.jsxs)(d.Fragment,{children:[!bq&&"iflow"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>L(!0),children:"Cookie"}),"codex"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>W(!0),children:(0,x.Tl)("Bulk Add")}),"grok-cli"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),children:(0,x.Tl)("Bulk Add")}),(0,d.jsx)(j.Button,{size:"sm",icon:"add",onClick:bf,children:bq?"Add API Key":"iflow"===o?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[a5&&(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: ",a5.total]}),(0,d.jsxs)("span",{children:["Completed: ",a5.completed]}),(0,d.jsxs)("span",{children:["Passed: ",a5.passed]}),(0,d.jsxs)("span",{children:["Failed: ",a5.failed]}),a5.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),aZ&&a1&&(0,d.jsxs)("span",{children:["Running: ",q.find(a=>a.id===a1)?.name||a1]})]})}),q.length>0&&(0,d.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:b2,onChange:()=>{b2?au([]):au(q.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),b8,!bq&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>L(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>W(!0),title:(0,x.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,x.Tl)("Bulk Add")}),"grok-cli"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),title:(0,x.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,x.Tl)("Bulk Add")}),br?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:bd,className:"w-full sm:w-auto",children:bs}),(0,d.jsx)(j.Button,{size:"sm",icon:"key",onClick:be,className:"w-full sm:w-auto",children:bt})]}):(0,d.jsx)(j.Button,{size:"sm",icon:"add",onClick:bf,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsxs)(j.Card,{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.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),bx&&(0,d.jsx)("select",{value:aH,onChange:a=>{var b;aI(b=a.target.value),bL(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:bx.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))}),!bq&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"download",loading:a8,onClick:bR,children:(0,x.Tl)("Import models")})]}),!bq&&(g=[...bm,...aP.filter(a=>!bm.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!aR.includes(a)),(0,d.jsxs)("div",{className:"flex gap-2",children:[aR.length>0&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bD,children:"Active All"}),g.length>0&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bC(g),children:"Disable All"})]}))]}),!!an&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:an}),(()=>{let a,b,c;if(bq)return(0,d.jsx)(D,{providerStorageAlias:bv,providerDisplayAlias:by,modelAliases:af,customModels:ah,copied:ba,onCopy:bb,onSetAlias:bN,onDeleteAlias:bO,onAddCustomModel:a=>bP(a,"llm",bv),onDeleteCustomModel:a=>bQ(a,"llm",bv),connections:q,isAnthropic:bp});let e=[...bm,...aP.filter(a=>!bm.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}),f=new Set(aR),g=e.filter(a=>!f.has(a.id)),h=e.filter(a=>f.has(a.id)),i=A({customModels:ah,modelAliases:af,providerAlias:bv,builtInModels:bm,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i.map(a=>(0,d.jsx)(B,{model:{id:a.id,name:a.name},fullModel:`${by}/${a.id}`,alias:a.alias,copied:ba,onCopy:bb,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bQ(a.id,"llm",bv):bO(a.alias)},testStatus:al[a.id],onTest:q.length>0||bk?()=>cb(a.id):void 0,isTesting:ap.has(a.id),isCustom:!0,isFree:!1,caps:p(`${o}/${a.id}`),thinkingSuffix:bu(a.id)},`${a.source}-${a.fullModel}`)),g.map(a=>{let b=`${bv}/${a.id}`,c=`${o}/${a.id}`,e=Object.entries(af).find(([,a])=>a===b||a===c)?.[0];return(0,d.jsx)(B,{model:a,fullModel:`${by}/${a.id}`,alias:e,copied:ba,onCopy:bb,onSetAlias:b=>bN(a.id,b,bv),onDeleteAlias:()=>bO(e),testStatus:al[a.id],onTest:q.length>0||bk?()=>cb(a.id):void 0,isTesting:ap.has(a.id),isFree:a.isFree,onDisable:()=>bA(a.id),caps:p(`${o}/${a.id}`),thinkingSuffix:bu(a.id)},a.id)}),(0,d.jsxs)("button",{onClick:()=>as(!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"]}),aL.length>0&&(a=new Set([...Object.values(af),...i.map(a=>a.fullModel)]),b=new Set(bm.map(a=>a.id)),0===(c=aL.filter(c=>!a.has(`${bv}/${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 bP(a.id,"llm",bv)},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))})]})),h.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 (",h.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:h.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))})]})]})})()]}),ca,"kiro"===o?(0,d.jsx)(j.KiroOAuthWrapper,{isOpen:H,providerInfo:bg,onSuccess:bU,onClose:()=>I(!1)}):"cursor"===o?(0,d.jsx)(j.CursorAuthModal,{isOpen:H,onSuccess:bU,onClose:()=>I(!1)}):"gitlab"===o?(0,d.jsx)(j.GitLabAuthModal,{isOpen:H,providerInfo:bg,onSuccess:bU,onClose:()=>I(!1)}):(0,d.jsx)(j.OAuthModal,{isOpen:H,provider:o,providerInfo:bg,onSuccess:bU,onClose:()=>I(!1)}),"iflow"===o&&(0,d.jsx)(j.IFlowCookieModal,{isOpen:J,onSuccess:()=>{bG(),L(!1)},onClose:()=>L(!1)}),(0,d.jsx)(K,{isOpen:N,provider:o,providerName:bg.name,isCompatible:bq,isAnthropic:bp,authType:bg?.authType,authHint:bg?.authHint,website:bg?.website,proxyPools:E,error:R,existingNames:q.map(a=>a.name).filter(Boolean),onSave:bV,onBulkDone:bG,onClose:()=>{S(""),P(!1)}}),(0,d.jsx)(j.EditConnectionModal,{isOpen:Z,connection:ad,proxyPools:E,onSave:bW,onClose:()=>$(!1)}),bq&&(0,d.jsx)(M,{isOpen:_,node:y,onSave:bH,onClose:()=>aa(!1),isAnthropic:bp}),!bq&&(0,d.jsx)(O,{isOpen:ar,providerAlias:bv,providerDisplayAlias:by,onSave:async a=>{await bP(a,"llm",bv),as(!1)},onClose:()=>as(!1)}),"codex"===o&&(0,d.jsx)(Q,{isOpen:V,onClose:()=>W(!1),onSuccess:bG}),"grok-cli"===o&&(0,d.jsx)(T,{isOpen:X,onClose:()=>Y(!1),onSuccess:bG}),(0,d.jsx)(j.ConfirmModal,{isOpen:aX,onClose:()=>aY(!1),onConfirm:()=>{(aY(!1),bi)?bc():be()},title:"Risk Notice",message:bg?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(j.ConfirmModal,{isOpen:!!aT,onClose:()=>aU(null),onConfirm:aT?.onConfirm,title:aT?.title||"Confirm",message:aT?.message,variant:"danger"}),(0,d.jsx)(j.Modal,{isOpen:!!aV,onClose:()=>aW(null),title:aV?.title||"Notice",size:"sm",footer:(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(j.Button,{variant:aV?.variant==="success"?"success":aV?.variant==="error"?"danger":"primary",onClick:()=>aW(null),children:"OK"})}),children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[aV?.variant==="success"&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-green-500 mt-0.5 shrink-0",children:"check_circle"}),aV?.variant==="error"&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-red-500 mt-0.5 shrink-0",children:"error"}),aV?.variant==="info"&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-blue-500 mt-0.5 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"text-sm text-text-muted leading-relaxed break-words",children:aV?.message})]})})]}):(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"})]})}},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")},45961:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(66238);c(71183);var e=c(84725),f=c.n(e);function g({error:a,reset:b}){return(0,d.jsx)("section",{className:"flex min-h-[calc(100vh-9rem)] items-center justify-center",children:(0,d.jsxs)("div",{className:"w-full max-w-lg rounded-lg border border-border bg-surface p-6 shadow-soft",children:[(0,d.jsx)("div",{className:"mb-4 flex h-11 w-11 items-center justify-center rounded-lg bg-red-500/10 text-red-600 dark:text-red-400",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"warning"})}),(0,d.jsx)("h1",{className:"text-xl font-semibold text-text-main",children:"Dashboard error"}),(0,d.jsx)("p",{className:"mt-2 text-sm leading-6 text-text-muted",children:"This dashboard view failed to render. Retry the view or head back to the dashboard home."}),a?.message?(0,d.jsx)("pre",{className:"mt-4 max-h-36 overflow-auto rounded-md border border-border bg-surface-2 p-3 text-xs text-text-muted",children:a.message}):null,(0,d.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:[(0,d.jsxs)("button",{type:"button",onClick:b,className:"inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-primary-hover",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"refresh"}),"Try again"]}),(0,d.jsxs)(f(),{href:"/dashboard",className:"inline-flex items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-text-main transition-colors hover:bg-surface-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"home"}),"Dashboard"]})]})]})})}},46293:a=>{"use strict";a.exports=require("sql.js")},47298:(a,b,c)=>{Promise.resolve().then(c.bind(c,43736))},47447:a=>{"use strict";a.exports=require("dompurify")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},52782:(a,b,c)=>{Promise.resolve().then(c.bind(c,37539))},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")},58500:a=>{"use strict";a.exports=require("node:timers/promises")},61643:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(1904),e=c(88844);function f({children:a}){return(0,d.jsx)(e.DashboardLayout,{children:a})}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63240:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(35732).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/VansRouter/VansRouter/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/runner/work/VansRouter/VansRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},66694:(a,b,c)=>{Promise.resolve().then(c.bind(c,63240))},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")},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")},79551:a=>{"use strict";a.exports=require("url")},79646:a=>{"use strict";a.exports=require("child_process")},81630:a=>{"use strict";a.exports=require("http")},85873:(a,b,c)=>{Promise.resolve().then(c.bind(c,45961))},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},88844:(a,b,c)=>{let{createProxy:d}=c(78291);a.exports=d("/home/runner/work/VansRouter/VansRouter/src/shared/components/index.js")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")},95601:(a,b,c)=>{Promise.resolve().then(c.bind(c,35411))}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1348,2136,3176,5356,7592,1685,7425,7863,4121,575,6385,5302,9784,3736,6120,5009],()=>b(b.s=31637));module.exports=c})();
27
+ ]`;function R(a){let b,c=a.trim();if(!c)return[];try{b=JSON.parse(c)}catch(a){try{let a=c;a.startsWith("[")||((a=a.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(a=a.slice(0,-1)),a=`[${a}]`),b=JSON.parse(a)}catch{throw a}}if(Array.isArray(b))return b;if(b&&"object"==typeof b)return Array.isArray(b.accounts)?b.accounts:[b];throw Error("Input must be a JSON object or array of objects")}function S({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),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(null),s=(0,e.useRef)(null),t=()=>{h||(g(""),l(""),n(null),r(null),p(!1),b())},u=async a=>{if(!a||0===a.length)return;l("");let b=Array.from(a).filter(a=>a.name.endsWith(".json")||"application/json"===a.type||""===a.type);if(0===b.length)return void l((0,y.Tl)("Please select valid .json files"));try{let a=[];for(let c of b){let b=await c.text(),d=R(b);Array.isArray(d)?a.push(...d):d&&a.push(d)}if(0===a.length)return void l((0,y.Tl)("No accounts found in selected files"));g(JSON.stringify(a,null,2)),r({filesCount:b.length,accountsCount:a.length})}catch(a){l(`${(0,y.Tl)("Error reading files")}: ${a.message}`)}},v=async()=>{let a;l(""),n(null);try{a=R(f)}catch(a){l(`${(0,y.Tl)("Invalid JSON")}: ${a.message}`);return}if(!a||0===a.length)return void l((0,y.Tl)("No accounts found in input"));i(!0);try{let b=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:a})}),d=await b.json();if(!b.ok)return void l(d?.error||`Request failed: ${b.status}`);n(d),d.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,y.Tl)("Request failed"))}finally{i(!1)}},w=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(j.Modal,{isOpen:a,title:(0,y.Tl)("Bulk Add Grok CLI Accounts"),onClose:t,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,y.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,d.jsx)("input",{ref:s,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:a=>{u(a.target.files),a.target&&(a.target.value="")}}),(0,d.jsx)(j.Button,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>s.current?.click(),disabled:h,children:(0,y.Tl)("Upload JSON Files")})]}),(0,d.jsxs)("div",{onDragOver:a=>{a.preventDefault(),p(!0)},onDragLeave:a=>{a.preventDefault(),p(!1)},onDrop:a=>{a.preventDefault(),p(!1),a.dataTransfer?.files?.length>0&&u(a.dataTransfer.files)},className:`relative rounded border transition-colors ${o?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,d.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:Q,value:f,onChange:a=>{g(a.target.value),r(null)},disabled:h}),o&&(0,d.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,d.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,y.Tl)("Drop .json files here")})]})]}),q&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,d.jsxs)("span",{children:[(0,y.Tl)("Loaded")," ",q.accountsCount," ",(0,y.Tl)("account(s) from")," ",q.filesCount," ",(0,y.Tl)("file(s)")]})]}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),m&&m.failed>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",m.failed," ",(0,y.Tl)("failed")]}),w.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:w.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.Button,{onClick:v,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,y.Tl)("Importing..."):(0,y.Tl)("Import All")}),(0,d.jsx)(j.Button,{onClick:t,variant:"ghost",fullWidth:!0,disabled:h,children:(0,y.Tl)("Close")})]})]})})}let T={claude:"claudeAutoPing",codex:"codexAutoPing"};function U(){let a,b,c,g,m=(0,f.useParams)(),n=(0,f.useRouter)(),o=m.id,{getCaps:p}=(0,x.y)(),[q,r]=(0,e.useState)([]),[s,t]=(0,e.useState)(!0),[u,z]=(0,e.useState)(null),[D,F]=(0,e.useState)([]),[G,I]=(0,e.useState)(!1),[K,M]=(0,e.useState)(!1),[O,Q]=(0,e.useState)(!1),[R,U]=(0,e.useState)(""),[V,W]=(0,e.useState)(!1),[X,Y]=(0,e.useState)(!1),[Z,$]=(0,e.useState)(!1),[_,aa]=(0,e.useState)(!1),[ab,ac]=(0,e.useState)(!1),[ad,ae]=(0,e.useState)(null),[af,ag]=(0,e.useState)({}),[ah,ai]=(0,e.useState)([]),[aj,ak]=(0,e.useState)(!1),[al,am]=(0,e.useState)({}),[an,ao]=(0,e.useState)(""),[ap,aq]=(0,e.useState)(()=>new Set),[ar,as]=(0,e.useState)(!1),[at,au]=(0,e.useState)([]),[av,aw]=(0,e.useState)(1),[ax,ay]=(0,e.useState)("__none__"),[az,aA]=(0,e.useState)(!1),[aB,aC]=(0,e.useState)(null),[aD,aE]=(0,e.useState)(""),[aF,aG]=(0,e.useState)(!1),[aH,aI]=(0,e.useState)("auto"),[aJ,aK]=(0,e.useState)({enabled:!1,connections:{}}),[aL,aM]=(0,e.useState)([]),[aN,aO]=(0,e.useState)([]),[aP,aQ]=(0,e.useState)([]),[aR,aS]=(0,e.useState)([]),[aT,aU]=(0,e.useState)(null),[aV,aW]=(0,e.useState)(null),[aX,aY]=(0,e.useState)(!1),[aZ,a$]=(0,e.useState)(!1),[a_,a0]=(0,e.useState)(!1),[a1,a2]=(0,e.useState)(null),[a3,a4]=(0,e.useState)({}),[a5,a6]=(0,e.useState)(null),a7=(0,e.useRef)(!1),[a8,a9]=(0,e.useState)(!1),{copied:ba,copy:bb}=(0,w.C)(),bc=()=>{I(!0)},bd=()=>{bi?bc():(U(""),Q(!0))},be=()=>{U(""),Q(!0)},bf=()=>{bi?bd():be()},bg=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[o]||k.fg[o]||k.IS[o]||k.nJ[o]||k.br[o],bh=bg?.authModes||[],bi=!!k.zN[o]||!!k.IS[o]||bh.includes("oauth"),bj=!!k.fg[o]||bh.includes("apikey"),bk=!!k.IS[o]?.noAuth,bl=(0,l.KC)(o),bm="cursor"===o&&aN.length>0?aN:bl,bn=(0,k.wG)(o),bo=(0,k.mq)(o),bp=(0,k.gb)(o),bq=bo||bp,br=!bq&&bi&&bj,bs="xai"===o?"Grok Build OAuth":"grok-cli"===o?"Grok CLI Device Login":"kimi"===o?"Kimi Coding OAuth":"OAuth",bt="xai"===o?"xAI API Key":"kimi"===o?"Kimi API Key":"qoder"===o?"PAT":"API Key",bu=a=>{if(!aH||"auto"===aH)return null;let b=v(o,a);return b&&b.includes(aH)?aH:null},bv=bq?o:bn,bw=(a=new Map,b=b=>{b?.id&&!a.has(b.id)&&a.set(b.id,b)},bm.forEach(b),ah.forEach(a=>{a.providerAlias===bv&&"llm"===(a.kind||a.type||"llm")&&b(a)}),c=new Set(aR),[...a.values()].filter(a=>!c.has(a.id))),bx=(()=>{let a=new Set,b=new Set,c=c=>{if(!c||b.has(c))return;b.add(c);let d=v(o,c);d&&d.forEach(b=>{"none"!==b&&a.add(b)})};for(let a of bm)c(a.id);for(let a of aP)c(a.id);for(let a of ah)a.providerAlias===bv&&"llm"===(a.kind||a.type||"llm")&&c(a.id);return a.size?["auto",...a]:null})(),by=bq?u?.prefix||o:bn,bz=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bv)}`,{cache:"no-store"}),b=await a.json();a.ok&&aS(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bv]),bA=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bv,ids:[a]})})).ok&&await bz()}catch(a){console.log("Error disabling model:",a)}},bB=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bv)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bz()}catch(a){console.log("Error enabling model:",a)}},bC=async a=>{a.length&&aU({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aU(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bv,ids:a})})).ok&&await bz()}catch(a){console.log("Error disabling all models:",a)}}})},bD=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bv)}`,{method:"DELETE"})).ok&&await bz()}catch(a){console.log("Error enabling all models:",a)}},bE=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&ag(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bF=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ai(b.models||[])}catch(a){console.log("Error fetching custom models:",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(),g=await c.json(),h=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===o);r(a)}c.ok&&F(g.proxyPools||[]);let i=(h.providerStrategies||{})[o]||{};aC(i.fallbackStrategy||null),aE(null!=i.stickyRoundRobinLimit?String(i.stickyRoundRobinLimit):"1"),aG(!0===i.strictModelAssignment);let j=(h.providerThinking||{})[o]||{};aI(j.mode||"auto");let k=T[o],l=k&&h[k]||{};if(aK({enabled:!0===l.enabled,connections:l.connections||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===o)||null;if(!a&&bq)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===o)||null))break}z(a)}}catch(a){console.log("Error fetching connections:",a)}finally{t(!1)}},[o,bq]),bH=async a=>{try{let b=await fetch(`/api/provider-nodes/${o}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(z(c.node),await bG(),aa(!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={...d[o]||{}};a?e.fallbackStrategy=a:(delete e.fallbackStrategy,delete e.stickyRoundRobinLimit),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[o]:f[o]=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=>{aG(a);try{let b=await fetch("/api/settings",{cache:"no-store"}),c=(b.ok?await b.json():{}).providerStrategies||{};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:{...c,[o]:{...c[o]||{},strictModelAssignment:a}}})})}catch(a){console.log("Error saving Freebuff strict assignment:",a)}},bK=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{assignedModel:b||null}})})).ok&&r(c=>c.map(c=>c.id===a?{...c,providerSpecificData:{...c.providerSpecificData||{},assignedModel:b||null}}:c))}catch(a){console.log("Error saving Freebuff model assignment:",a)}},bL=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[o]={mode:a}:delete c[o],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},bM=async a=>{let b=T[o];if(b){aK(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},bN=async(a,b,c=bn)=>{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 bE();else{let b=await a.json();aW({title:(0,y.Tl)("Error"),message:b.error||"Failed to set alias",variant:"error"})}}catch(a){console.log("Error setting alias:",a)}},bO=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bE()}catch(a){console.log("Error deleting alias:",a)}},bP=async(a,b="llm",c=bv)=>{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 bF();else{let a=await d.json();aW({title:(0,y.Tl)("Error"),message:a.error||"Failed to add custom model",variant:"error"})}}catch(a){console.log("Error adding custom model:",a)}},bQ=async(a,b="llm",c=bv)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bF()}catch(a){console.log("Error deleting custom model:",a)}},bR=async()=>{if(a8)return;let a=q.find(a=>!1!==a.isActive);a9(!0);try{let b=[];if(a){let c=await fetch(`/api/providers/${a.id}/models`),d=await c.json();if(!c.ok)return void aW({title:(0,y.Tl)("Error"),message:d.error||(0,y.Tl)("Failed to fetch models"),variant:"error"});b=d.models||[]}else{let a=(k.zN[o]||k.fg[o]||k.IS[o]||k.nJ[o])?.modelsFetcher;if(!a)return void aW({title:(0,y.Tl)("Notice"),message:(0,y.Tl)("Please add an active connection first"),variant:"info"});b=await A(a)}let c=b.filter(a=>a?.id||a?.name||a?.model);if(0===c.length)return void aW({title:(0,y.Tl)("Notice"),message:(0,y.Tl)("No models returned"),variant:"info"});let d=RegExp(`^(?:${o}|${bv})/`),e=/embed|whisper|dall-e|dalle|imagen|moderation|rerank|tts/i,f=new Set([...bm.map(a=>a.id),...aP.map(a=>a.id),...ah.filter(a=>a.providerAlias===bv&&"llm"===(a.kind||a.type||"llm")).map(a=>a.id)]);for(let a of Object.values(af))"string"==typeof a&&(a.startsWith(`${bv}/`)?f.add(a.slice(bv.length+1)):a.startsWith(`${o}/`)&&f.add(a.slice(o.length+1)));let g=[];for(let a of c){let b=a.id||a.name||a.model,c=(0,l.CP)(a);if(c&&"llm"!==c||e.test(b))continue;let h=b.replace(d,"");!h||f.has(h)||(g.push({providerAlias:bv,id:h,type:"llm"}),f.add(h))}if(0===g.length)aW({title:(0,y.Tl)("Notice"),message:(0,y.Tl)("All models already exist, no new models added"),variant:"info"});else{let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:g})}),b=(await a.json()).count??g.length;await bF(),aW({title:(0,y.Tl)("Success"),message:(0,y.Tl)("Successfully added")+` ${b} `+(0,y.Tl)("models"),variant:"success"})}}catch(a){console.log("Error importing provider models:",a),aW({title:(0,y.Tl)("Error"),message:(0,y.Tl)("Error fetching models")+": "+a.message,variant:"error"})}finally{a9(!1)}},bS=async()=>{if(aZ||0===q.length)return;let a=Object.fromEntries(q.map(a=>[a.id,{state:"queued",error:null}]));a7.current=!1,a$(!0),a0(!1),a2(null),a4(a),a6({total:q.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<q.length;a+=1){if(a7.current){a6({total:q.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=q[a];a2(d.id),a4(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,a4(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,a4(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}a6({total:q.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<q.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{a2(null),a$(!1),a0(!1),a7.current=!1}},bT=async a=>{aU({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aU(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&r(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bU=()=>{bG(),I(!1)},bV=async a=>{U("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:o,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bG(),Q(!1);return}U(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),U("Failed to save connection")}},bW=async a=>{try{(await fetch(`/api/providers/${ad.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bG(),$(!1))}catch(a){console.log("Error updating connection:",a)}},bX=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&r(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},bY=async(a,b)=>{let c=[...q];[c[a],c[b]]=[c[b],c[a]],r(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()}},bZ=q.filter(a=>at.includes(a.id)),{currentPage:b$,totalPages:b_,items:b0,start:b1}=function(a=[],b=1){let c=Array.isArray(a)?a:[],d=c.length,e=Math.max(1,Math.ceil(d/10)),f=Math.floor(Number(b)),g=Math.min(Number.isFinite(f)&&f>0?f:1,e),h=(g-1)*10,i=c.slice(h,h+10);return{currentPage:g,totalPages:e,totalItems:d,start:h,items:i,pageSize:10}}(q,av),b2=q.length>0&&at.length===q.length,b3=(()=>{if(0===bZ.length)return"";let a=new Set(bZ.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return"All selected currently unbound";let c=D.find(a=>a.id===b);return`All selected currently bound to ${c?.name||b}`}return"Selected connections have mixed proxy bindings"})(),b4=()=>{az||ac(!1)},b5=async(a,b)=>{let c=await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok)throw Error((await c.json().catch(()=>({}))).error||`Proxy update failed (${c.status})`);return c.json()},b6=async a=>{aA(!0);try{let b=[];for(let{connectionId:c,proxyPoolId:d,proxyPoolIds:e,proxyRotationStrategy:f}of a)try{let a=e?{proxyPoolIds:e,proxyRotationStrategy:f}:{proxyPoolId:d};await b5(c,a)}catch(a){console.log("Error applying proxy for",c,a),b.push(c)}if(await bG(),b.length>0)return void aW({title:(0,y.Tl)("Error"),message:`Updated with ${b.length} failed request(s). Retry the selected connections.`,variant:"error"});ac(!1),au([]),ay("__none__")}finally{aA(!1)}},b7=a=>b6((at.length>0?bZ:q).map(b=>({connectionId:b.id,proxyPoolId:a}))),b8=(0,d.jsxs)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:[b0.map((a,b)=>{let c,e=b1+b;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:(c=a.id,at.includes(c)),onChange:()=>{var b;return b=a.id,void au(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(H,{connection:a,proxyPools:D,isOAuth:bi,isFirst:0===e,isLast:e===q.length-1,onMoveUp:()=>bY(e,e-1),onMoveDown:()=>bY(e,e+1),onToggleActive:b=>bX(a.id,b),autoPing:T[o]&&"oauth"===a.authType?{on:!0===aJ.connections[a.id],onToggle:b=>{var c;return c=a.id,void bM({...aJ,connections:{...aJ.connections,[c]:b}})},provider:o}:null,onUpdateProxy:async b=>{try{let c="object"==typeof b?b:{proxyPoolId:b||null};if((await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).ok){let b={...a.providerSpecificData};c.proxyPoolIds?(b.proxyPoolIds=c.proxyPoolIds,b.proxyRotationStrategy=c.proxyRotationStrategy,delete b.proxyPoolId):(c.proxyPoolId?b.proxyPoolId=c.proxyPoolId:delete b.proxyPoolId,delete b.proxyPoolIds,delete b.proxyRotationStrategy),r(c=>c.map(c=>c.id===a.id?{...c,providerSpecificData:b}:c))}}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{ae(a),$(!0)},onDelete:()=>bT(a.id),oneByOneStatus:a3[a.id]||null,modelAssignmentOptions:"freebuff"===o?bw:null,onModelAssignmentChange:"freebuff"===o?b=>bK(a.id,b):null,strictModelAssignment:aF})})]},a.id)}),q.length>10&&(0,d.jsx)(j.Pagination,{currentPage:b$,pageSize:10,totalItems:q.length,onPageChange:aw})]}),b9=D.filter(a=>!0===a.isActive),ca=(0,d.jsx)(j.Modal,{isOpen:ab,onClose:b4,title:at.length>0?`Apply Proxy (${at.length} selected)`:`Apply Proxy (All ${q.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[b3&&(0,d.jsx)("p",{className:"text-xs text-text-muted bg-surface-2 px-3 py-2 rounded-lg border border-border/50",children:b3}),(0,d.jsxs)("div",{className:"flex flex-col divide-y divide-border/30 border border-border/50 rounded-xl overflow-hidden bg-surface",children:[(0,d.jsxs)("div",{className:"p-3 flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"px-3 pb-1 text-[10px] font-semibold uppercase tracking-wider text-text-muted",children:"Dynamic Strategies"}),(0,d.jsxs)("button",{type:"button",onClick:()=>{let a=D.filter(a=>!0===a.isActive);return 0===a.length?void aW({title:(0,y.Tl)("Notice"),message:"No active proxy pools available.",variant:"info"}):b6((at.length>0?bZ:q).map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},disabled:az||0===b9.length,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"sync_alt"}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("span",{className:"text-sm font-medium text-text-main",children:"One-to-one (rotate)"}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"Distribute active proxy pools round-robin"})]})]}),["fill-first","round-robin","random","smart"].map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>{let b;return(b=b9.map(a=>a.id).filter(a=>D.find(b=>b.id===a)?.isActive===!0)).length?b6((at.length>0?bZ:q).map(c=>({connectionId:c.id,proxyPoolIds:b,proxyRotationStrategy:a}))):void aW({title:(0,y.Tl)("Notice"),message:"No active proxy pools selected.",variant:"info"})},disabled:az||0===b9.length,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"autorenew"}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("span",{className:"text-sm font-medium text-text-main capitalize",children:[a," strategy"]}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"smart"===a?"Bypass pools marked unfit for provider/model":`Rotate over all active pools using ${a}`})]})]},a))]}),(0,d.jsxs)("div",{className:"p-3 flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"px-3 pb-1 text-[10px] font-semibold uppercase tracking-wider text-text-muted",children:"Static Assignment"}),(0,d.jsxs)("button",{type:"button",onClick:()=>b7(null),disabled:az,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"link_off"}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("span",{className:"text-sm font-medium text-text-main",children:"None (unbind all)"}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"Direct routing without proxy"})]})]}),D.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>b7(a.id),disabled:az||!0!==a.isActive,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"lan"}),(0,d.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,d.jsx)("span",{className:"truncate text-sm font-medium text-text-main",children:a.name}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted truncate mt-0.5",children:a.proxyUrl})]}),!0!==a.isActive&&(0,d.jsx)(j.Badge,{variant:"secondary",size:"sm",className:"ml-auto shrink-0",children:"inactive"})]},a.id))]})]}),az&&(0,d.jsx)("p",{className:"text-xs text-text-muted animate-pulse px-1",children:"Applying proxy configuration..."}),(0,d.jsx)(j.Button,{onClick:b4,variant:"ghost",fullWidth:!0,disabled:az,children:"Cancel"})]})}),cb=async a=>{if(!ap.has(a)){aq(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:`${bv}/${a}`})}),c=await b.json();am(b=>({...b,[a]:c.ok?"ok":"error"})),ao(c.ok?"":c.error||"Model not reachable")}catch{am(b=>({...b,[a]:"error"})),ao("Network error")}finally{aq(b=>{let c=new Set(b);return c.delete(a),c})}}};return s?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(j.CardSkeleton,{}),(0,d.jsx)(j.CardSkeleton,{})]}):bg?(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)(i.A,{providerId:bg.id,size:48,alt:bg.name,className:"shrink-0 rounded-lg",fallbackText:bg.textIcon||bg.id.slice(0,2).toUpperCase(),fallbackColor:bg.color}),(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:bg.name}),(bg.notice?.apiKeyUrl||bg.notice?.signupUrl||bg.website)&&(0,d.jsxs)("a",{href:bg.notice?.apiKeyUrl||bg.notice?.signupUrl||bg.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"}),bg.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[q.length," connection",1===q.length?"":"s"]})]})]})]}),bg.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:bg.deprecationNotice})]}),bg.notice?.text&&!bg.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:bg.notice.text}),bg.notice.apiKeyUrl&&(0,d.jsx)("a",{href:bg.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 →"})]}),bq&&u&&(0,d.jsx)(j.Card,{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:bp?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bp?"Messages API":"responses"===u.apiType?"Responses API":"Chat Completions"," \xb7 ",(u.baseUrl||"").replace(/\/$/,""),"/",bp?"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.Button,{size:"sm",icon:"add",onClick:()=>{U(""),Q(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>aa(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aU({title:"Delete Compatible Node",message:`Delete this ${bp?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aU(null);try{(await fetch(`/api/provider-nodes/${o}`,{method:"DELETE"})).ok&&n.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bk?(0,d.jsx)(j.NoAuthProxyCard,{providerId:o}):(0,d.jsxs)(j.Card,{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.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[q.length>0&&D.length>0&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ac(!0),children:"Apply Proxy"}),q.length>0&&(0,d.jsxs)(d.Fragment,{children:[at.length>0&&(0,d.jsxs)(j.Button,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=at.length;0!==a&&aU({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aU(null);let a=0,b=[...at];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}r(a=>a.filter(a=>!b.includes(a.id))),au([]),a>0&&aW({title:(0,y.Tl)("Error"),message:`Deleted ${b.length-a} connection(s), ${a} failed.`,variant:"error"})}})},children:["Delete Selected (",at.length,")"]}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"sync",onClick:bS,disabled:aZ,children:aZ?"Testing Connection One-by-One...":"Test Connection One-by-One"}),aZ&&(0,d.jsx)(j.Button,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aZ&&(a7.current=!0,a0(!0))},disabled:a_,children:a_?"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.Toggle,{checked:"round-robin"===aB,onChange:a=>{let b=a?"round-robin":null,c=a?aD||"1":aD;a&&!aD&&aE("1"),aC(b),bI(b,c)}}),"round-robin"===aB&&(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:aD,onChange:a=>{var b;aE(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"})]})]}),"freebuff"===o&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-black/[0.03] pt-2 dark:border-white/[0.03]",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Strict Model Assignment"}),(0,d.jsx)("p",{className:"text-[10px] text-text-muted",children:"Only assigned accounts can serve each Freebuff model."})]}),(0,d.jsx)(j.Toggle,{checked:aF,onChange:bJ})]})]})]}),0===q.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:bi?"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"}),br&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bs," or ",bt,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:br?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:bd,children:bs}),(0,d.jsx)(j.Button,{size:"sm",icon:"key",onClick:be,children:bt})]}):(0,d.jsxs)(d.Fragment,{children:[!bq&&"iflow"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>M(!0),children:"Cookie"}),"codex"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>W(!0),children:(0,y.Tl)("Bulk Add")}),"grok-cli"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),children:(0,y.Tl)("Bulk Add")}),(0,d.jsx)(j.Button,{size:"sm",icon:"add",onClick:bf,children:bq?"Add API Key":"iflow"===o?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[a5&&(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: ",a5.total]}),(0,d.jsxs)("span",{children:["Completed: ",a5.completed]}),(0,d.jsxs)("span",{children:["Passed: ",a5.passed]}),(0,d.jsxs)("span",{children:["Failed: ",a5.failed]}),a5.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),aZ&&a1&&(0,d.jsxs)("span",{children:["Running: ",q.find(a=>a.id===a1)?.name||a1]})]})}),q.length>0&&(0,d.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:b2,onChange:()=>{b2?au([]):au(q.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),b8,!bq&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>M(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>W(!0),title:(0,y.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,y.Tl)("Bulk Add")}),"grok-cli"===o&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),title:(0,y.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,y.Tl)("Bulk Add")}),br?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:bd,className:"w-full sm:w-auto",children:bs}),(0,d.jsx)(j.Button,{size:"sm",icon:"key",onClick:be,className:"w-full sm:w-auto",children:bt})]}):(0,d.jsx)(j.Button,{size:"sm",icon:"add",onClick:bf,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsxs)(j.Card,{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.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),bx&&(0,d.jsx)("select",{value:aH,onChange:a=>{var b;aI(b=a.target.value),bL(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:bx.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))}),!bq&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"download",loading:a8,onClick:bR,children:(0,y.Tl)("Import models")})]}),!bq&&(g=[...bm,...aP.filter(a=>!bm.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!aR.includes(a)),(0,d.jsxs)("div",{className:"flex gap-2",children:[aR.length>0&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bD,children:"Active All"}),g.length>0&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bC(g),children:"Disable All"})]}))]}),!!an&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:an}),(()=>{let a,b,c;if(bq)return(0,d.jsx)(E,{providerStorageAlias:bv,providerDisplayAlias:by,modelAliases:af,customModels:ah,copied:ba,onCopy:bb,onSetAlias:bN,onDeleteAlias:bO,onAddCustomModel:a=>bP(a,"llm",bv),onDeleteCustomModel:a=>bQ(a,"llm",bv),connections:q,isAnthropic:bp});let e=[...bm,...aP.filter(a=>!bm.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}),f=new Set(aR),g=e.filter(a=>!f.has(a.id)),h=e.filter(a=>f.has(a.id)),i=B({customModels:ah,modelAliases:af,providerAlias:bv,builtInModels:bm,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i.map(a=>(0,d.jsx)(C,{model:{id:a.id,name:a.name},fullModel:`${by}/${a.id}`,alias:a.alias,copied:ba,onCopy:bb,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bQ(a.id,"llm",bv):bO(a.alias)},testStatus:al[a.id],onTest:q.length>0||bk?()=>cb(a.id):void 0,isTesting:ap.has(a.id),isCustom:!0,isFree:!1,caps:p(`${o}/${a.id}`),thinkingSuffix:bu(a.id)},`${a.source}-${a.fullModel}`)),g.map(a=>{let b=`${bv}/${a.id}`,c=`${o}/${a.id}`,e=Object.entries(af).find(([,a])=>a===b||a===c)?.[0];return(0,d.jsx)(C,{model:a,fullModel:`${by}/${a.id}`,alias:e,copied:ba,onCopy:bb,onSetAlias:b=>bN(a.id,b,bv),onDeleteAlias:()=>bO(e),testStatus:al[a.id],onTest:q.length>0||bk?()=>cb(a.id):void 0,isTesting:ap.has(a.id),isFree:a.isFree,onDisable:()=>bA(a.id),caps:p(`${o}/${a.id}`),thinkingSuffix:bu(a.id)},a.id)}),(0,d.jsxs)("button",{onClick:()=>as(!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"]}),aL.length>0&&(a=new Set([...Object.values(af),...i.map(a=>a.fullModel)]),b=new Set(bm.map(a=>a.id)),0===(c=aL.filter(c=>!a.has(`${bv}/${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 bP(a.id,"llm",bv)},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))})]})),h.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 (",h.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:h.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))})]})]})})()]}),ca,"kiro"===o?(0,d.jsx)(j.KiroOAuthWrapper,{isOpen:G,providerInfo:bg,onSuccess:bU,onClose:()=>I(!1)}):"cursor"===o?(0,d.jsx)(j.CursorAuthModal,{isOpen:G,onSuccess:bU,onClose:()=>I(!1)}):"gitlab"===o?(0,d.jsx)(j.GitLabAuthModal,{isOpen:G,providerInfo:bg,onSuccess:bU,onClose:()=>I(!1)}):(0,d.jsx)(j.OAuthModal,{isOpen:G,provider:o,providerInfo:bg,onSuccess:bU,onClose:()=>I(!1)}),"iflow"===o&&(0,d.jsx)(j.IFlowCookieModal,{isOpen:K,onSuccess:()=>{bG(),M(!1)},onClose:()=>M(!1)}),(0,d.jsx)(J,{isOpen:O,provider:o,providerName:bg.name,isCompatible:bq,isAnthropic:bp,authType:bg?.authType,authHint:bg?.authHint,website:bg?.website,proxyPools:D,error:R,existingNames:q.map(a=>a.name).filter(Boolean),onSave:bV,onBulkDone:bG,onClose:()=>{U(""),Q(!1)}}),(0,d.jsx)(j.EditConnectionModal,{isOpen:Z,connection:ad,proxyPools:D,onSave:bW,onClose:()=>$(!1)}),bq&&(0,d.jsx)(L,{isOpen:_,node:u,onSave:bH,onClose:()=>aa(!1),isAnthropic:bp}),!bq&&(0,d.jsx)(N,{isOpen:ar,providerAlias:bv,providerDisplayAlias:by,onSave:async a=>{await bP(a,"llm",bv),as(!1)},onClose:()=>as(!1)}),"codex"===o&&(0,d.jsx)(P,{isOpen:V,onClose:()=>W(!1),onSuccess:bG}),"grok-cli"===o&&(0,d.jsx)(S,{isOpen:X,onClose:()=>Y(!1),onSuccess:bG}),(0,d.jsx)(j.ConfirmModal,{isOpen:aX,onClose:()=>aY(!1),onConfirm:()=>{(aY(!1),bi)?bc():be()},title:"Risk Notice",message:bg?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(j.ConfirmModal,{isOpen:!!aT,onClose:()=>aU(null),onConfirm:aT?.onConfirm,title:aT?.title||"Confirm",message:aT?.message,variant:"danger"}),(0,d.jsx)(j.Modal,{isOpen:!!aV,onClose:()=>aW(null),title:aV?.title||"Notice",size:"sm",footer:(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(j.Button,{variant:aV?.variant==="success"?"success":aV?.variant==="error"?"danger":"primary",onClick:()=>aW(null),children:"OK"})}),children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[aV?.variant==="success"&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-green-500 mt-0.5 shrink-0",children:"check_circle"}),aV?.variant==="error"&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-red-500 mt-0.5 shrink-0",children:"error"}),aV?.variant==="info"&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-blue-500 mt-0.5 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"text-sm text-text-muted leading-relaxed break-words",children:aV?.message})]})})]}):(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"})]})}},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")},9517:(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})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13018:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,88844,23))},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")},26915:a=>{"use strict";a.exports=import("playwright-core")},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")},35411:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(35732).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/error.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/runner/work/VansRouter/VansRouter/src/app/(dashboard)/error.js","default")},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")},45961:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(66238);c(71183);var e=c(84725),f=c.n(e);function g({error:a,reset:b}){return(0,d.jsx)("section",{className:"flex min-h-[calc(100vh-9rem)] items-center justify-center",children:(0,d.jsxs)("div",{className:"w-full max-w-lg rounded-lg border border-border bg-surface p-6 shadow-soft",children:[(0,d.jsx)("div",{className:"mb-4 flex h-11 w-11 items-center justify-center rounded-lg bg-red-500/10 text-red-600 dark:text-red-400",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"warning"})}),(0,d.jsx)("h1",{className:"text-xl font-semibold text-text-main",children:"Dashboard error"}),(0,d.jsx)("p",{className:"mt-2 text-sm leading-6 text-text-muted",children:"This dashboard view failed to render. Retry the view or head back to the dashboard home."}),a?.message?(0,d.jsx)("pre",{className:"mt-4 max-h-36 overflow-auto rounded-md border border-border bg-surface-2 p-3 text-xs text-text-muted",children:a.message}):null,(0,d.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:[(0,d.jsxs)("button",{type:"button",onClick:b,className:"inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-primary-hover",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"refresh"}),"Try again"]}),(0,d.jsxs)(f(),{href:"/dashboard",className:"inline-flex items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-text-main transition-colors hover:bg-surface-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"home"}),"Dashboard"]})]})]})})}},46293:a=>{"use strict";a.exports=require("sql.js")},47298:(a,b,c)=>{Promise.resolve().then(c.bind(c,76737))},47447:a=>{"use strict";a.exports=require("dompurify")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},52782:(a,b,c)=>{Promise.resolve().then(c.bind(c,2349))},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55009:(a,b,c)=>{"use strict";c.d(b,{y:()=>f});var d=c(71183),e=c(48444);function f(){let[a,b]=(0,d.useState)(()=>({})),[c,f]=(0,d.useState)(()=>({}));return{getCaps:(0,d.useCallback)(b=>(function(a,b,c){if(!c)return null;if(a[c])return a[c];let d=c.includes("/")?c.slice(c.indexOf("/")+1):c;if(b[d])return b[d];let f=c.includes("/")?c.slice(0,c.indexOf("/")):null,g=(0,e.nl)(f,d);return{vision:g.vision,search:g.search,reasoning:g.reasoning,contextWindow:g.contextWindow,maxOutput:g.maxOutput}})(a,c,b),[a,c])}}},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")},58500:a=>{"use strict";a.exports=require("node:timers/promises")},61643:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(1904),e=c(88844);function f({children:a}){return(0,d.jsx)(e.DashboardLayout,{children:a})}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63240:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(35732).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/VansRouter/VansRouter/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/runner/work/VansRouter/VansRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},66655:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(8824),e=c(59399),f=c(68673),g=c(34958),h=c(83760),i=c(9410),j=c(75881),k=c(29578),l=c(28112),m=c(71642),n=c(26352),o=c(68004),p=c(970),q=c(72647),r=c(261),s=c(45123),t=c(88768),u=c(26713),v=c(33610),w=c(82623),x=c(92819),y=c(7572),z=c(50932),A=c(14920),B=c(97908),C=c(86439),D=c(77068),E=c(86728),F=c(16492),G=c(92304),H=c(77257),I=c(70722),J=c(62576),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,63240)),"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"]},["new"]]},{"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,61643)),"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/layout.js"],error:[()=>Promise.resolve().then(c.bind(c,35411)),"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/error.js"],"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,52170,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,36939,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,52158,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,8453))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,26478)),"/home/runner/work/VansRouter/VansRouter/src/app/layout.js"],error:[()=>Promise.resolve().then(c.bind(c,71503)),"/home/runner/work/VansRouter/VansRouter/src/app/error.js"],"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,52170,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,36939,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,52158,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,8453))).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(2337).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}`:""}
28
+ 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}}},66694:(a,b,c)=>{Promise.resolve().then(c.bind(c,63240))},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")},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")},79551:a=>{"use strict";a.exports=require("url")},79646:a=>{"use strict";a.exports=require("child_process")},81630:a=>{"use strict";a.exports=require("http")},85873:(a,b,c)=>{Promise.resolve().then(c.bind(c,45961))},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},88844:(a,b,c)=>{let{createProxy:d}=c(78291);a.exports=d("/home/runner/work/VansRouter/VansRouter/src/shared/components/index.js")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")},95601:(a,b,c)=>{Promise.resolve().then(c.bind(c,35411))},97530:a=>{"use strict";a.exports=require("node:sqlite")},98125:a=>{"use strict";a.exports=require("bun:sqlite")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1348,2136,3176,5356,1950,1685,124,7863,7010,9974,5577,4121,575,6385,3621,6737],()=>b(b.s=66655));module.exports=c})();