@jheavenknows/bluerouter 5.0.43 → 5.0.44

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 (1291) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +16 -16
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/required-server-files.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  98. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  100. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  101. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  102. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  103. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  105. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  108. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/branding/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/branding/upload/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  130. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  132. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  141. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  159. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  163. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  165. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js +2 -2
  169. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  326. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  329. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/version/restart/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  389. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  391. package/app/.next-cli-build/server/app/callback.html +1 -1
  392. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  393. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  394. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  395. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  396. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  397. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  398. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/analytics.html +1 -1
  400. package/app/.next-cli-build/server/app/dashboard/analytics.rsc +7 -7
  401. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  405. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_full.segment.rsc +7 -7
  406. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_index.segment.rsc +6 -6
  408. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_tree.segment.rsc +2 -2
  409. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  410. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +8 -8
  411. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +2 -2
  412. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +8 -8
  416. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_head.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_index.segment.rsc +6 -6
  418. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +2 -2
  419. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
  421. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  425. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
  426. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  427. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +6 -6
  428. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  429. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +9 -9
  431. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  432. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  435. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +9 -9
  436. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  437. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +6 -6
  438. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  439. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  440. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  441. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  442. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  445. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  446. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  447. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +6 -6
  448. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  449. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +9 -9
  451. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  452. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  453. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  455. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +9 -9
  456. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +6 -6
  458. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  459. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
  461. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  462. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  464. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  466. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
  467. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  468. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +6 -6
  469. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  470. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  472. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  473. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  476. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  477. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  478. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +6 -6
  479. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  480. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  482. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  486. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  487. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +6 -6
  489. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  490. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +7 -7
  492. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  496. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +7 -7
  497. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +6 -6
  499. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +2 -2
  500. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +7 -7
  502. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +7 -7
  507. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +6 -6
  509. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +2 -2
  510. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
  512. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  517. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
  518. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  519. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +6 -6
  520. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  521. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  522. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  523. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  524. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  527. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  528. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  529. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +6 -6
  530. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  531. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  532. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
  533. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  537. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
  538. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  539. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +6 -6
  540. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  541. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  542. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  543. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  544. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  546. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  547. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  548. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +6 -6
  550. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  551. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  552. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  553. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  556. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  557. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  559. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  560. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  562. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  563. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  566. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  568. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  570. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  571. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  572. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +6 -6
  573. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  574. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
  576. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  577. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  578. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  579. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  580. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
  581. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  582. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +6 -6
  583. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  584. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  585. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
  586. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  587. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  588. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  589. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  590. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
  591. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  592. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +6 -6
  593. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  594. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  595. package/app/.next-cli-build/server/app/dashboard.rsc +9 -9
  596. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  597. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  598. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  599. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +9 -9
  600. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  601. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +6 -6
  602. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  603. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  604. package/app/.next-cli-build/server/app/index.html +1 -1
  605. package/app/.next-cli-build/server/app/index.rsc +6 -6
  606. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  608. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  609. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  610. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  611. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  612. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  613. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  614. package/app/.next-cli-build/server/app/landing.html +1 -1
  615. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  616. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  617. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  618. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  619. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  620. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  622. package/app/.next-cli-build/server/app/login/page.js +1 -1
  623. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  624. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  625. package/app/.next-cli-build/server/app/login.html +1 -1
  626. package/app/.next-cli-build/server/app/login.rsc +7 -7
  627. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  628. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  630. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  631. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  632. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  633. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  634. package/app/.next-cli-build/server/app/page.js +1 -1
  635. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  636. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  637. package/app/.next-cli-build/server/app-paths-manifest.json +16 -16
  638. package/app/.next-cli-build/server/chunks/2338.js +3 -3
  639. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  640. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  641. package/app/.next-cli-build/server/chunks/4803.js +1 -1
  642. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  643. package/app/.next-cli-build/server/chunks/700.js +1 -1
  644. package/app/.next-cli-build/server/chunks/7774.js +2 -2
  645. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  646. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  647. package/app/.next-cli-build/server/chunks/8581.js +64 -0
  648. package/app/.next-cli-build/server/chunks/8895.js +1 -1
  649. package/app/.next-cli-build/server/chunks/9434.js +1 -1
  650. package/app/.next-cli-build/server/chunks/9489.js +1 -1
  651. package/app/.next-cli-build/server/instrumentation.js +1 -1
  652. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  653. package/app/.next-cli-build/server/middleware.js +1 -1
  654. package/app/.next-cli-build/server/pages/404.html +1 -1
  655. package/app/.next-cli-build/server/pages/500.html +1 -1
  656. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  657. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  658. package/app/.next-cli-build/static/chunks/2714-83a368a92f8c292c.js +64 -0
  659. package/app/.next-cli-build/static/chunks/{5263-4720bafe27490a13.js → 5263-d9e7ae65e20ce822.js} +1 -1
  660. package/app/.next-cli-build/static/chunks/{5497-d234d298f6c3f962.js → 5497-f06e1a09bd0def9c.js} +1 -1
  661. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/api-keys/{page-d17cba5c03249383.js → page-ab5d688db6e32f62.js} +1 -1
  662. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-0fe6555804a9264b.js → page-2558d7355357c608.js} +1 -1
  663. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-0986f42dc41bebfa.js → page-c0231e9486c2237d.js} +1 -1
  664. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-8cb2fafd44d2c944.js → page-b2e2b7765d39da7a.js} +1 -1
  665. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a30dfa93b2d6ac90.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-81216d587547efe4.js → page-03f35e824699a220.js} +1 -1
  667. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/{page-f10f073dea6135f8.js → page-d03884f048a5a7c8.js} +1 -1
  668. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-8b4b169b67b0d2db.js → page-87cbb809c2eeb74e.js} +1 -1
  669. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-cf61958f42923b69.js → page-3bc7d22940bf015c.js} +1 -1
  670. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-b536542f0a708a46.js → page-224e01693a3cfaf1.js} +1 -1
  671. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-6fc459277027e444.js → page-905212b2d7ed648e.js} +1 -1
  672. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-0dd15fd784e80046.js → page-6de007eb2a59ca30.js} +1 -1
  673. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{page-f10f073dea6135f8.js → page-d03884f048a5a7c8.js} +1 -1
  674. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovider/{page-9afec1ce4c7607a8.js → page-399160c87b52eb2f.js} +1 -1
  675. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-a31cb59b5b878dc4.js → page-3bb054c7e6200935.js} +1 -1
  676. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-feab08fd8ea3abf9.js → page-0da77a157acefc7c.js} +1 -1
  677. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-d57a153d2e06360f.js → page-7b69e5101ad4864f.js} +1 -1
  678. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-3c1de0fa6ff18f08.js → page-80e7e47c3dfa4070.js} +1 -1
  679. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-3a31e39003735195.js → page-fa9e9680d235e2d8.js} +1 -1
  680. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-533d2b73e2f2f7b0.js → page-33c6b65a7848eb94.js} +1 -1
  681. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-c3eeeaf049d89657.js → page-1002addd547b6453.js} +1 -1
  682. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-7579b49088999a9c.js → page-c734cfa89fa60ee8.js} +1 -1
  683. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-ca699ce314f4007e.js → layout-5247f67b1fd67c5b.js} +1 -1
  684. package/app/.next-cli-build/static/css/00e41e719abc5c44.css +1 -0
  685. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.38-to-5.0.39-5.0.39-20260629-215012 → upgrade-4.0.89-to-4.0.91-4.0.91-20260624-153434}/data.sqlite +0 -0
  686. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.39-to-5.0.40-5.0.40-20260629-225941 → upgrade-4.0.91-to-4.0.92-4.0.92-20260624-155913}/data.sqlite +0 -0
  687. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.40-to-5.0.41-5.0.41-20260629-232737 → upgrade-4.0.92-to-4.0.93-4.0.93-20260624-163722}/data.sqlite +0 -0
  688. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.41-to-5.0.42-5.0.42-20260629-233337 → upgrade-4.0.93-to-4.0.94-4.0.94-20260624-170410}/data.sqlite +0 -0
  689. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite +0 -0
  690. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  691. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  692. package/app/cli/.build-home/AppData/Roaming/bluerouter/jwt-secret +1 -1
  693. package/app/cli/.build-home/AppData/Roaming/bluerouter/machine-id +1 -1
  694. package/app/cli/.build-home/AppData/Roaming/nextjs-nodejs/Config/config.json +3 -3
  695. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  696. package/app/node_modules/baseline-browser-mapping/package.json +2 -2
  697. package/app/node_modules/caniuse-lite/data/agents.js +1 -1
  698. package/app/node_modules/caniuse-lite/data/browserVersions.js +1 -1
  699. package/app/node_modules/caniuse-lite/data/features/aac.js +1 -1
  700. package/app/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
  701. package/app/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
  702. package/app/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
  703. package/app/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
  704. package/app/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
  705. package/app/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
  706. package/app/node_modules/caniuse-lite/data/features/apng.js +1 -1
  707. package/app/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
  708. package/app/node_modules/caniuse-lite/data/features/array-find.js +1 -1
  709. package/app/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
  710. package/app/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
  711. package/app/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
  712. package/app/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
  713. package/app/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
  714. package/app/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
  715. package/app/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
  716. package/app/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
  717. package/app/node_modules/caniuse-lite/data/features/audio.js +1 -1
  718. package/app/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
  719. package/app/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
  720. package/app/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
  721. package/app/node_modules/caniuse-lite/data/features/av1.js +1 -1
  722. package/app/node_modules/caniuse-lite/data/features/avif.js +1 -1
  723. package/app/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
  724. package/app/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
  725. package/app/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
  726. package/app/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
  727. package/app/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
  728. package/app/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
  729. package/app/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
  730. package/app/node_modules/caniuse-lite/data/features/beacon.js +1 -1
  731. package/app/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
  732. package/app/node_modules/caniuse-lite/data/features/bigint.js +1 -1
  733. package/app/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
  734. package/app/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
  735. package/app/node_modules/caniuse-lite/data/features/border-image.js +1 -1
  736. package/app/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
  737. package/app/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
  738. package/app/node_modules/caniuse-lite/data/features/brotli.js +1 -1
  739. package/app/node_modules/caniuse-lite/data/features/calc.js +1 -1
  740. package/app/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
  741. package/app/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
  742. package/app/node_modules/caniuse-lite/data/features/canvas.js +1 -1
  743. package/app/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
  744. package/app/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
  745. package/app/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
  746. package/app/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
  747. package/app/node_modules/caniuse-lite/data/features/classlist.js +1 -1
  748. package/app/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
  749. package/app/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
  750. package/app/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
  751. package/app/node_modules/caniuse-lite/data/features/colr.js +1 -1
  752. package/app/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
  753. package/app/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
  754. package/app/node_modules/caniuse-lite/data/features/console-time.js +1 -1
  755. package/app/node_modules/caniuse-lite/data/features/const.js +1 -1
  756. package/app/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
  757. package/app/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
  758. package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
  759. package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
  760. package/app/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
  761. package/app/node_modules/caniuse-lite/data/features/cors.js +1 -1
  762. package/app/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
  763. package/app/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
  764. package/app/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
  765. package/app/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
  766. package/app/node_modules/caniuse-lite/data/features/css-all.js +1 -1
  767. package/app/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
  768. package/app/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
  769. package/app/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
  770. package/app/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
  771. package/app/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
  772. package/app/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
  773. package/app/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
  774. package/app/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
  775. package/app/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
  776. package/app/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
  777. package/app/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
  778. package/app/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
  779. package/app/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
  780. package/app/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
  781. package/app/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
  782. package/app/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
  783. package/app/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
  784. package/app/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
  785. package/app/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
  786. package/app/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
  787. package/app/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
  788. package/app/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
  789. package/app/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
  790. package/app/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
  791. package/app/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
  792. package/app/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
  793. package/app/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
  794. package/app/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
  795. package/app/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
  796. package/app/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
  797. package/app/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
  798. package/app/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
  799. package/app/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
  800. package/app/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
  801. package/app/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
  802. package/app/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
  803. package/app/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
  804. package/app/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
  805. package/app/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
  806. package/app/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
  807. package/app/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
  808. package/app/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
  809. package/app/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
  810. package/app/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
  811. package/app/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
  812. package/app/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
  813. package/app/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
  814. package/app/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
  815. package/app/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
  816. package/app/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
  817. package/app/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
  818. package/app/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
  819. package/app/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
  820. package/app/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
  821. package/app/node_modules/caniuse-lite/data/features/css-has.js +1 -1
  822. package/app/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
  823. package/app/node_modules/caniuse-lite/data/features/css-if.js +1 -1
  824. package/app/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
  825. package/app/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
  826. package/app/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
  827. package/app/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
  828. package/app/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
  829. package/app/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
  830. package/app/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
  831. package/app/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
  832. package/app/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
  833. package/app/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
  834. package/app/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
  835. package/app/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
  836. package/app/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
  837. package/app/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
  838. package/app/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
  839. package/app/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
  840. package/app/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
  841. package/app/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
  842. package/app/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
  843. package/app/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
  844. package/app/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
  845. package/app/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
  846. package/app/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
  847. package/app/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
  848. package/app/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
  849. package/app/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
  850. package/app/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
  851. package/app/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
  852. package/app/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
  853. package/app/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
  854. package/app/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
  855. package/app/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
  856. package/app/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
  857. package/app/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
  858. package/app/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
  859. package/app/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
  860. package/app/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
  861. package/app/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
  862. package/app/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
  863. package/app/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
  864. package/app/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
  865. package/app/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
  866. package/app/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
  867. package/app/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
  868. package/app/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
  869. package/app/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
  870. package/app/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
  871. package/app/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
  872. package/app/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
  873. package/app/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
  874. package/app/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
  875. package/app/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
  876. package/app/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
  877. package/app/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
  878. package/app/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
  879. package/app/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
  880. package/app/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
  881. package/app/node_modules/caniuse-lite/data/features/css-table.js +1 -1
  882. package/app/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
  883. package/app/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
  884. package/app/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
  885. package/app/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
  886. package/app/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
  887. package/app/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
  888. package/app/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
  889. package/app/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
  890. package/app/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
  891. package/app/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
  892. package/app/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
  893. package/app/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
  894. package/app/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
  895. package/app/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
  896. package/app/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
  897. package/app/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
  898. package/app/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
  899. package/app/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
  900. package/app/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
  901. package/app/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
  902. package/app/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
  903. package/app/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
  904. package/app/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
  905. package/app/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
  906. package/app/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
  907. package/app/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
  908. package/app/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
  909. package/app/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
  910. package/app/node_modules/caniuse-lite/data/features/customevent.js +1 -1
  911. package/app/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
  912. package/app/node_modules/caniuse-lite/data/features/datalist.js +1 -1
  913. package/app/node_modules/caniuse-lite/data/features/dataset.js +1 -1
  914. package/app/node_modules/caniuse-lite/data/features/datauri.js +1 -1
  915. package/app/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
  916. package/app/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
  917. package/app/node_modules/caniuse-lite/data/features/decorators.js +1 -1
  918. package/app/node_modules/caniuse-lite/data/features/details.js +1 -1
  919. package/app/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
  920. package/app/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
  921. package/app/node_modules/caniuse-lite/data/features/dialog.js +1 -1
  922. package/app/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
  923. package/app/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
  924. package/app/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
  925. package/app/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
  926. package/app/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
  927. package/app/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
  928. package/app/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
  929. package/app/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
  930. package/app/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
  931. package/app/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
  932. package/app/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
  933. package/app/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
  934. package/app/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
  935. package/app/node_modules/caniuse-lite/data/features/download.js +1 -1
  936. package/app/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
  937. package/app/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
  938. package/app/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
  939. package/app/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
  940. package/app/node_modules/caniuse-lite/data/features/eme.js +1 -1
  941. package/app/node_modules/caniuse-lite/data/features/eot.js +1 -1
  942. package/app/node_modules/caniuse-lite/data/features/es5.js +1 -1
  943. package/app/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
  944. package/app/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
  945. package/app/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
  946. package/app/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
  947. package/app/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
  948. package/app/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
  949. package/app/node_modules/caniuse-lite/data/features/es6.js +1 -1
  950. package/app/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
  951. package/app/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
  952. package/app/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
  953. package/app/node_modules/caniuse-lite/data/features/fetch.js +1 -1
  954. package/app/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
  955. package/app/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
  956. package/app/node_modules/caniuse-lite/data/features/filereader.js +1 -1
  957. package/app/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
  958. package/app/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
  959. package/app/node_modules/caniuse-lite/data/features/flac.js +1 -1
  960. package/app/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
  961. package/app/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
  962. package/app/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
  963. package/app/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
  964. package/app/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
  965. package/app/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
  966. package/app/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
  967. package/app/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
  968. package/app/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
  969. package/app/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
  970. package/app/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
  971. package/app/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
  972. package/app/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
  973. package/app/node_modules/caniuse-lite/data/features/fontface.js +1 -1
  974. package/app/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
  975. package/app/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
  976. package/app/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
  977. package/app/node_modules/caniuse-lite/data/features/forms.js +1 -1
  978. package/app/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
  979. package/app/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
  980. package/app/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
  981. package/app/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
  982. package/app/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
  983. package/app/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
  984. package/app/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
  985. package/app/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
  986. package/app/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
  987. package/app/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
  988. package/app/node_modules/caniuse-lite/data/features/heif.js +1 -1
  989. package/app/node_modules/caniuse-lite/data/features/hevc.js +1 -1
  990. package/app/node_modules/caniuse-lite/data/features/hidden.js +1 -1
  991. package/app/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
  992. package/app/node_modules/caniuse-lite/data/features/history.js +1 -1
  993. package/app/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
  994. package/app/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
  995. package/app/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
  996. package/app/node_modules/caniuse-lite/data/features/http2.js +1 -1
  997. package/app/node_modules/caniuse-lite/data/features/http3.js +1 -1
  998. package/app/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
  999. package/app/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
  1000. package/app/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
  1001. package/app/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
  1002. package/app/node_modules/caniuse-lite/data/features/ime.js +1 -1
  1003. package/app/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
  1004. package/app/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
  1005. package/app/node_modules/caniuse-lite/data/features/imports.js +1 -1
  1006. package/app/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
  1007. package/app/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
  1008. package/app/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
  1009. package/app/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
  1010. package/app/node_modules/caniuse-lite/data/features/innertext.js +1 -1
  1011. package/app/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
  1012. package/app/node_modules/caniuse-lite/data/features/input-color.js +1 -1
  1013. package/app/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
  1014. package/app/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
  1015. package/app/node_modules/caniuse-lite/data/features/input-event.js +1 -1
  1016. package/app/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
  1017. package/app/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
  1018. package/app/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
  1019. package/app/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
  1020. package/app/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
  1021. package/app/node_modules/caniuse-lite/data/features/input-number.js +1 -1
  1022. package/app/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
  1023. package/app/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
  1024. package/app/node_modules/caniuse-lite/data/features/input-range.js +1 -1
  1025. package/app/node_modules/caniuse-lite/data/features/input-search.js +1 -1
  1026. package/app/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
  1027. package/app/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
  1028. package/app/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
  1029. package/app/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
  1030. package/app/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
  1031. package/app/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
  1032. package/app/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
  1033. package/app/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
  1034. package/app/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
  1035. package/app/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
  1036. package/app/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
  1037. package/app/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
  1038. package/app/node_modules/caniuse-lite/data/features/json.js +1 -1
  1039. package/app/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
  1040. package/app/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
  1041. package/app/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
  1042. package/app/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
  1043. package/app/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
  1044. package/app/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
  1045. package/app/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
  1046. package/app/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
  1047. package/app/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
  1048. package/app/node_modules/caniuse-lite/data/features/let.js +1 -1
  1049. package/app/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
  1050. package/app/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
  1051. package/app/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
  1052. package/app/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
  1053. package/app/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
  1054. package/app/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
  1055. package/app/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
  1056. package/app/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
  1057. package/app/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
  1058. package/app/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
  1059. package/app/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
  1060. package/app/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
  1061. package/app/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
  1062. package/app/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
  1063. package/app/node_modules/caniuse-lite/data/features/mathml.js +1 -1
  1064. package/app/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
  1065. package/app/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
  1066. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
  1067. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
  1068. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
  1069. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
  1070. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
  1071. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
  1072. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
  1073. package/app/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
  1074. package/app/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
  1075. package/app/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
  1076. package/app/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
  1077. package/app/node_modules/caniuse-lite/data/features/menu.js +1 -1
  1078. package/app/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
  1079. package/app/node_modules/caniuse-lite/data/features/meter.js +1 -1
  1080. package/app/node_modules/caniuse-lite/data/features/midi.js +1 -1
  1081. package/app/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
  1082. package/app/node_modules/caniuse-lite/data/features/mp3.js +1 -1
  1083. package/app/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
  1084. package/app/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
  1085. package/app/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
  1086. package/app/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
  1087. package/app/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
  1088. package/app/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
  1089. package/app/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
  1090. package/app/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
  1091. package/app/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
  1092. package/app/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
  1093. package/app/node_modules/caniuse-lite/data/features/notifications.js +1 -1
  1094. package/app/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
  1095. package/app/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
  1096. package/app/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
  1097. package/app/node_modules/caniuse-lite/data/features/object-values.js +1 -1
  1098. package/app/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
  1099. package/app/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
  1100. package/app/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
  1101. package/app/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
  1102. package/app/node_modules/caniuse-lite/data/features/ogv.js +1 -1
  1103. package/app/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
  1104. package/app/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
  1105. package/app/node_modules/caniuse-lite/data/features/online-status.js +1 -1
  1106. package/app/node_modules/caniuse-lite/data/features/opus.js +1 -1
  1107. package/app/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
  1108. package/app/node_modules/caniuse-lite/data/features/outline.js +1 -1
  1109. package/app/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
  1110. package/app/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
  1111. package/app/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
  1112. package/app/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
  1113. package/app/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
  1114. package/app/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
  1115. package/app/node_modules/caniuse-lite/data/features/path2d.js +1 -1
  1116. package/app/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
  1117. package/app/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
  1118. package/app/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
  1119. package/app/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
  1120. package/app/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
  1121. package/app/node_modules/caniuse-lite/data/features/picture.js +1 -1
  1122. package/app/node_modules/caniuse-lite/data/features/ping.js +1 -1
  1123. package/app/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
  1124. package/app/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
  1125. package/app/node_modules/caniuse-lite/data/features/pointer.js +1 -1
  1126. package/app/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
  1127. package/app/node_modules/caniuse-lite/data/features/portals.js +1 -1
  1128. package/app/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
  1129. package/app/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
  1130. package/app/node_modules/caniuse-lite/data/features/progress.js +1 -1
  1131. package/app/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
  1132. package/app/node_modules/caniuse-lite/data/features/promises.js +1 -1
  1133. package/app/node_modules/caniuse-lite/data/features/proximity.js +1 -1
  1134. package/app/node_modules/caniuse-lite/data/features/proxy.js +1 -1
  1135. package/app/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
  1136. package/app/node_modules/caniuse-lite/data/features/push-api.js +1 -1
  1137. package/app/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
  1138. package/app/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
  1139. package/app/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
  1140. package/app/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
  1141. package/app/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
  1142. package/app/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
  1143. package/app/node_modules/caniuse-lite/data/features/rellist.js +1 -1
  1144. package/app/node_modules/caniuse-lite/data/features/rem.js +1 -1
  1145. package/app/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
  1146. package/app/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
  1147. package/app/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
  1148. package/app/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
  1149. package/app/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
  1150. package/app/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
  1151. package/app/node_modules/caniuse-lite/data/features/ruby.js +1 -1
  1152. package/app/node_modules/caniuse-lite/data/features/run-in.js +1 -1
  1153. package/app/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
  1154. package/app/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
  1155. package/app/node_modules/caniuse-lite/data/features/script-async.js +1 -1
  1156. package/app/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
  1157. package/app/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
  1158. package/app/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
  1159. package/app/node_modules/caniuse-lite/data/features/sdch.js +1 -1
  1160. package/app/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
  1161. package/app/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
  1162. package/app/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
  1163. package/app/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
  1164. package/app/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
  1165. package/app/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
  1166. package/app/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
  1167. package/app/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
  1168. package/app/node_modules/caniuse-lite/data/features/sni.js +1 -1
  1169. package/app/node_modules/caniuse-lite/data/features/spdy.js +1 -1
  1170. package/app/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
  1171. package/app/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
  1172. package/app/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
  1173. package/app/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
  1174. package/app/node_modules/caniuse-lite/data/features/srcset.js +1 -1
  1175. package/app/node_modules/caniuse-lite/data/features/stream.js +1 -1
  1176. package/app/node_modules/caniuse-lite/data/features/streams.js +1 -1
  1177. package/app/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
  1178. package/app/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
  1179. package/app/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
  1180. package/app/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
  1181. package/app/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
  1182. package/app/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
  1183. package/app/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
  1184. package/app/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
  1185. package/app/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
  1186. package/app/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
  1187. package/app/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
  1188. package/app/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
  1189. package/app/node_modules/caniuse-lite/data/features/svg.js +1 -1
  1190. package/app/node_modules/caniuse-lite/data/features/sxg.js +1 -1
  1191. package/app/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
  1192. package/app/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
  1193. package/app/node_modules/caniuse-lite/data/features/template.js +1 -1
  1194. package/app/node_modules/caniuse-lite/data/features/temporal.js +1 -1
  1195. package/app/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
  1196. package/app/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
  1197. package/app/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
  1198. package/app/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
  1199. package/app/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
  1200. package/app/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
  1201. package/app/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
  1202. package/app/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
  1203. package/app/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
  1204. package/app/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
  1205. package/app/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
  1206. package/app/node_modules/caniuse-lite/data/features/touch.js +1 -1
  1207. package/app/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
  1208. package/app/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
  1209. package/app/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
  1210. package/app/node_modules/caniuse-lite/data/features/ttf.js +1 -1
  1211. package/app/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
  1212. package/app/node_modules/caniuse-lite/data/features/u2f.js +1 -1
  1213. package/app/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
  1214. package/app/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
  1215. package/app/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
  1216. package/app/node_modules/caniuse-lite/data/features/url.js +1 -1
  1217. package/app/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
  1218. package/app/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
  1219. package/app/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
  1220. package/app/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
  1221. package/app/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
  1222. package/app/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
  1223. package/app/node_modules/caniuse-lite/data/features/vibration.js +1 -1
  1224. package/app/node_modules/caniuse-lite/data/features/video.js +1 -1
  1225. package/app/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
  1226. package/app/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
  1227. package/app/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
  1228. package/app/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
  1229. package/app/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
  1230. package/app/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
  1231. package/app/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
  1232. package/app/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
  1233. package/app/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
  1234. package/app/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
  1235. package/app/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
  1236. package/app/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
  1237. package/app/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
  1238. package/app/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
  1239. package/app/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
  1240. package/app/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
  1241. package/app/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
  1242. package/app/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
  1243. package/app/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
  1244. package/app/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
  1245. package/app/node_modules/caniuse-lite/data/features/wasm.js +1 -1
  1246. package/app/node_modules/caniuse-lite/data/features/wav.js +1 -1
  1247. package/app/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
  1248. package/app/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
  1249. package/app/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
  1250. package/app/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
  1251. package/app/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
  1252. package/app/node_modules/caniuse-lite/data/features/web-share.js +1 -1
  1253. package/app/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
  1254. package/app/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
  1255. package/app/node_modules/caniuse-lite/data/features/webgl.js +1 -1
  1256. package/app/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
  1257. package/app/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
  1258. package/app/node_modules/caniuse-lite/data/features/webhid.js +1 -1
  1259. package/app/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
  1260. package/app/node_modules/caniuse-lite/data/features/webm.js +1 -1
  1261. package/app/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
  1262. package/app/node_modules/caniuse-lite/data/features/webp.js +1 -1
  1263. package/app/node_modules/caniuse-lite/data/features/websockets.js +1 -1
  1264. package/app/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
  1265. package/app/node_modules/caniuse-lite/data/features/webusb.js +1 -1
  1266. package/app/node_modules/caniuse-lite/data/features/webvr.js +1 -1
  1267. package/app/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
  1268. package/app/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
  1269. package/app/node_modules/caniuse-lite/data/features/webxr.js +1 -1
  1270. package/app/node_modules/caniuse-lite/data/features/will-change.js +1 -1
  1271. package/app/node_modules/caniuse-lite/data/features/woff.js +1 -1
  1272. package/app/node_modules/caniuse-lite/data/features/woff2.js +1 -1
  1273. package/app/node_modules/caniuse-lite/data/features/word-break.js +1 -1
  1274. package/app/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
  1275. package/app/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
  1276. package/app/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
  1277. package/app/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
  1278. package/app/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
  1279. package/app/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
  1280. package/app/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
  1281. package/app/node_modules/caniuse-lite/data/features/zstd.js +1 -1
  1282. package/app/node_modules/caniuse-lite/package.json +1 -1
  1283. package/app/package.json +1 -1
  1284. package/app/server.js +1 -1
  1285. package/package.json +1 -1
  1286. package/app/.next-cli-build/server/chunks/6105.js +0 -64
  1287. package/app/.next-cli-build/static/chunks/5792-871f5fad4b3167bd.js +0 -64
  1288. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-df8e6ebf63d81fa4.js +0 -1
  1289. package/app/.next-cli-build/static/css/fc5cd911969deefe.css +0 -1
  1290. /package/app/.next-cli-build/static/{HB_LfQdAm7CMiySBZMc98 → _EmpWKvwNJfW_KfYHdNJ-}/_buildManifest.js +0 -0
  1291. /package/app/.next-cli-build/static/{HB_LfQdAm7CMiySBZMc98 → _EmpWKvwNJfW_KfYHdNJ-}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
1
  (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{18205:(e,t,a)=>{Promise.resolve().then(a.bind(a,98075))},98075:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>G});var s=a(95155),i=a(12115),l=a(73321),r=a(98500),n=a.n(r),o=a(5772),d=a(35497),c=a(52679),m=a(28777),p=a(11059);let x=new Map;async function u(e){if(!e?.url||!e?.type)return[];let t=x.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),a=await fetch(`/api/providers/suggested-models?${t}`);if(!a.ok)return[];let s=(await a.json()).data??[];return x.set(e.url,{data:s,expiresAt:Date.now()+6e5}),s}catch{return[]}}var h=a(14051),g=a.n(h);function b({model:e,fullModel:t,alias:a,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:m,onDisable:p}){let x="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:x?{color:x}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,s.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:t}),e.name&&(0,s.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),c&&(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:c,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,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,s.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,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,s.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:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,s.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):p?(0,s.jsx)("button",{onClick:p,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function f({modelId:e,fullModel:t,copied:a,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d=`model_support:${e}`,c="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,s.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:c?{color:c}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e}`?"check":"content_copy"})}),(0,s.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:a===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,s.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:o?"Testing...":"Test"})]})]}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"LAN tag:"}),(0,s.jsx)("code",{className:"rounded bg-primary/10 px-1.5 py-0.5 font-mono text-[10px] text-primary",children:d}),(0,s.jsx)("button",{type:"button",onClick:()=>i(d,`tag-${e}`),className:"rounded px-1 py-0.5 text-[10px] text-text-muted hover:bg-sidebar hover:text-primary",title:"Copy model_support tag",children:a===`tag-${e}`?"Copied":"Copy tag"})]})]}),(0,s.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function y({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:a,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:c,isAnthropic:m}){let[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1),[g,b]=(0,i.useState)(!1),[v,j]=(0,i.useState)(null),[k,N]=(0,i.useState)({}),w=async t=>{if(!v){j(t);try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),s=await a.json();N(e=>({...e,[t]:s.ok?"ok":"error"}))}catch{N(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=Object.entries(a).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,a])=>({modelId:a.replace(`${e}/`,""),fullModel:a,alias:t})),S=s=>{let i,l=`${e}/${s}`;if(Object.values(a).includes(l))return null;let r=(i=s.split("/"))[i.length-1];if(!a[r])return r;let n=`${t}-${r}`;return a[n]?null:n},A=async()=>{if(!p.trim()||u)return;let t=p.trim(),a=S(t);if(!a)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,a,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},T=async()=>{if(g)return;let t=c.find(e=>!1!==e.isActive);if(t){b(!0);try{let a=await fetch(`/api/providers/${t.id}/models`),s=await a.json();if(!a.ok)return void alert(s.error||"Failed to import models");let i=s.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let a=t.id||t.name||t.model;if(!a)continue;let s=S(a);s&&(await n(a,s,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{b(!1)}}},$=c.some(e=>!1!==e.isActive);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",m?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint. Each model also shows a ",(0,s.jsx)("code",{className:"rounded bg-sidebar px-1 py-0.5 font-mono text-xs",children:"model_support:*"})," tag you can paste into an Ollama endpoint label for Combo tag routing."]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{id:"new-compatible-model-input",type:"text",value:p,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&A(),placeholder:m?"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,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:A,disabled:!p.trim()||u,children:u?"Adding...":"Add"}),(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:T,disabled:!$||g,children:g?"Importing...":"Import from /models"})]}),!$&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:a,alias:i})=>(0,s.jsx)(f,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(i),onTest:c.length>0?()=>w(e):void 0,testStatus:k[e],isTesting:v===e},a))})]})}function v({until:e}){let[t,a]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void a("");let s=Math.floor(t/1e3);if(s<60)a(`${s}s`);else if(s<3600)a(`${Math.floor(s/60)}m ${s%60}s`);else{let e=Math.floor(s/3600),t=Math.floor(s%3600/60);a(`${e}h ${t}m`)}};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function j(e){if(!e)return"never";try{return new Date(e).toLocaleString()}catch{return e}}function k(e={}){let t=e&&"object"==typeof e?e:{};return{enabled:!0===t.enabled,intervalSec:Math.max(10,Number.parseInt(t.intervalSec||60,10)||60),failureThreshold:Math.max(1,Number.parseInt(t.failureThreshold||3,10)||3),timeoutMs:Math.max(1e3,Number.parseInt(t.timeoutMs||15e3,10)||15e3),prompt:t.prompt||"Say hi",disableThinking:!1!==t.disableThinking}}function N({connection:e,proxyPools:t,isOAuth:a,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:x,oneByOneStatus:u=null,providerHealthConfig:h=null,healthCheckRunning:g=!1,onRunHealthCheck:b=null}){let[f,y]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),S=(0,i.useRef)(null),A=new Map((t||[]).map(e=>[e.id,e])),T=e.providerSpecificData?.proxyPoolId||null,$=T?A.get(T):null,I=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,R=!!T||I,O=$?`Pool: ${$.name}`:T?`Pool: ${T} (inactive/missing)`:I?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",P="";if($?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=$?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);P=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{P=t}}let E=$?.noProxy||e.providerSpecificData?.connectionNoProxy||"",D=function(e={}){let t=e.tags||e.labels||e.providerSpecificData?.routingTags||e.providerSpecificData?.tags||e.providerSpecificData?.labels||[];return Array.isArray(t)?t.map(e=>String(e||"").trim()).filter(Boolean):"string"==typeof t?t.split(/[\n,;\s]+/).map(e=>e.trim()).filter(Boolean):t&&"object"==typeof t?Object.entries(t).filter(([,e])=>!1!==e&&null!=e).map(([e,t])=>!0===t?e:`${e}:${t}`):[]}(e),M=e.providerSpecificData?.maxInFlight||e.maxInFlight||null,U="default";$?.isActive===!0?U="success":(T||I)&&(U="error"),(0,i.useEffect)(()=>{if(!f)return;let e=e=>{S.current&&!S.current.contains(e.target)&&y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let _=async e=>{C(!0);try{await m("__none__"===e?null:e)}finally{C(!1),y(!1)}},F=e.authType||(a?"oauth":"apikey"),z="oauth"===F,q="cookie"===F,L=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),K=z?L(e.email)?e.email:L(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[H,J]=(0,i.useState)(!1),W=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{J(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let a=W?setInterval(t,1e3):null;return()=>{a&&clearInterval(a)}},[W]);let B="unavailable"!==e.testStatus||H?e.testStatus:"active",G=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null,V=function(e={},t=null){let a=t&&"object"==typeof t?t:{};return!0===a.overrideConnections?{healthCheck:k(a.healthCheck||a),source:"provider",override:!0}:{healthCheck:k(e.healthCheck||{}),source:"account",override:!1}}(e,h),Q=V.healthCheck,Z=!0===Q.enabled,X=e.healthStatus||"unknown",Y=Number(e.healthConsecutiveFailures||0),ee=Number(Q.failureThreshold||3),et=Z?"degraded"===X?`Health: Degraded ${Y}/${ee}`:"dead"===X?"Health: Dead":"alive"===X?"Health: Alive":"Health: Unknown":"Health: off";return(0,s.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,s.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:q?"cookie":z?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:K}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,s.jsx)(d.Ex,{variant:!1===e.isActive?"default":"active"===B||"success"===B?"success":"error"===B||"expired"===B||"unavailable"===B?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":B||"Unknown"}),(0,s.jsx)(d.Ex,{variant:"default",size:"sm",children:z?"OAuth":q?"Cookie":"API Key"}),R&&(0,s.jsx)(d.Ex,{variant:U,size:"sm",children:"Proxy"}),M&&(0,s.jsxs)(d.Ex,{variant:"default",size:"sm",children:["max ",M," in-flight"]}),D.slice(0,3).map(e=>(0,s.jsx)(d.Ex,{variant:"primary",size:"sm",children:e},e)),D.length>3&&(0,s.jsxs)(d.Ex,{variant:"default",size:"sm",children:["+",D.length-3," tags"]}),H&&!1!==e.isActive&&(0,s.jsx)(v,{until:W}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),G()&&(0,s.jsx)(d.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:G()})]}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-text-muted",children:[" ",(0,s.jsx)(d.Ex,{variant:"alive"===X?"success":"dead"===X?"error":"default",children:et})," ",(0,s.jsx)("span",{children:V.override?"provider policy":"account policy"})," ",(0,s.jsxs)("span",{children:["last check: ",j(e.healthLastCheckedAt)]})," ",null!=e.healthLastLatencyMs&&(0,s.jsxs)("span",{children:[e.healthLastLatencyMs,"ms"]})," ",e.healthLastRecoveredAt&&(0,s.jsxs)("span",{children:["recovered: ",j(e.healthLastRecoveredAt)]})," ",e.healthLastError&&(0,s.jsx)("span",{className:"text-red-500",children:e.healthLastError})," ",(0,s.jsx)("button",{type:"button",onClick:b||void 0,disabled:!b||g,className:"rounded border border-border px-2 py-1 text-xs text-text-main transition-colors hover:border-primary hover:text-primary disabled:cursor-not-allowed disabled:opacity-50",children:g?"Checking...":"Run health check now"})," "]})," ",D.length>0&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-1.5 flex-wrap",children:[(0,s.jsx)("span",{className:"text-[11px] text-text-muted",children:"routing tags:"}),D.map(e=>(0,s.jsx)("code",{className:"rounded bg-primary/10 px-1 py-0.5 font-mono text-[10px] text-primary",children:e},e))]}),R&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:O,children:O}),P&&(0,s.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:P}),E&&(0,s.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(0,s.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,s.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,s.jsxs)("div",{className:"relative",ref:S,children:[(0,s.jsxs)("button",{onClick:()=>y(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${R?"text-primary":"text-text-muted hover:text-primary"}`,disabled:w,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:w?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,s.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,s.jsx)("button",{onClick:()=>_("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!T?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,s.jsx)("button",{onClick:()=>_(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${T===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,s.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,s.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}b.propTypes={model:g().shape({id:g().string.isRequired}).isRequired,fullModel:g().string.isRequired,alias:g().string,copied:g().string,onCopy:g().func.isRequired,testStatus:g().oneOf(["ok","error"]),isCustom:g().bool,isFree:g().bool,onDeleteAlias:g().func,onTest:g().func,isTesting:g().bool,onDisable:g().func},g().string.isRequired,g().string.isRequired,g().string,g().func.isRequired,g().func.isRequired,g().func,g().oneOf(["ok","error"]),g().bool,g().string.isRequired,g().object.isRequired,g().string,g().func.isRequired,g().func.isRequired,g().func.isRequired,y.propTypes={providerStorageAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,modelAliases:g().object.isRequired,copied:g().string,onCopy:g().func.isRequired,onSetAlias:g().func.isRequired,onDeleteAlias:g().func.isRequired,connections:g().arrayOf(g().shape({id:g().string,isActive:g().bool})).isRequired,isAnthropic:g().bool},v.propTypes={until:g().string.isRequired},N.propTypes={connection:g().shape({id:g().string,name:g().string,email:g().string,displayName:g().string,modelLockUntil:g().string,testStatus:g().string,isActive:g().bool,lastError:g().string,priority:g().number,globalPriority:g().number,providerSpecificData:g().object,tags:g().oneOfType([g().string,g().array]),labels:g().oneOfType([g().string,g().array]),maxInFlight:g().oneOfType([g().string,g().number]),healthCheck:g().object,healthStatus:g().string,healthConsecutiveFailures:g().number,healthLastCheckedAt:g().string,healthLastOkAt:g().string,healthLastRecoveredAt:g().string,healthLastLatencyMs:g().number,healthLastError:g().string}).isRequired,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string,proxyUrl:g().string,noProxy:g().string,isActive:g().bool})),isOAuth:g().bool.isRequired,isFirst:g().bool.isRequired,isLast:g().bool.isRequired,onMoveUp:g().func.isRequired,onMoveDown:g().func.isRequired,onToggleActive:g().func.isRequired,onUpdateProxy:g().func,onEdit:g().func.isRequired,onDelete:g().func.isRequired,oneByOneStatus:g().shape({state:g().string,error:g().string}),providerHealthConfig:g().object,healthCheckRunning:g().bool,onRunHealthCheck:g().func};var w=a(90620),C=a(12494);let S=[{value:1,label:"Mon"},{value:2,label:"Tue"},{value:3,label:"Wed"},{value:4,label:"Thu"},{value:5,label:"Fri"},{value:6,label:"Sat"},{value:0,label:"Sun"}],A=[0,1,2,3,4,5,6],T={enabled:!0,weekdays:A,fromTime:"00:00",toTime:"23:59"},$={enabled:!1,intervalSec:60,failureThreshold:3,timeoutMs:15e3,prompt:"Say hi",disableThinking:!0,model:""};function I(e,t){let a=String(e||"").trim();return/^([01]\d|2[0-3]):([0-5]\d)$/.test(a)?a:t}function R(e={}){let t=e&&"object"==typeof e?e:{},a=Array.isArray(t.weekdays)?t.weekdays.map(Number).filter(e=>e>=0&&e<=6):A;return{enabled:!1!==t.enabled,weekdays:[...new Set(a)].sort((e,t)=>e-t),fromTime:I(t.fromTime||t.from,"00:00"),toTime:I(t.toTime||t.to,"23:59")}}function O(e={}){return{overrideConnections:!0===e.overrideConnections,schedule:R(e.schedule||T)}}function P(e={}){var t;let a=e&&"object"==typeof e?e:{};return{enabled:!0===a.enabled,intervalSec:Math.max(10,Number.parseInt(a.intervalSec||$.intervalSec,10)||$.intervalSec),failureThreshold:Math.max(1,Number.parseInt(a.failureThreshold||$.failureThreshold,10)||$.failureThreshold),timeoutMs:Math.max(1e3,Number.parseInt(a.timeoutMs||$.timeoutMs,10)||$.timeoutMs),prompt:"string"==typeof a.prompt&&a.prompt.trim()?a.prompt.trim():$.prompt,disableThinking:!1!==a.disableThinking,model:"string"==typeof(t=a.model||a.healthModel||a.testModel)?t.trim():""}}function E(e={}){return{overrideConnections:!0===e.overrideConnections,healthCheck:P(e.healthCheck||e||$)}}function D(){return"text-xs font-medium text-text-muted"}function M(){return"mt-1 w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-50"}function U({providerId:e,onSaved:t}){let[a,l]=(0,i.useState)(O()),[r,n]=(0,i.useState)(E()),[o,d]=(0,i.useState)([]),[m,p]=(0,i.useState)(!1),[x,u]=(0,i.useState)(""),[h,g]=(0,i.useState)(!0),[b,f]=(0,i.useState)(!1),[y,v]=(0,i.useState)(!1),j=function(e=""){if((0,c.gb)(e))return"anthropic";if((0,c.mq)(e)||"cloudflare-ai"===e)return"openai";if("gemini"===e)return"gemini";if("github"===e)return"openai";let t=w.X3?.[e]||"";return t.includes("/messages")?"anthropic":t.includes("/chat/completions")||t.includes("/responses")?"openai":null}(e),k=!!j,N="anthropic"===j,T=(0,C.wB)(o,r.healthCheck.model);(0,i.useEffect)(()=>{let t=!1;return async function(){try{let a=await fetch("/api/settings",{cache:"no-store"}),s=a.ok?await a.json():{};t||(l(O((s.providerSchedules||{})[e]||{})),n(E((s.providerHealthChecks||{})[e]||{})))}finally{t||g(!1)}}(),()=>{t=!0}},[e]),(0,i.useEffect)(()=>{let t=!1;return async function(){p(!0),u("");try{let a=await fetch(`/api/providers?provider=${encodeURIComponent(e)}&summary=1`,{cache:"no-store"}),s=((a.ok?await a.json():{}).connections||[]).filter(t=>t.provider===e),i=await (0,C.ns)({providerId:e,connections:s,currentModel:r.healthCheck.model});t||(d(i.models),u(i.warning||""))}catch(e){t||(d([]),u(e.message||"Failed to load local Available Models list"))}finally{t||p(!1)}}(),()=>{t=!0}},[e,r.healthCheck.model]);let $=e=>{l(t=>({...t,schedule:R({...t.schedule,...e})})),v(!1)},I=e=>{n(t=>({...t,healthCheck:P({...t.healthCheck,...e})})),v(!1)},_=async()=>{f(!0),v(!1);try{let s=await fetch("/api/settings",{cache:"no-store"}),i=s.ok?await s.json():{},l={...i.providerSchedules||{},[e]:O(a)},n={...i.providerHealthChecks||{},[e]:E(r)};(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSchedules:l,providerHealthChecks:n})})).ok&&(v(!0),"function"==typeof t&&await t())}finally{f(!1)}};return h?null:(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-card p-4",children:[(0,s.jsxs)("div",{className:"mb-5",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Provider Scheduler Override"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"When enabled, every account in this provider uses this provider-level schedule and account schedulers are locked."})]}),(0,s.jsxs)("label",{className:"mb-4 flex items-center gap-2 text-sm text-text-main",children:[(0,s.jsx)("input",{type:"checkbox",checked:a.overrideConnections,onChange:e=>{l(t=>({...t,overrideConnections:e.target.checked})),v(!1)}}),"Override all accounts"]}),(0,s.jsxs)("div",{className:"mb-5 space-y-3",children:[(0,s.jsx)("p",{className:D(),children:"Weekdays"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:S.map(e=>(0,s.jsxs)("label",{className:"flex items-center gap-1.5 rounded-lg border border-border px-2.5 py-1.5 text-xs text-text-main",children:[(0,s.jsx)("input",{type:"checkbox",checked:a.schedule.weekdays.includes(e.value),onChange:()=>{var t;return t=e.value,void(l(e=>{let a=new Set(Array.isArray(e.schedule.weekdays)?e.schedule.weekdays:A);return a.has(t)?a.delete(t):a.add(t),{...e,schedule:{...e.schedule,weekdays:[...a].sort((e,t)=>e-t)}}}),v(!1))}}),e.label]},e.value))}),!1!==a.schedule.enabled&&0===a.schedule.weekdays.length&&(0,s.jsx)("p",{className:"text-xs text-yellow-500",children:"No weekdays selected. This provider schedule will make accounts unavailable until at least one weekday is selected."})]}),(0,s.jsxs)("div",{className:"mb-6 grid gap-3 sm:grid-cols-2",children:[(0,s.jsxs)("label",{className:D(),children:["From time",(0,s.jsx)("input",{type:"time",value:a.schedule.fromTime,onChange:e=>$({fromTime:e.target.value}),className:M()})]}),(0,s.jsxs)("label",{className:D(),children:["To time",(0,s.jsx)("input",{type:"time",value:a.schedule.toTime,onChange:e=>$({toTime:e.target.value}),className:M()})]})]}),(0,s.jsxs)("div",{className:"mb-5 border-t border-border pt-5",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Provider Health Check Override"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"When enabled, every account in this provider uses the same periodic ping policy and account health settings are locked."})]}),(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-5",children:[(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-main",children:[(0,s.jsx)("input",{type:"checkbox",checked:r.overrideConnections,onChange:e=>{n(t=>({...t,overrideConnections:e.target.checked})),v(!1)}}),"Override all accounts"]}),(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-main",children:[(0,s.jsx)("input",{type:"checkbox",checked:r.healthCheck.enabled,onChange:e=>I({enabled:e.target.checked})}),"Enable periodic ping healthcheck"]})]}),r.healthCheck.enabled&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{className:D(),children:["Healthcheck model",(0,s.jsxs)("select",{value:r.healthCheck.model||"",onChange:e=>I({model:e.target.value}),className:M(),disabled:m,children:[(0,s.jsx)("option",{value:"",children:"Connection/base URL only — no chat ping"}),T.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))]})]}),(0,s.jsxs)("label",{className:`${D()} mt-3 block`,children:["Manual healthcheck model",(0,s.jsx)("input",{value:r.healthCheck.model||"",onChange:e=>I({model:e.target.value}),placeholder:N?"claude/model name from this endpoint":"gemini"===j?"gemini model, e.g. gemini-2.5-flash":"model name from Available Models",className:M(),disabled:m})]}),m&&(0,s.jsx)("p",{className:"mt-2 text-xs text-text-muted",children:"Loading local Available Models..."}),x&&(0,s.jsxs)("p",{className:"mt-2 text-xs text-yellow-500",children:["Model list note: ",x]}),!m&&!x&&(0,s.jsx)("p",{className:"mt-2 text-xs text-text-muted",children:"Model list is loaded from local Available Models / DB, not from the provider /models API."}),N&&(0,s.jsxs)("p",{className:"mt-2 text-xs text-text-muted",children:["Anthropic-compatible healthcheck sends ",(0,s.jsx)("code",{children:"Say hi"})," to ",(0,s.jsx)("code",{children:"/v1/messages"})," only when a model is selected."]}),"gemini"===j&&(0,s.jsxs)("p",{className:"mt-2 text-xs text-text-muted",children:["Gemini healthcheck sends ",(0,s.jsx)("code",{children:"Say hi"})," with the native ",(0,s.jsx)("code",{children:"generateContent"})," API only when a model is selected."]}),"cloudflare-ai"===e&&(0,s.jsxs)("p",{className:"mt-2 text-xs text-text-muted",children:["Cloudflare healthcheck sends ",(0,s.jsx)("code",{children:"Say hi"})," to the Workers AI OpenAI-style chat endpoint only when a model is selected."]}),!k&&(0,s.jsx)("p",{className:"mt-2 text-xs text-text-muted",children:"This provider can still show local Available Models. Auto healthcheck will keep using the original connection/token/account probe until a direct chat endpoint is available."})]}),r.healthCheck.enabled&&(!k||!r.healthCheck.model)&&(0,s.jsx)("p",{className:"mt-4 rounded-lg border border-border bg-sidebar/40 px-3 py-2 text-xs text-text-muted",children:"No direct chat healthcheck model/endpoint is active. Auto healthcheck will test connection/base URL/key/token/account and will not send the Say hi chat ping."}),(0,s.jsxs)("div",{className:"mt-4 grid gap-3 sm:grid-cols-3",children:[(0,s.jsxs)("label",{className:D(),children:["Interval seconds",(0,s.jsx)("input",{type:"number",min:"10",value:r.healthCheck.intervalSec,onChange:e=>I({intervalSec:Math.max(10,Number.parseInt(e.target.value,10)||60)}),className:M()})]}),(0,s.jsxs)("label",{className:D(),children:["Fail threshold",(0,s.jsx)("input",{type:"number",min:"1",value:r.healthCheck.failureThreshold,onChange:e=>I({failureThreshold:Math.max(1,Number.parseInt(e.target.value,10)||3)}),className:M()})]}),(0,s.jsxs)("label",{className:D(),children:["Timeout ms",(0,s.jsx)("input",{type:"number",min:"1000",value:r.healthCheck.timeoutMs,onChange:e=>I({timeoutMs:Math.max(1e3,Number.parseInt(e.target.value,10)||15e3)}),className:M()})]})]}),(0,s.jsxs)("label",{className:`${D()} mt-3 block`,children:["Prompt",(0,s.jsx)("input",{value:r.healthCheck.prompt,onChange:e=>I({prompt:e.target.value}),className:M()})]}),(0,s.jsxs)("label",{className:"mt-3 flex items-center gap-2 text-sm text-text-main",children:[(0,s.jsx)("input",{type:"checkbox",checked:r.healthCheck.disableThinking,onChange:e=>I({disableThinking:e.target.checked})}),"Force lightweight test payload / disable thinking when provider supports it"]}),(0,s.jsxs)("div",{className:"mt-5 flex items-center gap-3",children:[(0,s.jsx)("button",{type:"button",onClick:_,disabled:b,className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-white transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",children:b?"Saving...":"Save Provider Policy"}),y&&(0,s.jsx)("span",{className:"text-xs font-medium text-green-500",children:"Saved"})]})]})}let _=`name1|sk-key1
2
2
  name2|sk-key2
3
- sk-key-only-auto-named`;function F({isOpen:e,provider:t,providerName:a,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:p,error:x,onSave:u,onBulkDone:h,onClose:g}){let b="__none__",f="ollama-local"===t,y="cookie"===n,v="xai"===t&&!y,j=y?"Cookie Value":"API Key",k="azure"===t,N="cloudflare-ai"===t,w=c.Q2?.[t]?.regions||null,C=c.Q2?.[t]?.defaultRegion||w?.[0]?.id||"",[S,A]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:b,ollamaHostUrl:""}),[T,$]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,R]=(0,i.useState)({accountId:""}),[O,P]=(0,i.useState)(C),[E,D]=(0,i.useState)(!1),[M,U]=(0,i.useState)(null),[z,q]=(0,i.useState)(!1),[L,K]=(0,i.useState)("single"),[H,J]=(0,i.useState)(""),[W,B]=(0,i.useState)(null),G=()=>f&&S.ollamaHostUrl.trim()?{baseUrl:S.ollamaHostUrl.trim()}:k?{azureEndpoint:T.azureEndpoint,apiVersion:T.apiVersion,deployment:T.deployment,organization:T.organization}:N?{accountId:I.accountId}:w&&O?{region:O}:void 0,V=async()=>{D(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})}),a=await e.json();U(a.valid?"success":"failed")}catch{U("failed")}finally{D(!1)}},Q=async()=>{if(t&&(f||S.apiKey)&&(f||S.name)&&(!l||S.defaultModel.trim())){q(!0);try{let e=!1;try{D(!0),U(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})});e=!!(await a.json()).valid,U(e?"success":"failed")}catch{U("failed")}finally{D(!1)}await u({name:S.name||(f?"Ollama Local":""),apiKey:S.apiKey,defaultModel:l?S.defaultModel.trim():void 0,priority:S.priority,proxyPoolId:S.proxyPoolId===b?null:S.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:G()})}finally{q(!1)}}},Z=async()=>{let e=H.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;q(!0),B(null);let a=0,s=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?a++:s++}catch{s++}}q(!1),B({success:a,failed:s}),a>0&&h&&h()};return t?(0,s.jsx)(d.aF,{isOpen:e,title:`Add ${a||t} ${j}`,onClose:g,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{size:"sm",variant:"single"===L?"primary":"ghost",onClick:()=>{K("single"),B(null)},children:"Single"}),(0,s.jsx)(d.$n,{size:"sm",variant:"bulk"===L?"primary":"ghost",onClick:()=>{K("bulk"),B(null)},children:"Bulk Add"})]}),"bulk"===L&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:_,value:H,onChange:e=>J(e.target.value)}),W&&(0,s.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,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:z||!H.trim(),children:z?"Adding...":"Add All Keys"}),(0,s.jsx)(d.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===L&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.pd,{label:"Name",value:S.name,onChange:e=>A({...S,name:e.target.value}),placeholder:f?"Ollama Local":"Production Key"}),f&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:"Ollama Host URL",value:S.ollamaHostUrl,onChange:e=>A({...S,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:V,disabled:E||z,variant:"secondary",children:E?"Checking...":"Check"})})]}),!f&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:j,type:y?"text":"password",value:S.apiKey,onChange:e=>A({...S,apiKey:e.target.value}),placeholder:y?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:V,disabled:!S.apiKey||E||z,variant:"secondary",children:E?"Checking...":"Check"})})]}),v&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),y&&o&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),w&&(0,s.jsx)(d.l6,{label:"Region",value:O,onChange:e=>P(e.target.value),options:w.map(e=>({value:e.id,label:e.label}))}),l&&(0,s.jsx)(d.pd,{label:"Default Model",value:S.defaultModel,onChange:e=>A({...S,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),f&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,s.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,s.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),M&&(0,s.jsx)(d.Ex,{variant:"success"===M?"success":"error",children:"success"===M?"Valid":"Invalid"}),x&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),N&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,s.jsx)(d.pd,{label:"Account ID",value:I.accountId,onChange:e=>R({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,s.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(d.pd,{label:"Azure Endpoint",value:T.azureEndpoint,onChange:e=>$({...T,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,s.jsx)(d.pd,{label:"Deployment Name",value:T.deployment,onChange:e=>$({...T,deployment:e.target.value}),placeholder:"gpt-4"}),(0,s.jsx)(d.pd,{label:"API Version",value:T.apiVersion,onChange:e=>$({...T,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,s.jsx)(d.pd,{label:"Organization",value:T.organization,onChange:e=>$({...T,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,s.jsx)(d.pd,{label:"Priority",type:"number",value:S.priority,onChange:e=>A({...S,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsx)(d.l6,{label:"Proxy Pool",value:S.proxyPoolId,onChange:e=>A({...S,proxyPoolId:e.target.value}),options:[{value:b,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:Q,fullWidth:!0,disabled:z||!f&&(!S.name||!S.apiKey)||l&&!S.defaultModel.trim()||k&&(!T.azureEndpoint||!T.deployment||!T.organization)||N&&!I.accountId,children:z?"Saving...":"Save"}),(0,s.jsx)(d.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function z({isOpen:e,node:t,onSave:a,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1",openAICompatibleRuntime:c.hb,routingTags:"",maxInFlight:""}),[m,p]=(0,i.useState)(!1),[x,u]=(0,i.useState)(""),[h,g]=(0,i.useState)(""),[b,f]=(0,i.useState)(!1),[y,v]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1"),openAICompatibleRuntime:t.openAICompatibleRuntime||t.providerSpecificData?.openAICompatibleRuntime||c.hb,routingTags:Array.isArray(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags)?(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags).join(", "):t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags||"",maxInFlight:t.providerSpecificData?.maxInFlight||t.maxInFlight||""})},[t,r]);let j=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e=String(n.routingTags||"").split(/[\n,;]+/).map(e=>e.trim()).filter(Boolean),s=Number(n.maxInFlight),i={...t.providerSpecificData||{},routingTags:e,tags:e};Number.isFinite(s)&&s>0?i.maxInFlight=s:delete i.maxInFlight;let l={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl,routingTags:e,tags:e,providerSpecificData:i};r||(l.apiType=n.apiType,l.openAICompatibleRuntime=n.openAICompatibleRuntime),await a(l)}finally{p(!1)}}},k=async()=>{f(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:x,type:r?"anthropic-compatible":"openai-compatible",modelId:h.trim()||void 0})}),t=await e.json();v(t.valid?"success":"failed")}catch{v("failed")}finally{f(!1)}};return t?(0,s.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,s.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,s.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),!r&&(0,s.jsx)(d.l6,{label:"Server Type",options:c._8,value:n.openAICompatibleRuntime,onChange:e=>o({...n,openAICompatibleRuntime:e.target.value}),hint:c._8.find(e=>e.value===n.openAICompatibleRuntime)?.description||"Controls how BlueRouter maps thinking/reasoning params for this endpoint."}),(0,s.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,s.jsx)(d.pd,{label:"Routing Tags / Labels",value:n.routingTags,onChange:e=>o({...n,routingTags:e.target.value}),placeholder:"gpu, vram:8gb, model_support:qwen3:8b",hint:"Comma or newline separated. Used by Combo least-latency/P2C tag rules for LAN Ollama."}),(0,s.jsx)(d.pd,{label:"Max In-flight Requests",type:"number",value:n.maxInFlight,onChange:e=>o({...n,maxInFlight:e.target.value}),placeholder:"2",hint:"Optional per-endpoint concurrency cap used by P2C and circuit-aware routing."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:x,onChange:e=>u(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:k,disabled:!x||b||!n.baseUrl.trim(),variant:"secondary",children:b?"Checking...":"Check"})})]}),(0,s.jsx)(d.pd,{label:"Model ID (optional)",value:h,onChange:e=>g(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,s.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:j,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||m,children:m?"Saving...":"Save"}),(0,s.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function q({isOpen:e,providerAlias:t,providerDisplayAlias:a,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,m]=(0,i.useState)(null),[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),m(null),x(""))},[e]);let g=e=>{let a=`${t}/`;return e.startsWith(a)?e.slice(a.length):e},b=async()=>{let e=g(n.trim());if(e){m("testing"),x("");try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),s=await a.json();m(s.ok?"ok":"error"),x(s.error||"")}catch(e){m("error"),x(e.message)}}},f=async()=>{let e=g(n.trim());if(e&&!u){h(!0);try{await l(e)}finally{h(!1)}}};return(0,s.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),m(null),x("")},onKeyDown:e=>{"Enter"===e.key&&b()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,s.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:b,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,s.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:g(n.trim())||"model-id"})]})]}),"ok"===c&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,s.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,s.jsx)("span",{children:p||"Model not reachable"})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(d.$n,{onClick:f,fullWidth:!0,size:"sm",disabled:!n.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}F.propTypes={isOpen:g().bool.isRequired,provider:g().string,providerName:g().string,isCompatible:g().bool,isAnthropic:g().bool,authType:g().string,authHint:g().string,website:g().string,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string})),error:g().string,onSave:g().func.isRequired,onBulkDone:g().func,onClose:g().func.isRequired},z.propTypes={isOpen:g().bool.isRequired,node:g().shape({id:g().string,name:g().string,prefix:g().string,apiType:g().string,openAICompatibleRuntime:g().string,baseUrl:g().string,providerSpecificData:g().object,tags:g().oneOfType([g().string,g().array]),maxInFlight:g().oneOfType([g().string,g().number])}),onSave:g().func.isRequired,onClose:g().func.isRequired,isAnthropic:g().bool},q.propTypes={isOpen:g().bool.isRequired,providerAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,onSave:g().func.isRequired,onClose:g().func.isRequired};var L=a(65921);let K=[{key:"cached",label:"Cached input",hint:"Per 1M tokens"},{key:"reasoning",label:"Reasoning",hint:"Per 1M tokens"},{key:"cache_creation",label:"Cache creation",hint:"Per 1M tokens"}];function H(e){if(null==e||""===e)return"";let t=Number(e);return Number.isFinite(t)?String(t):""}function J(e,t,a){let s=t||a||{};return{modelId:e,isOverride:!!t,defaults:a||null,input:H(s.input),output:H(s.output),cached:H(s.cached),reasoning:H(s.reasoning),cache_creation:H(s.cache_creation)}}function W({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:a}){let l=(0,L.i)(),[r,n]=(0,i.useState)({}),[o,c]=(0,i.useState)(!0),[m,p]=(0,i.useState)(null),[x,u]=(0,i.useState)({}),[h,g]=(0,i.useState)({}),[b,f]=(0,i.useState)(()=>new Set),[y,v]=(0,i.useState)({}),[j,k]=(0,i.useState)(null),[N,w]=(0,i.useState)(!1),C=(0,i.useMemo)(()=>{let t=`${e}/`,s=[];for(let e of Object.values(a||{})){if(!e.startsWith(t))continue;let a=e.slice(t.length);a&&!s.includes(a)&&s.push(a)}return s.sort((e,t)=>e.localeCompare(t))},[a,e]),S=async()=>{try{let t=await fetch("/api/pricing",{cache:"no-store"});if(!t.ok)return;let a=await t.json(),s=a?.[e]||{};n(s)}catch(e){console.log("Error fetching pricing:",e)}finally{c(!1)}};(0,i.useEffect)(()=>{c(!0),S()},[e]),(0,i.useEffect)(()=>{g(e=>{let t={};for(let a of C){if(b.has(a)&&e[a]){t[a]=e[a];continue}t[a]=J(a,r[a],null)}return t})},[C.join("|"),JSON.stringify(r)]);let A=(e,t,a)=>{g(s=>({...s,[e]:{...s[e],[t]:a}})),f(t=>{if(t.has(e))return t;let a=new Set(t);return a.add(e),a}),y[e]&&v(t=>{let a={...t};return delete a[e],a})},T=async t=>{let a,s=h[t];if(s){try{a=function(e){let t={};for(let a of["input","output","cached","reasoning","cache_creation"]){if(""===e[a]||null===e[a]||void 0===e[a])continue;let s=Number(e[a]);if(!Number.isFinite(s)||s<0)throw Error(`Invalid ${a}: must be ≥ 0`);t[a]=s}if(void 0===t.input&&void 0===t.output)throw Error("Set at least input and output");return t}(s)}catch(e){v(a=>({...a,[t]:e.message}));return}p(t);try{let s=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:{[t]:a}})}),i=await s.json();if(!s.ok)return void v(e=>({...e,[t]:i?.error||"Failed to save"}));n(i?.[e]||{}),f(e=>{if(!e.has(t))return e;let a=new Set(e);return a.delete(t),a}),v(e=>{let a={...e};return delete a[t],a}),l?.success?.(`Pricing saved for ${t}`)}catch(e){v(a=>({...a,[t]:e?.message||"Network error"}))}finally{p(null)}}},$=async t=>{p(t);try{let a=`/api/pricing?provider=${encodeURIComponent(e)}&model=${encodeURIComponent(t)}`,s=await fetch(a,{method:"DELETE"}),i=await s.json();if(!s.ok)return void v(e=>({...e,[t]:i?.error||"Failed to reset"}));n(i?.[e]||{}),f(e=>{if(!e.has(t))return e;let a=new Set(e);return a.delete(t),a}),l?.info?.(`Pricing reset for ${t}`)}catch(e){v(a=>({...a,[t]:e?.message||"Network error"}))}finally{p(null)}},I=async()=>{if(j){w(!0);try{let e=await fetch("/api/pricing/recalculate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j.payload||{})}),t=await e.json();if(!e.ok)return void l?.error?.(t?.error||"Recalculate failed");let a=t.skippedNoPricing?` \xb7 skipped ${t.skippedNoPricing} (no pricing)`:"";l?.success?.(`Recalculated ${t.rowsUpdated} row${1===t.rowsUpdated?"":"s"} across ${t.groupsUpdated} model${1===t.groupsUpdated?"":"s"}${a}`)}catch(e){l?.error?.(e?.message||"Network error")}finally{w(!1),k(null)}}};return(0,s.jsxs)(d.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted",children:"payments"}),(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Model Pricing"}),(0,s.jsx)(d.Ex,{variant:"secondary",size:"sm",children:"Per 1M tokens"})]}),(0,s.jsxs)("p",{className:"mt-1 text-xs leading-relaxed text-text-muted",children:["Set custom input/output rates used by the Usage dashboard to estimate cost for"," ",(0,s.jsx)("code",{className:"rounded bg-sidebar px-1.5 py-0.5 font-mono text-[11px]",children:t}),". Overrides apply only to this custom endpoint; falls back to built-in pricing tables when unset. New rates take effect on the next request — use"," ",(0,s.jsx)("span",{className:"font-medium text-text-main",children:"Recalc cost"})," to rewrite past rows."]})]}),C.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>{k({scope:"provider",label:`all models on ${t}`,payload:{provider:e}})},disabled:N,className:"shrink-0",children:"Recalc all"})]}),o?(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Loading pricing..."}):0===C.length?(0,s.jsx)("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center text-sm text-text-muted",children:"Add models in the section below first — pricing can then be set per model here."}):(0,s.jsx)("div",{className:"flex flex-col gap-3",children:C.map(a=>{let i=h[a]||J(a,r[a],null),l=!!r[a],n=!!x[a],o=(e=>{let t=h[e];if(!t)return!1;let a=r[e];if(!a)return!!(t.input||t.output||t.cached||t.reasoning||t.cache_creation);for(let e of["input","output","cached","reasoning","cache_creation"])if(((""===t[e]?null:Number(t[e]))??null)!==((void 0===a[e]?null:Number(a[e]))??null))return!0;return!1})(a),c=y[a],p=m===a;return(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface-2/40 p-3 sm:p-4",children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"smart_toy"}),(0,s.jsx)("code",{className:"truncate font-mono text-sm font-semibold text-text-main",children:a}),l?(0,s.jsx)(d.Ex,{variant:"success",size:"sm",children:"Override"}):(0,s.jsx)(d.Ex,{variant:"default",size:"sm",children:"Default"})]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:(0,s.jsxs)("button",{type:"button",onClick:()=>{u(e=>({...e,[a]:!e[a]}))},className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:n?"expand_less":"tune"}),n?"Hide advanced":"Advanced"]})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,s.jsx)(B,{label:"Input",hint:"$ per 1M input tokens",value:i.input,onChange:e=>A(a,"input",e),disabled:p}),(0,s.jsx)(B,{label:"Output",hint:"$ per 1M output tokens",value:i.output,onChange:e=>A(a,"output",e),disabled:p})]}),n&&(0,s.jsx)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-3",children:K.map(e=>(0,s.jsx)(B,{label:e.label,hint:e.hint,value:i[e.key],onChange:t=>A(a,e.key,t),disabled:p},e.key))}),c&&(0,s.jsxs)("p",{className:"mt-2 flex items-center gap-1 text-xs text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),c]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-end",children:[(0,s.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"calculate",onClick:()=>{k({scope:"model",label:`${t}/${a}`,payload:{provider:e,model:a}})},disabled:p||N,title:"Rewrite past usage rows for this model with current pricing",children:"Recalc cost"}),l&&(0,s.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"restart_alt",onClick:()=>$(a),disabled:p,children:"Reset to default"}),(0,s.jsx)(d.$n,{size:"sm",icon:"save",onClick:()=>T(a),disabled:p||!o,children:p?"Saving...":o?"Save":"Saved"})]})]},a)})}),(0,s.jsx)(d.uo,{isOpen:!!j,onClose:()=>!N&&k(null),onConfirm:I,title:"Recalculate cost",message:j?`Rewrite the cost column on past usage rows for ${j.label} using the current pricing? This overwrites whatever cost was stored at request time.`:"",confirmText:N?"Recalculating...":"Recalculate",cancelText:"Cancel"})]})}function B({label:e,hint:t,value:a,onChange:i,disabled:l}){return(0,s.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("span",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-sm text-text-muted",children:"$"}),(0,s.jsx)("input",{type:"number",step:"0.0001",min:0,value:a,onChange:e=>i(e.target.value),disabled:l,placeholder:"0.00",className:"w-full rounded-[10px] border border-transparent bg-surface-2 py-2.5 pl-7 pr-3 text-[16px] text-text-main placeholder-text-muted/70 transition-all duration-150 ease-out focus:border-brand-500/40 focus:outline-none focus:ring-2 focus:ring-brand-500/30 disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm"})]}),t&&(0,s.jsx)("span",{className:"text-[11px] text-text-muted",children:t})]})}function G(){let e,t=(0,l.useParams)(),a=(0,l.useRouter)(),r=t.id,[x,h]=(0,i.useState)([]),[g,f]=(0,i.useState)(!0),[v,j]=(0,i.useState)(null),[k,w]=(0,i.useState)([]),[C,S]=(0,i.useState)(!1),[A,T]=(0,i.useState)(!1),[$,I]=(0,i.useState)(!1),[R,O]=(0,i.useState)(""),[P,E]=(0,i.useState)(!1),[D,M]=(0,i.useState)(!1),[_,L]=(0,i.useState)(!1),[K,H]=(0,i.useState)(null),[J,B]=(0,i.useState)({}),[G,V]=(0,i.useState)(!1),[Q,Z]=(0,i.useState)({}),[X,Y]=(0,i.useState)(""),[ee,et]=(0,i.useState)(null),[ea,es]=(0,i.useState)(!1),[ei,el]=(0,i.useState)([]),[er,en]=(0,i.useState)("__none__"),[eo,ed]=(0,i.useState)(!1),[ec,em]=(0,i.useState)(null),[ep,ex]=(0,i.useState)({}),[eu,eh]=(0,i.useState)(null),[eg,eb]=(0,i.useState)(""),[ef,ey]=(0,i.useState)("global"),[ev,ej]=(0,i.useState)("120"),[ek,eN]=(0,i.useState)(!0),[ew,eC]=(0,i.useState)(!0),[eS,eA]=(0,i.useState)("3"),[eT,e$]=(0,i.useState)("auto"),[eI,eR]=(0,i.useState)([]),[eO,eP]=(0,i.useState)([]),[eE,eD]=(0,i.useState)([]),[eM,eU]=(0,i.useState)(null),[e_,eF]=(0,i.useState)(!1),[ez,eq]=(0,i.useState)(!1),[eL,eK]=(0,i.useState)(!1),[eH,eJ]=(0,i.useState)(null),[eW,eB]=(0,i.useState)({}),[eG,eV]=(0,i.useState)(null),eQ=(0,i.useRef)(!1),{copied:eZ,copy:eX}=(0,p.C)(),eY="ag_risk_confirmed",e0=()=>{S(!0)},e1=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(eY)?eF(!0):e6?e0():(O(""),I(!0))},e2=()=>{O(""),I(!0)},e5=()=>{e6?e1():e2()},e3=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],e4=e3?.authModes||[],e6=!!c.zN[r]||!!c.IS[r]||e4.includes("oauth"),e7=!!c.fg[r]||e4.includes("apikey"),e8=!!c.IS[r]?.noAuth,e9=(0,m.KC)(r),te=(0,c.wG)(r),tt=(0,c.mq)(r),ta=(0,c.gb)(r),ts=tt||ta,ti=!ts&&e6&&e7,tl="xai"===r?"Grok Build OAuth":"OAuth",tr="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let tn=ts?r:te,to=ts?v?.prefix||r:te,td=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}`,{cache:"no-store"}),t=await e.json();e.ok&&eD(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tn]),tc=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tn,ids:[e]})})).ok&&await td()}catch(e){console.log("Error disabling model:",e)}},tm=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await td()}catch(e){console.log("Error enabling model:",e)}},tp=async e=>{e.length&&eU({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eU(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tn,ids:e})})).ok&&await td()}catch(e){console.log("Error disabling all models:",e)}}})},tx=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}`,{method:"DELETE"})).ok&&await td()}catch(e){console.log("Error enabling all models:",e)}},tu=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&B(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eP(e.models)}).catch(()=>{})},[r]);let th=(0,i.useCallback)(async()=>{try{let[e,t,a,s]=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"})]),i=await e.json(),l=await t.json(),n=await a.json(),o=s.ok?await s.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);h(e)}a.ok&&w(n.proxyPools||[]),em((o.providerHealthChecks||{})[r]||null);let d=(o.providerStrategies||{})[r]||{};eh(d.fallbackStrategy||null),eb(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1"),ey(d.stickyScope||"global"),ej(null!=d.stickyTtlMinutes?String(d.stickyTtlMinutes):"120"),eN(!1!==d.stickyFallbackToClientIp),eC(!1!==d.stickyRebindOnFailure),eA(null!=d.stickyRebindFailureThreshold?String(d.stickyRebindFailureThreshold):"3");let c=(o.providerThinking||{})[r]||{};if(e$(c.mode||"auto"),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&ts)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}j(e)}}catch(e){console.log("Error fetching connections:",e)}finally{f(!1)}},[r,ts]),tg=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(j(a.node),await th(),M(!1))}catch(e){console.log("Error updating provider node:",e)}},tb=async(e,t,a={})=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),i=(s.ok?await s.json():{}).providerStrategies||{},l={...i[r]||{}};delete l.fallbackStrategy,delete l.stickyRoundRobinLimit,delete l.stickyScope,delete l.stickyTtlMinutes,delete l.stickyFallbackToClientIp,delete l.stickyRebindOnFailure,delete l.stickyRebindFailureThreshold,e&&(l.fallbackStrategy=e),"round-robin"===e&&(l.stickyRoundRobinLimit=Number(t||eg||1)||1,l.stickyScope=a.stickyScope??ef??"global",l.stickyTtlMinutes=Number(a.stickyTtlMinutes??ev??120)||120,l.stickyFallbackToClientIp=void 0!==a.stickyFallbackToClientIp?!!a.stickyFallbackToClientIp:!1!==ek,l.stickyRebindOnFailure=void 0!==a.stickyRebindOnFailure?!!a.stickyRebindOnFailure:!1!==ew,l.stickyRebindFailureThreshold=Number(a.stickyRebindFailureThreshold??eS??3)||3);let n={...i};0===Object.keys(l).length?delete n[r]:n[r]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,i.useEffect)(()=>{th(),tu(),td()},[th,tu,td]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&u(e).then(eR)},[r]);let tf=async(e,t,a=te)=>{let s=`${a}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await tu();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},ty=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tu()}catch(e){console.log("Error deleting alias:",e)}},tv=async()=>{if(ez||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eQ.current=!1,eq(!0),eK(!1),eJ(null),eB(e),eV({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,a=0;try{for(let e=0;e<x.length;e+=1){if(eQ.current){eV({total:x.length,completed:e,passed:t,failed:a,stopped:!0});break}let s=x[e];eJ(s.id),eB(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:a+=1,eB(e=>({...e,[s.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){a+=1,eB(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}eV({total:x.length,completed:e+1,passed:t,failed:a,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eJ(null),eq(!1),eK(!1),eQ.current=!1}},tj=async e=>{ex(t=>({...t,[e]:!0}));try{let t=await fetch("/api/provider-health",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:e})}),a=await t.json().catch(()=>({}));t.ok||alert(a.error||"Health check failed"),await th()}catch(e){console.log("Error running health check:",e),alert(e.message||"Health check failed")}finally{ex(t=>({...t,[e]:!1}))}},tk=async e=>{eU({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eU(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&h(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tN=()=>{th(),S(!1)},tw=async e=>{O("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok){await th(),I(!1);return}O(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),O("Failed to save connection")}},tC=async e=>{try{(await fetch(`/api/providers/${K.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await th(),E(!1))}catch(e){console.log("Error updating connection:",e)}},tS=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("Error updating connection status:",e)}},tA=async(e,t)=>{let a=[...x];[a[e],a[t]]=[a[t],a[e]],h(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await th()}},tT=x.filter(e=>ei.includes(e.id));x.length>0&&(ei.length,x.length),(0,i.useEffect)(()=>{el(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tT.length)return;let e=new Set(tT.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let a=k.find(e=>e.id===t);return a?.name}})();let t$=()=>{eo||L(!1)},tI=async e=>{ed(!0);try{let t=0;for(let{connectionId:a,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",a,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await th(),L(!1)}finally{ed(!1)}},tR=e=>tI(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tO=(0,s.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:x.map((e,t)=>(0,s.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(N,{connection:e,proxyPools:k,isOAuth:e6,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tA(t,t-1),onMoveDown:()=>tA(t,t+1),onToggleActive:t=>tS(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&h(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:{...a.providerSpecificData,proxyPoolId:t||null}}:a))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{H(e),E(!0)},onDelete:()=>tk(e.id),oneByOneStatus:eW[e.id]||null,providerHealthConfig:ec,healthCheckRunning:!!ep[e.id],onRunHealthCheck:()=>tj(e.id)})})},e.id))}),tP=k.filter(e=>!0===e.isActive),tE=(0,s.jsx)(d.aF,{isOpen:_,onClose:t$,title:`Apply Proxy (${x.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=k.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tI(x.map((t,a)=>({connectionId:t.id,proxyPoolId:e[a%e.length].id})))},disabled:eo||0===tP.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>tR(null),disabled:eo,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),k.map(e=>(0,s.jsxs)("button",{onClick:()=>tR(e.id),disabled:eo||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eo&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(d.$n,{onClick:t$,variant:"ghost",fullWidth:!0,disabled:eo,children:"Cancel"})]})}),tD=async e=>{if(!ee){et(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tn}/${e}`})}),a=await t.json();Z(t=>({...t,[e]:a.ok?"ok":"error"})),Y(a.ok?"":a.error||"Model not reachable")}catch{Z(t=>({...t,[e]:"error"})),Y("Network error")}finally{et(null)}}};return g?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(d.Qv,{}),(0,s.jsx)(d.Qv,{})]}):e3?(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e3.color}15`},children:G?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:e3.color},children:e3.textIcon||e3.id.slice(0,2).toUpperCase()}):(0,s.jsx)(o.default,{src:tt&&e3.apiType?"responses"===e3.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ta?"/providers/anthropic-m.png":`/providers/${e3.id}.png`,alt:e3.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>V(!0)})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e3.name}),(e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website)&&(0,s.jsxs)("a",{href:e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e3.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),e3.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e3.deprecationNotice})]}),e3.notice?.text&&!e3.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e3.notice.text}),e3.notice.apiKeyUrl&&(0,s.jsx)("a",{href:e3.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 →"})]}),ts&&v&&(0,s.jsx)(d.Zp,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:ta?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[ta?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",ta?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{O(""),I(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>M(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eU({title:"Delete Compatible Node",message:`Delete this ${ta?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eU(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&a.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ts&&v&&(0,s.jsx)(W,{providerStorageAlias:tn,providerDisplayAlias:to,modelAliases:J}),e8?(0,s.jsx)(d.gw,{providerId:r}):(0,s.jsxs)(d.Zp,{children:[(0,s.jsxs)("div",{className:"mb-5 flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),"round-robin"===eu&&(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Round Robin distributes requests across active accounts for this provider."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 lg:justify-end",children:[x.length>0&&k.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>L(!0),children:"Apply Proxy"}),x.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tv,disabled:ez,children:ez?"Testing Connection One-by-One...":"Test Connection One-by-One"}),ez&&(0,s.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{ez&&(eQ.current=!0,eK(!0))},disabled:eL,children:eL?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-border bg-surface/60 px-3 py-2 shadow-sm",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Round Robin"}),(0,s.jsx)(d.lM,{checked:"round-robin"===eu,onChange:e=>{let t=e?"round-robin":null,a=e?eg||"1":eg;e&&!eg&&eb("1"),eh(t),tb(t,a)}}),"round-robin"===eu&&(0,s.jsxs)("label",{className:"flex items-center gap-1.5 border-l border-border pl-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:eg,onChange:e=>{var t;eb(t=e.target.value),tb("round-robin",t)},placeholder:"1",className:"w-14 rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",title:"How many selections/sessions use the same account before global round-robin advances."})]})]})]})]}),"round-robin"===eu&&(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface/70 p-4 shadow-sm",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 lg:flex-row lg:items-start lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"sticky_note_2"}),(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Provider Round Robin Sticky"})]}),(0,s.jsx)("p",{className:"mt-1 max-w-3xl text-xs leading-relaxed text-text-muted",children:"Choose how this provider keeps the same account/API key/OAuth connection for a client. Leave it on Global to keep the current behavior."})]}),(0,s.jsx)(d.Ex,{variant:"secondary",className:"w-fit shrink-0",children:"Per provider"})]}),(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-3",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky mode"}),(0,s.jsxs)("select",{value:ef,onChange:e=>{var t;ey(t=e.target.value),tb("round-robin",eg||"1",{stickyScope:t})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"global",children:"Global / current behavior"}),(0,s.jsx)("option",{value:"client_ip",children:"Client IP"}),(0,s.jsx)("option",{value:"client_session",children:"Client IP + chat session"})]}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Global rotates like before. Client/session modes keep account identity more stable."})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky TTL minutes"}),(0,s.jsx)("input",{type:"number",min:1,max:10080,value:ev,onChange:e=>{var t;ej(t=e.target.value),tb("round-robin",eg||"1",{stickyTtlMinutes:Number(t)||120})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Sticky assignments stay in memory and expire after this time."})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Rebind after fallback count"}),(0,s.jsx)("input",{type:"number",min:1,max:50,value:eS,onChange:e=>{var t;eA(t=e.target.value),tb("round-robin",eg||"1",{stickyRebindFailureThreshold:Number(t)||3})},disabled:!ew,className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-50"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"After this many temporary fallbacks, the session is rebound to the fallback account."})]})]}),(0,s.jsxs)("div",{className:"mt-4 grid gap-3 lg:grid-cols-2",children:[(0,s.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,s.jsx)("input",{type:"checkbox",checked:ek,onChange:e=>{var t;eN(t=e.target.checked),tb("round-robin",eg||"1",{stickyFallbackToClientIp:t})},className:"mt-0.5"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Fallback to Client IP when session id is missing"}),(0,s.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"Useful when the app does not send a stable chat session id."})]})]}),(0,s.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,s.jsx)("input",{type:"checkbox",checked:ew,onChange:e=>{var t;eC(t=e.target.checked),tb("round-robin",eg||"1",{stickyRebindOnFailure:t})},className:"mt-0.5"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Rebind session after repeated unavailable/rate-limited hits"}),(0,s.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"First fallbacks are temporary; repeated failures switch that sticky session to a healthier account."})]})]})]}),(0,s.jsxs)("div",{className:"mt-4 rounded-xl border border-primary/20 bg-primary/5 px-3 py-2 text-[11px] leading-relaxed text-text-muted",children:["Recommended for Codex/Copilot-style OAuth providers:",(0,s.jsx)("span",{className:"font-medium text-text-main",children:" Client IP + chat session"}),", TTL 120 minutes, Client IP fallback enabled, rebind enabled after 3 fallbacks."]})]})]}),(0,s.jsx)(U,{providerId:r,onSaved:th})," ",0===x.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e6?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),ti&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tl," or ",tr,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:ti?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e1,children:tl}),(0,s.jsx)(d.$n,{size:"sm",icon:"key",onClick:e2,children:tr})]}):(0,s.jsxs)(s.Fragment,{children:[!ts&&"iflow"===r&&(0,s.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>T(!0),children:"Cookie"}),(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:e5,children:ts?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[eG&&(0,s.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,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",eG.total]}),(0,s.jsxs)("span",{children:["Completed: ",eG.completed]}),(0,s.jsxs)("span",{children:["Passed: ",eG.passed]}),(0,s.jsxs)("span",{children:["Failed: ",eG.failed]}),eG.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),ez&&eH&&(0,s.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eH)?.name||eH]})]})}),tO,!ts&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,s.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>T(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),ti?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e1,className:"w-full sm:w-auto",children:tl}),(0,s.jsx)(d.$n,{size:"sm",icon:"key",onClick:e2,className:"w-full sm:w-auto",children:tr})]}):(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:e5,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsxs)(d.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!ts&&(e=[...e9,...eO.filter(e=>!e9.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eE.includes(e)),(0,s.jsxs)("div",{className:"flex gap-2",children:[eE.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tx,children:"Active All"}),e.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tp(e),children:"Disable All"})]}))]}),!!X&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:X}),(()=>{let e,t,a;if(ts)return(0,s.jsx)(y,{providerStorageAlias:tn,providerDisplayAlias:to,modelAliases:J,copied:eZ,onCopy:eX,onSetAlias:tf,onDeleteAlias:ty,connections:x,isAnthropic:ta});let i=[...e9,...eO.filter(e=>!e9.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eE),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),d=Object.entries(J).filter(([e,t])=>{let a=`${tn}/`;if(!t.startsWith(a))return!1;let s=t.slice(a.length);return e3.passthroughModels?!e9.some(e=>e.id===s):!e9.some(e=>e.id===s)&&e===s}).map(([e,t])=>({id:t.slice(`${tn}/`.length),alias:e,fullModel:t}));return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,s.jsx)(b,{model:{id:e.id},fullModel:`${to}/${e.id}`,alias:e.alias,copied:eZ,onCopy:eX,onSetAlias:()=>{},onDeleteAlias:()=>ty(e.alias),testStatus:Q[e.id],onTest:x.length>0||e8?()=>tD(e.id):void 0,isTesting:ee===e.id,isCustom:!0,isFree:!1},e.id)),n.map(e=>{let t=`${tn}/${e.id}`,a=`${r}/${e.id}`,i=Object.entries(J).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(b,{model:e,fullModel:`${to}/${e.id}`,alias:i,copied:eZ,onCopy:eX,onSetAlias:t=>tf(e.id,t,tn),onDeleteAlias:()=>ty(i),testStatus:Q[e.id],onTest:x.length>0||e8?()=>tD(e.id):void 0,isTesting:ee===e.id,isFree:e.isFree,onDisable:()=>tc(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>es(!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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),eI.length>0&&(e=new Set(Object.values(J)),t=new Set(e9.map(e=>e.id)),0===(a=eI.filter(a=>!e.has(`${tn}/${a.id}`)&&!t.has(a.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>(0,s.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tf(e.id,t,tn)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,s.jsxs)("button",{onClick:()=>tm(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tE,"kiro"===r?(0,s.jsx)(d.Mh,{isOpen:C,providerInfo:e3,onSuccess:tN,onClose:()=>S(!1)}):"cursor"===r?(0,s.jsx)(d.G9,{isOpen:C,onSuccess:tN,onClose:()=>S(!1)}):"gitlab"===r?(0,s.jsx)(d.vj,{isOpen:C,providerInfo:e3,onSuccess:tN,onClose:()=>S(!1)}):(0,s.jsx)(d.LF,{isOpen:C,provider:r,providerInfo:e3,onSuccess:tN,onClose:()=>S(!1)}),"iflow"===r&&(0,s.jsx)(d.vE,{isOpen:A,onSuccess:()=>{th(),T(!1)},onClose:()=>T(!1)}),(0,s.jsx)(F,{isOpen:$,provider:r,providerName:e3.name,isCompatible:ts,isAnthropic:ta,authType:e3?.authType,authHint:e3?.authHint,website:e3?.website,proxyPools:k,error:R,onSave:tw,onBulkDone:th,onClose:()=>{O(""),I(!1)}}),(0,s.jsx)(d.wI,{isOpen:P,connection:K,proxyPools:k,onSave:tC,onClose:()=>E(!1)}),ts&&(0,s.jsx)(z,{isOpen:D,node:v,onSave:tg,onClose:()=>M(!1),isAnthropic:ta}),!ts&&(0,s.jsx)(q,{isOpen:ea,providerAlias:tn,providerDisplayAlias:to,onSave:async e=>{let t=e3?.passthroughModels?e.split("/").pop():e;await tf(e,t,tn),es(!1)},onClose:()=>es(!1)}),(0,s.jsx)(d.uo,{isOpen:e_,onClose:()=>eF(!1),onConfirm:()=>{(window.localStorage.setItem(eY,"true"),eF(!1),e6)?e0():e2()},title:"Risk Notice",message:e3?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(d.uo,{isOpen:!!eM,onClose:()=>eU(null),onConfirm:eM?.onConfirm,title:eM?.title||"Confirm",message:eM?.message,variant:"danger"})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}B.propTypes={label:g().string.isRequired,hint:g().string,value:g().string.isRequired,onChange:g().func.isRequired,disabled:g().bool},W.propTypes={providerStorageAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,modelAliases:g().object.isRequired}}},e=>{e.O(0,[2574,3862,246,5792,5772,5564,5263,5497,8441,3794,7358],()=>e(e.s=18205)),_N_E=e.O()}]);
3
+ sk-key-only-auto-named`;function F({isOpen:e,provider:t,providerName:a,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:p,error:x,onSave:u,onBulkDone:h,onClose:g}){let b="__none__",f="ollama-local"===t,y="cookie"===n,v="xai"===t&&!y,j=y?"Cookie Value":"API Key",k="azure"===t,N="cloudflare-ai"===t,w=c.Q2?.[t]?.regions||null,C=c.Q2?.[t]?.defaultRegion||w?.[0]?.id||"",[S,A]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:b,ollamaHostUrl:""}),[T,$]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,R]=(0,i.useState)({accountId:""}),[O,P]=(0,i.useState)(C),[E,D]=(0,i.useState)(!1),[M,U]=(0,i.useState)(null),[z,q]=(0,i.useState)(!1),[L,K]=(0,i.useState)("single"),[H,J]=(0,i.useState)(""),[W,B]=(0,i.useState)(null),G=()=>f&&S.ollamaHostUrl.trim()?{baseUrl:S.ollamaHostUrl.trim()}:k?{azureEndpoint:T.azureEndpoint,apiVersion:T.apiVersion,deployment:T.deployment,organization:T.organization}:N?{accountId:I.accountId}:w&&O?{region:O}:void 0,V=async()=>{D(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})}),a=await e.json();U(a.valid?"success":"failed")}catch{U("failed")}finally{D(!1)}},Q=async()=>{if(t&&(f||S.apiKey)&&(f||S.name)&&(!l||S.defaultModel.trim())){q(!0);try{let e=!1;try{D(!0),U(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})});e=!!(await a.json()).valid,U(e?"success":"failed")}catch{U("failed")}finally{D(!1)}await u({name:S.name||(f?"Ollama Local":""),apiKey:S.apiKey,defaultModel:l?S.defaultModel.trim():void 0,priority:S.priority,proxyPoolId:S.proxyPoolId===b?null:S.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:G()})}finally{q(!1)}}},Z=async()=>{let e=H.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;q(!0),B(null);let a=0,s=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?a++:s++}catch{s++}}q(!1),B({success:a,failed:s}),a>0&&h&&h()};return t?(0,s.jsx)(d.aF,{isOpen:e,title:`Add ${a||t} ${j}`,onClose:g,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{size:"sm",variant:"single"===L?"primary":"ghost",onClick:()=>{K("single"),B(null)},children:"Single"}),(0,s.jsx)(d.$n,{size:"sm",variant:"bulk"===L?"primary":"ghost",onClick:()=>{K("bulk"),B(null)},children:"Bulk Add"})]}),"bulk"===L&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:_,value:H,onChange:e=>J(e.target.value)}),W&&(0,s.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,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:z||!H.trim(),children:z?"Adding...":"Add All Keys"}),(0,s.jsx)(d.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===L&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.pd,{label:"Name",value:S.name,onChange:e=>A({...S,name:e.target.value}),placeholder:f?"Ollama Local":"Production Key"}),f&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:"Ollama Host URL",value:S.ollamaHostUrl,onChange:e=>A({...S,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:V,disabled:E||z,variant:"secondary",children:E?"Checking...":"Check"})})]}),!f&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:j,type:y?"text":"password",value:S.apiKey,onChange:e=>A({...S,apiKey:e.target.value}),placeholder:y?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:V,disabled:!S.apiKey||E||z,variant:"secondary",children:E?"Checking...":"Check"})})]}),v&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),y&&o&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),w&&(0,s.jsx)(d.l6,{label:"Region",value:O,onChange:e=>P(e.target.value),options:w.map(e=>({value:e.id,label:e.label}))}),l&&(0,s.jsx)(d.pd,{label:"Default Model",value:S.defaultModel,onChange:e=>A({...S,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),f&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,s.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,s.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),M&&(0,s.jsx)(d.Ex,{variant:"success"===M?"success":"error",children:"success"===M?"Valid":"Invalid"}),x&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),N&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,s.jsx)(d.pd,{label:"Account ID",value:I.accountId,onChange:e=>R({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,s.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(d.pd,{label:"Azure Endpoint",value:T.azureEndpoint,onChange:e=>$({...T,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,s.jsx)(d.pd,{label:"Deployment Name",value:T.deployment,onChange:e=>$({...T,deployment:e.target.value}),placeholder:"gpt-4"}),(0,s.jsx)(d.pd,{label:"API Version",value:T.apiVersion,onChange:e=>$({...T,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,s.jsx)(d.pd,{label:"Organization",value:T.organization,onChange:e=>$({...T,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,s.jsx)(d.pd,{label:"Priority",type:"number",value:S.priority,onChange:e=>A({...S,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsx)(d.l6,{label:"Proxy Pool",value:S.proxyPoolId,onChange:e=>A({...S,proxyPoolId:e.target.value}),options:[{value:b,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:Q,fullWidth:!0,disabled:z||!f&&(!S.name||!S.apiKey)||l&&!S.defaultModel.trim()||k&&(!T.azureEndpoint||!T.deployment||!T.organization)||N&&!I.accountId,children:z?"Saving...":"Save"}),(0,s.jsx)(d.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function z({isOpen:e,node:t,onSave:a,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1",openAICompatibleRuntime:c.hb,routingTags:"",maxInFlight:""}),[m,p]=(0,i.useState)(!1),[x,u]=(0,i.useState)(""),[h,g]=(0,i.useState)(""),[b,f]=(0,i.useState)(!1),[y,v]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1"),openAICompatibleRuntime:t.openAICompatibleRuntime||t.providerSpecificData?.openAICompatibleRuntime||c.hb,routingTags:Array.isArray(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags)?(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags).join(", "):t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags||"",maxInFlight:t.providerSpecificData?.maxInFlight||t.maxInFlight||""})},[t,r]);let j=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e=String(n.routingTags||"").split(/[\n,;]+/).map(e=>e.trim()).filter(Boolean),s=Number(n.maxInFlight),i={...t.providerSpecificData||{},routingTags:e,tags:e};Number.isFinite(s)&&s>0?i.maxInFlight=s:delete i.maxInFlight;let l={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl,routingTags:e,tags:e,providerSpecificData:i};r||(l.apiType=n.apiType,l.openAICompatibleRuntime=n.openAICompatibleRuntime),await a(l)}finally{p(!1)}}},k=async()=>{f(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:x,type:r?"anthropic-compatible":"openai-compatible",modelId:h.trim()||void 0})}),t=await e.json();v(t.valid?"success":"failed")}catch{v("failed")}finally{f(!1)}};return t?(0,s.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,s.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,s.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),!r&&(0,s.jsx)(d.l6,{label:"Server Type",options:c._8,value:n.openAICompatibleRuntime,onChange:e=>o({...n,openAICompatibleRuntime:e.target.value}),hint:c._8.find(e=>e.value===n.openAICompatibleRuntime)?.description||"Controls how BlueRouter maps thinking/reasoning params for this endpoint."}),(0,s.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,s.jsx)(d.pd,{label:"Routing Tags / Labels",value:n.routingTags,onChange:e=>o({...n,routingTags:e.target.value}),placeholder:"gpu, vram:8gb, model_support:qwen3:8b",hint:"Comma or newline separated. Used by Combo least-latency/P2C tag rules for LAN Ollama."}),(0,s.jsx)(d.pd,{label:"Max In-flight Requests",type:"number",value:n.maxInFlight,onChange:e=>o({...n,maxInFlight:e.target.value}),placeholder:"2",hint:"Optional per-endpoint concurrency cap used by P2C and circuit-aware routing."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:x,onChange:e=>u(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:k,disabled:!x||b||!n.baseUrl.trim(),variant:"secondary",children:b?"Checking...":"Check"})})]}),(0,s.jsx)(d.pd,{label:"Model ID (optional)",value:h,onChange:e=>g(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,s.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:j,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||m,children:m?"Saving...":"Save"}),(0,s.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function q({isOpen:e,providerAlias:t,providerDisplayAlias:a,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,m]=(0,i.useState)(null),[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),m(null),x(""))},[e]);let g=e=>{let a=`${t}/`;return e.startsWith(a)?e.slice(a.length):e},b=async()=>{let e=g(n.trim());if(e){m("testing"),x("");try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),s=await a.json();m(s.ok?"ok":"error"),x(s.error||"")}catch(e){m("error"),x(e.message)}}},f=async()=>{let e=g(n.trim());if(e&&!u){h(!0);try{await l(e)}finally{h(!1)}}};return(0,s.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),m(null),x("")},onKeyDown:e=>{"Enter"===e.key&&b()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,s.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:b,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,s.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:g(n.trim())||"model-id"})]})]}),"ok"===c&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,s.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,s.jsx)("span",{children:p||"Model not reachable"})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(d.$n,{onClick:f,fullWidth:!0,size:"sm",disabled:!n.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}F.propTypes={isOpen:g().bool.isRequired,provider:g().string,providerName:g().string,isCompatible:g().bool,isAnthropic:g().bool,authType:g().string,authHint:g().string,website:g().string,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string})),error:g().string,onSave:g().func.isRequired,onBulkDone:g().func,onClose:g().func.isRequired},z.propTypes={isOpen:g().bool.isRequired,node:g().shape({id:g().string,name:g().string,prefix:g().string,apiType:g().string,openAICompatibleRuntime:g().string,baseUrl:g().string,providerSpecificData:g().object,tags:g().oneOfType([g().string,g().array]),maxInFlight:g().oneOfType([g().string,g().number])}),onSave:g().func.isRequired,onClose:g().func.isRequired,isAnthropic:g().bool},q.propTypes={isOpen:g().bool.isRequired,providerAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,onSave:g().func.isRequired,onClose:g().func.isRequired};var L=a(65921);let K=[{key:"cached",label:"Cached input",hint:"Per 1M tokens"},{key:"reasoning",label:"Reasoning",hint:"Per 1M tokens"},{key:"cache_creation",label:"Cache creation",hint:"Per 1M tokens"}];function H(e){if(null==e||""===e)return"";let t=Number(e);return Number.isFinite(t)?String(t):""}function J(e,t,a){let s=t||a||{};return{modelId:e,isOverride:!!t,defaults:a||null,input:H(s.input),output:H(s.output),cached:H(s.cached),reasoning:H(s.reasoning),cache_creation:H(s.cache_creation)}}function W({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:a}){let l=(0,L.i)(),[r,n]=(0,i.useState)({}),[o,c]=(0,i.useState)(!0),[m,p]=(0,i.useState)(null),[x,u]=(0,i.useState)({}),[h,g]=(0,i.useState)({}),[b,f]=(0,i.useState)(()=>new Set),[y,v]=(0,i.useState)({}),[j,k]=(0,i.useState)(null),[N,w]=(0,i.useState)(!1),C=(0,i.useMemo)(()=>{let t=`${e}/`,s=[];for(let e of Object.values(a||{})){if(!e.startsWith(t))continue;let a=e.slice(t.length);a&&!s.includes(a)&&s.push(a)}return s.sort((e,t)=>e.localeCompare(t))},[a,e]),S=async()=>{try{let t=await fetch("/api/pricing",{cache:"no-store"});if(!t.ok)return;let a=await t.json(),s=a?.[e]||{};n(s)}catch(e){console.log("Error fetching pricing:",e)}finally{c(!1)}};(0,i.useEffect)(()=>{c(!0),S()},[e]),(0,i.useEffect)(()=>{g(e=>{let t={};for(let a of C){if(b.has(a)&&e[a]){t[a]=e[a];continue}t[a]=J(a,r[a],null)}return t})},[C.join("|"),JSON.stringify(r)]);let A=(e,t,a)=>{g(s=>({...s,[e]:{...s[e],[t]:a}})),f(t=>{if(t.has(e))return t;let a=new Set(t);return a.add(e),a}),y[e]&&v(t=>{let a={...t};return delete a[e],a})},T=async t=>{let a,s=h[t];if(s){try{a=function(e){let t={};for(let a of["input","output","cached","reasoning","cache_creation"]){if(""===e[a]||null===e[a]||void 0===e[a])continue;let s=Number(e[a]);if(!Number.isFinite(s)||s<0)throw Error(`Invalid ${a}: must be ≥ 0`);t[a]=s}if(void 0===t.input&&void 0===t.output)throw Error("Set at least input and output");return t}(s)}catch(e){v(a=>({...a,[t]:e.message}));return}p(t);try{let s=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:{[t]:a}})}),i=await s.json();if(!s.ok)return void v(e=>({...e,[t]:i?.error||"Failed to save"}));n(i?.[e]||{}),f(e=>{if(!e.has(t))return e;let a=new Set(e);return a.delete(t),a}),v(e=>{let a={...e};return delete a[t],a}),l?.success?.(`Pricing saved for ${t}`)}catch(e){v(a=>({...a,[t]:e?.message||"Network error"}))}finally{p(null)}}},$=async t=>{p(t);try{let a=`/api/pricing?provider=${encodeURIComponent(e)}&model=${encodeURIComponent(t)}`,s=await fetch(a,{method:"DELETE"}),i=await s.json();if(!s.ok)return void v(e=>({...e,[t]:i?.error||"Failed to reset"}));n(i?.[e]||{}),f(e=>{if(!e.has(t))return e;let a=new Set(e);return a.delete(t),a}),l?.info?.(`Pricing reset for ${t}`)}catch(e){v(a=>({...a,[t]:e?.message||"Network error"}))}finally{p(null)}},I=async()=>{if(j){w(!0);try{let e=await fetch("/api/pricing/recalculate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j.payload||{})}),t=await e.json();if(!e.ok)return void l?.error?.(t?.error||"Recalculate failed");let a=t.skippedNoPricing?` \xb7 skipped ${t.skippedNoPricing} (no pricing)`:"";l?.success?.(`Recalculated ${t.rowsUpdated} row${1===t.rowsUpdated?"":"s"} across ${t.groupsUpdated} model${1===t.groupsUpdated?"":"s"}${a}`)}catch(e){l?.error?.(e?.message||"Network error")}finally{w(!1),k(null)}}};return(0,s.jsxs)(d.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted",children:"payments"}),(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Model Pricing"}),(0,s.jsx)(d.Ex,{variant:"secondary",size:"sm",children:"Per 1M tokens"})]}),(0,s.jsxs)("p",{className:"mt-1 text-xs leading-relaxed text-text-muted",children:["Set custom input/output rates used by the Usage dashboard to estimate cost for"," ",(0,s.jsx)("code",{className:"rounded bg-sidebar px-1.5 py-0.5 font-mono text-[11px]",children:t}),". Overrides apply only to this custom endpoint; falls back to built-in pricing tables when unset. New rates take effect on the next request — use"," ",(0,s.jsx)("span",{className:"font-medium text-text-main",children:"Recalc cost"})," to rewrite past rows."]})]}),C.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>{k({scope:"provider",label:`all models on ${t}`,payload:{provider:e}})},disabled:N,className:"shrink-0",children:"Recalc all"})]}),o?(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Loading pricing..."}):0===C.length?(0,s.jsx)("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center text-sm text-text-muted",children:"Add models in the section below first — pricing can then be set per model here."}):(0,s.jsx)("div",{className:"flex flex-col gap-3",children:C.map(a=>{let i=h[a]||J(a,r[a],null),l=!!r[a],n=!!x[a],o=(e=>{let t=h[e];if(!t)return!1;let a=r[e];if(!a)return!!(t.input||t.output||t.cached||t.reasoning||t.cache_creation);for(let e of["input","output","cached","reasoning","cache_creation"])if(((""===t[e]?null:Number(t[e]))??null)!==((void 0===a[e]?null:Number(a[e]))??null))return!0;return!1})(a),c=y[a],p=m===a;return(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface-2/40 p-3 sm:p-4",children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"smart_toy"}),(0,s.jsx)("code",{className:"truncate font-mono text-sm font-semibold text-text-main",children:a}),l?(0,s.jsx)(d.Ex,{variant:"success",size:"sm",children:"Override"}):(0,s.jsx)(d.Ex,{variant:"default",size:"sm",children:"Default"})]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:(0,s.jsxs)("button",{type:"button",onClick:()=>{u(e=>({...e,[a]:!e[a]}))},className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:n?"expand_less":"tune"}),n?"Hide advanced":"Advanced"]})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,s.jsx)(B,{label:"Input",hint:"$ per 1M input tokens",value:i.input,onChange:e=>A(a,"input",e),disabled:p}),(0,s.jsx)(B,{label:"Output",hint:"$ per 1M output tokens",value:i.output,onChange:e=>A(a,"output",e),disabled:p})]}),n&&(0,s.jsx)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-3",children:K.map(e=>(0,s.jsx)(B,{label:e.label,hint:e.hint,value:i[e.key],onChange:t=>A(a,e.key,t),disabled:p},e.key))}),c&&(0,s.jsxs)("p",{className:"mt-2 flex items-center gap-1 text-xs text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),c]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-end",children:[(0,s.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"calculate",onClick:()=>{k({scope:"model",label:`${t}/${a}`,payload:{provider:e,model:a}})},disabled:p||N,title:"Rewrite past usage rows for this model with current pricing",children:"Recalc cost"}),l&&(0,s.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"restart_alt",onClick:()=>$(a),disabled:p,children:"Reset to default"}),(0,s.jsx)(d.$n,{size:"sm",icon:"save",onClick:()=>T(a),disabled:p||!o,children:p?"Saving...":o?"Save":"Saved"})]})]},a)})}),(0,s.jsx)(d.uo,{isOpen:!!j,onClose:()=>!N&&k(null),onConfirm:I,title:"Recalculate cost",message:j?`Rewrite the cost column on past usage rows for ${j.label} using the current pricing? This overwrites whatever cost was stored at request time.`:"",confirmText:N?"Recalculating...":"Recalculate",cancelText:"Cancel"})]})}function B({label:e,hint:t,value:a,onChange:i,disabled:l}){return(0,s.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("span",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-sm text-text-muted",children:"$"}),(0,s.jsx)("input",{type:"number",step:"0.0001",min:0,value:a,onChange:e=>i(e.target.value),disabled:l,placeholder:"0.00",className:"w-full rounded-[10px] border border-transparent bg-surface-2 py-2.5 pl-7 pr-3 text-[16px] text-text-main placeholder-text-muted/70 transition-all duration-150 ease-out focus:border-brand-500/40 focus:outline-none focus:ring-2 focus:ring-brand-500/30 disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm"})]}),t&&(0,s.jsx)("span",{className:"text-[11px] text-text-muted",children:t})]})}function G(){let e,t=(0,l.useParams)(),a=(0,l.useRouter)(),r=t.id,[x,h]=(0,i.useState)([]),[g,f]=(0,i.useState)(!0),[v,j]=(0,i.useState)(null),[k,w]=(0,i.useState)([]),[C,S]=(0,i.useState)(!1),[A,T]=(0,i.useState)(!1),[$,I]=(0,i.useState)(!1),[R,O]=(0,i.useState)(""),[P,E]=(0,i.useState)(!1),[D,M]=(0,i.useState)(!1),[_,L]=(0,i.useState)(!1),[K,H]=(0,i.useState)(null),[J,B]=(0,i.useState)({}),[G,V]=(0,i.useState)(!1),[Q,Z]=(0,i.useState)({}),[X,Y]=(0,i.useState)(""),[ee,et]=(0,i.useState)(null),[ea,es]=(0,i.useState)(!1),[ei,el]=(0,i.useState)([]),[er,en]=(0,i.useState)("__none__"),[eo,ed]=(0,i.useState)(!1),[ec,em]=(0,i.useState)(null),[ep,ex]=(0,i.useState)({}),[eu,eh]=(0,i.useState)(null),[eg,eb]=(0,i.useState)(""),[ef,ey]=(0,i.useState)("global"),[ev,ej]=(0,i.useState)("120"),[ek,eN]=(0,i.useState)(!0),[ew,eC]=(0,i.useState)(!0),[eS,eA]=(0,i.useState)("3"),[eT,e$]=(0,i.useState)("auto"),[eI,eR]=(0,i.useState)([]),[eO,eP]=(0,i.useState)([]),[eE,eD]=(0,i.useState)([]),[eM,eU]=(0,i.useState)(null),[e_,eF]=(0,i.useState)(!1),[ez,eq]=(0,i.useState)(!1),[eL,eK]=(0,i.useState)(!1),[eH,eJ]=(0,i.useState)(null),[eW,eB]=(0,i.useState)({}),[eG,eV]=(0,i.useState)(null),eQ=(0,i.useRef)(!1),{copied:eZ,copy:eX}=(0,p.C)(),eY="ag_risk_confirmed",e0=()=>{S(!0)},e1=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(eY)?eF(!0):e6?e0():(O(""),I(!0))},e2=()=>{O(""),I(!0)},e5=()=>{e6?e1():e2()},e3=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],e4=e3?.authModes||[],e6=!!c.zN[r]||!!c.IS[r]||e4.includes("oauth"),e7=!!c.fg[r]||e4.includes("apikey"),e8=!!c.IS[r]?.noAuth,e9=(0,m.KC)(r),te=(0,c.wG)(r),tt=(0,c.mq)(r),ta=(0,c.gb)(r),ts=tt||ta,ti=!ts&&e6&&e7,tl="xai"===r?"Grok Build OAuth":"OAuth",tr="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let tn=ts?r:te,to=ts?v?.prefix||r:te,td=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}`,{cache:"no-store"}),t=await e.json();e.ok&&eD(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tn]),tc=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tn,ids:[e]})})).ok&&await td()}catch(e){console.log("Error disabling model:",e)}},tm=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await td()}catch(e){console.log("Error enabling model:",e)}},tp=async e=>{e.length&&eU({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eU(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tn,ids:e})})).ok&&await td()}catch(e){console.log("Error disabling all models:",e)}}})},tx=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}`,{method:"DELETE"})).ok&&await td()}catch(e){console.log("Error enabling all models:",e)}},tu=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&B(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eP(e.models)}).catch(()=>{})},[r]);let th=(0,i.useCallback)(async()=>{try{let[e,t,a,s]=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"})]),i=await e.json(),l=await t.json(),n=await a.json(),o=s.ok?await s.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);h(e)}a.ok&&w(n.proxyPools||[]),em((o.providerHealthChecks||{})[r]||null);let d=(o.providerStrategies||{})[r]||{};eh(d.fallbackStrategy||null),eb(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1"),ey(d.stickyScope||"global"),ej(null!=d.stickyTtlMinutes?String(d.stickyTtlMinutes):"120"),eN(!1!==d.stickyFallbackToClientIp),eC(!1!==d.stickyRebindOnFailure),eA(null!=d.stickyRebindFailureThreshold?String(d.stickyRebindFailureThreshold):"3");let c=(o.providerThinking||{})[r]||{};if(e$(c.mode||"auto"),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&ts)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}j(e)}}catch(e){console.log("Error fetching connections:",e)}finally{f(!1)}},[r,ts]),tg=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(j(a.node),await th(),M(!1))}catch(e){console.log("Error updating provider node:",e)}},tb=async(e,t,a={})=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),i=(s.ok?await s.json():{}).providerStrategies||{},l={...i[r]||{}};delete l.fallbackStrategy,delete l.stickyRoundRobinLimit,delete l.stickyScope,delete l.stickyTtlMinutes,delete l.stickyFallbackToClientIp,delete l.stickyRebindOnFailure,delete l.stickyRebindFailureThreshold,e&&(l.fallbackStrategy=e),"round-robin"===e&&(l.stickyRoundRobinLimit=Number(t||eg||1)||1,l.stickyScope=a.stickyScope??ef??"global",l.stickyTtlMinutes=Number(a.stickyTtlMinutes??ev??120)||120,l.stickyFallbackToClientIp=void 0!==a.stickyFallbackToClientIp?!!a.stickyFallbackToClientIp:!1!==ek,l.stickyRebindOnFailure=void 0!==a.stickyRebindOnFailure?!!a.stickyRebindOnFailure:!1!==ew,l.stickyRebindFailureThreshold=Number(a.stickyRebindFailureThreshold??eS??3)||3);let n={...i};0===Object.keys(l).length?delete n[r]:n[r]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,i.useEffect)(()=>{th(),tu(),td()},[th,tu,td]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&u(e).then(eR)},[r]);let tf=async(e,t,a=te)=>{let s=`${a}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await tu();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},ty=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tu()}catch(e){console.log("Error deleting alias:",e)}},tv=async()=>{if(ez||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eQ.current=!1,eq(!0),eK(!1),eJ(null),eB(e),eV({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,a=0;try{for(let e=0;e<x.length;e+=1){if(eQ.current){eV({total:x.length,completed:e,passed:t,failed:a,stopped:!0});break}let s=x[e];eJ(s.id),eB(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:a+=1,eB(e=>({...e,[s.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){a+=1,eB(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}eV({total:x.length,completed:e+1,passed:t,failed:a,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eJ(null),eq(!1),eK(!1),eQ.current=!1}},tj=async e=>{ex(t=>({...t,[e]:!0}));try{let t=await fetch("/api/provider-health",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:e})}),a=await t.json().catch(()=>({}));t.ok||alert(a.error||"Health check failed"),await th()}catch(e){console.log("Error running health check:",e),alert(e.message||"Health check failed")}finally{ex(t=>({...t,[e]:!1}))}},tk=async e=>{eU({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eU(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&h(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tN=()=>{th(),S(!1)},tw=async e=>{O("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok){await th(),I(!1);return}O(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),O("Failed to save connection")}},tC=async e=>{try{(await fetch(`/api/providers/${K.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await th(),E(!1))}catch(e){console.log("Error updating connection:",e)}},tS=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("Error updating connection status:",e)}},tA=async(e,t)=>{let a=[...x];[a[e],a[t]]=[a[t],a[e]],h(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await th()}},tT=x.filter(e=>ei.includes(e.id));x.length>0&&(ei.length,x.length),(0,i.useEffect)(()=>{el(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tT.length)return;let e=new Set(tT.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let a=k.find(e=>e.id===t);return a?.name}})();let t$=()=>{eo||L(!1)},tI=async e=>{ed(!0);try{let t=0;for(let{connectionId:a,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",a,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await th(),L(!1)}finally{ed(!1)}},tR=e=>tI(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tO=(0,s.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:x.map((e,t)=>(0,s.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(N,{connection:e,proxyPools:k,isOAuth:e6,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tA(t,t-1),onMoveDown:()=>tA(t,t+1),onToggleActive:t=>tS(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&h(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:{...a.providerSpecificData,proxyPoolId:t||null}}:a))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{H(e),E(!0)},onDelete:()=>tk(e.id),oneByOneStatus:eW[e.id]||null,providerHealthConfig:ec,healthCheckRunning:!!ep[e.id],onRunHealthCheck:()=>tj(e.id)})})},e.id))}),tP=k.filter(e=>!0===e.isActive),tE=(0,s.jsx)(d.aF,{isOpen:_,onClose:t$,title:`Apply Proxy (${x.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=k.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tI(x.map((t,a)=>({connectionId:t.id,proxyPoolId:e[a%e.length].id})))},disabled:eo||0===tP.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>tR(null),disabled:eo,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),k.map(e=>(0,s.jsxs)("button",{onClick:()=>tR(e.id),disabled:eo||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eo&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(d.$n,{onClick:t$,variant:"ghost",fullWidth:!0,disabled:eo,children:"Cancel"})]})}),tD=async e=>{if(!ee){et(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tn}/${e}`})}),a=await t.json();Z(t=>({...t,[e]:a.ok?"ok":"error"})),Y(a.ok?"":a.error||"Model not reachable")}catch{Z(t=>({...t,[e]:"error"})),Y("Network error")}finally{et(null)}}};return g?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(d.Qv,{}),(0,s.jsx)(d.Qv,{})]}):e3?(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e3.color}15`},children:G?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:e3.color},children:e3.textIcon||e3.id.slice(0,2).toUpperCase()}):(0,s.jsx)(o.default,{src:tt&&e3.apiType?"responses"===e3.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ta?"/providers/anthropic-m.png":`/providers/${e3.id}.png`,alt:e3.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>V(!0)})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e3.name}),(e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website)&&(0,s.jsxs)("a",{href:e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e3.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),e3.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e3.deprecationNotice})]}),e3.notice?.text&&!e3.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e3.notice.text}),e3.notice.apiKeyUrl&&(0,s.jsx)("a",{href:e3.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 →"})]}),ts&&v&&(0,s.jsx)(d.Zp,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:ta?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[ta?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",ta?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{O(""),I(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>M(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eU({title:"Delete Compatible Node",message:`Delete this ${ta?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eU(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&a.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ts&&v&&(0,s.jsx)(W,{providerStorageAlias:tn,providerDisplayAlias:to,modelAliases:J}),e8?(0,s.jsx)(d.gw,{providerId:r}):(0,s.jsxs)(d.Zp,{children:[(0,s.jsxs)("div",{className:"mb-5 flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),"round-robin"===eu&&(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Round Robin distributes requests across active accounts for this provider."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 lg:justify-end",children:[x.length>0&&k.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>L(!0),children:"Apply Proxy"}),x.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tv,disabled:ez,children:ez?"Testing Connection One-by-One...":"Test Connection One-by-One"}),ez&&(0,s.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{ez&&(eQ.current=!0,eK(!0))},disabled:eL,children:eL?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-border bg-surface/60 px-3 py-2 shadow-sm",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Round Robin"}),(0,s.jsx)(d.lM,{checked:"round-robin"===eu,onChange:e=>{let t=e?"round-robin":null,a=e?eg||"1":eg;e&&!eg&&eb("1"),eh(t),tb(t,a)}}),"round-robin"===eu&&(0,s.jsxs)("label",{className:"flex items-center gap-1.5 border-l border-border pl-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:eg,onChange:e=>{var t;eb(t=e.target.value),tb("round-robin",t)},placeholder:"1",className:"w-14 rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",title:"How many selections/sessions use the same account before global round-robin advances."})]})]})]})]}),"round-robin"===eu&&(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface/70 p-4 shadow-sm",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 lg:flex-row lg:items-start lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"sticky_note_2"}),(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Provider Round Robin Sticky"})]}),(0,s.jsx)("p",{className:"mt-1 max-w-3xl text-xs leading-relaxed text-text-muted",children:"Choose how this provider keeps the same account/API key/OAuth connection for a client. Leave it on Global to keep the current behavior."})]}),(0,s.jsx)(d.Ex,{variant:"secondary",className:"w-fit shrink-0",children:"Per provider"})]}),(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-3",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky mode"}),(0,s.jsxs)("select",{value:ef,onChange:e=>{var t;ey(t=e.target.value),tb("round-robin",eg||"1",{stickyScope:t})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"global",children:"Global / current behavior"}),(0,s.jsx)("option",{value:"client_ip",children:"Client IP"}),(0,s.jsx)("option",{value:"client_session",children:"Client IP + chat session"})]}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Global rotates like before. Client/session modes keep account identity more stable."})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky TTL minutes"}),(0,s.jsx)("input",{type:"number",min:1,max:10080,value:ev,onChange:e=>{var t;ej(t=e.target.value),tb("round-robin",eg||"1",{stickyTtlMinutes:Number(t)||120})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Sticky assignments stay in memory and expire after this time."})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Rebind after fallback count"}),(0,s.jsx)("input",{type:"number",min:1,max:50,value:eS,onChange:e=>{var t;eA(t=e.target.value),tb("round-robin",eg||"1",{stickyRebindFailureThreshold:Number(t)||3})},disabled:!ew,className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-50"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"After this many temporary fallbacks, the session is rebound to the fallback account."})]})]}),(0,s.jsxs)("div",{className:"mt-4 grid gap-3 lg:grid-cols-2",children:[(0,s.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,s.jsx)("input",{type:"checkbox",checked:ek,onChange:e=>{var t;eN(t=e.target.checked),tb("round-robin",eg||"1",{stickyFallbackToClientIp:t})},className:"mt-0.5"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Fallback to Client IP when session id is missing"}),(0,s.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"Useful when the app does not send a stable chat session id."})]})]}),(0,s.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,s.jsx)("input",{type:"checkbox",checked:ew,onChange:e=>{var t;eC(t=e.target.checked),tb("round-robin",eg||"1",{stickyRebindOnFailure:t})},className:"mt-0.5"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Rebind session after repeated unavailable/rate-limited hits"}),(0,s.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"First fallbacks are temporary; repeated failures switch that sticky session to a healthier account."})]})]})]}),(0,s.jsxs)("div",{className:"mt-4 rounded-xl border border-primary/20 bg-primary/5 px-3 py-2 text-[11px] leading-relaxed text-text-muted",children:["Recommended for Codex/Copilot-style OAuth providers:",(0,s.jsx)("span",{className:"font-medium text-text-main",children:" Client IP + chat session"}),", TTL 120 minutes, Client IP fallback enabled, rebind enabled after 3 fallbacks."]})]})]}),(0,s.jsx)(U,{providerId:r,onSaved:th})," ",0===x.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e6?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),ti&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tl," or ",tr,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:ti?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e1,children:tl}),(0,s.jsx)(d.$n,{size:"sm",icon:"key",onClick:e2,children:tr})]}):(0,s.jsxs)(s.Fragment,{children:[!ts&&"iflow"===r&&(0,s.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>T(!0),children:"Cookie"}),(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:e5,children:ts?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[eG&&(0,s.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,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",eG.total]}),(0,s.jsxs)("span",{children:["Completed: ",eG.completed]}),(0,s.jsxs)("span",{children:["Passed: ",eG.passed]}),(0,s.jsxs)("span",{children:["Failed: ",eG.failed]}),eG.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),ez&&eH&&(0,s.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eH)?.name||eH]})]})}),tO,!ts&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,s.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>T(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),ti?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e1,className:"w-full sm:w-auto",children:tl}),(0,s.jsx)(d.$n,{size:"sm",icon:"key",onClick:e2,className:"w-full sm:w-auto",children:tr})]}):(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:e5,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsxs)(d.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!ts&&(e=[...e9,...eO.filter(e=>!e9.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eE.includes(e)),(0,s.jsxs)("div",{className:"flex gap-2",children:[eE.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tx,children:"Active All"}),e.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tp(e),children:"Disable All"})]}))]}),!!X&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:X}),(()=>{let e,t,a;if(ts)return(0,s.jsx)(y,{providerStorageAlias:tn,providerDisplayAlias:to,modelAliases:J,copied:eZ,onCopy:eX,onSetAlias:tf,onDeleteAlias:ty,connections:x,isAnthropic:ta});let i=[...e9,...eO.filter(e=>!e9.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eE),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),d=Object.entries(J).filter(([e,t])=>{let a=`${tn}/`;if(!t.startsWith(a))return!1;let s=t.slice(a.length);return e3.passthroughModels?!e9.some(e=>e.id===s):!e9.some(e=>e.id===s)&&e===s}).map(([e,t])=>({id:t.slice(`${tn}/`.length),alias:e,fullModel:t}));return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,s.jsx)(b,{model:{id:e.id},fullModel:`${to}/${e.id}`,alias:e.alias,copied:eZ,onCopy:eX,onSetAlias:()=>{},onDeleteAlias:()=>ty(e.alias),testStatus:Q[e.id],onTest:x.length>0||e8?()=>tD(e.id):void 0,isTesting:ee===e.id,isCustom:!0,isFree:!1},e.id)),n.map(e=>{let t=`${tn}/${e.id}`,a=`${r}/${e.id}`,i=Object.entries(J).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(b,{model:e,fullModel:`${to}/${e.id}`,alias:i,copied:eZ,onCopy:eX,onSetAlias:t=>tf(e.id,t,tn),onDeleteAlias:()=>ty(i),testStatus:Q[e.id],onTest:x.length>0||e8?()=>tD(e.id):void 0,isTesting:ee===e.id,isFree:e.isFree,onDisable:()=>tc(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>es(!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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),eI.length>0&&(e=new Set(Object.values(J)),t=new Set(e9.map(e=>e.id)),0===(a=eI.filter(a=>!e.has(`${tn}/${a.id}`)&&!t.has(a.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>(0,s.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tf(e.id,t,tn)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,s.jsxs)("button",{onClick:()=>tm(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tE,"kiro"===r?(0,s.jsx)(d.Mh,{isOpen:C,providerInfo:e3,onSuccess:tN,onClose:()=>S(!1)}):"cursor"===r?(0,s.jsx)(d.G9,{isOpen:C,onSuccess:tN,onClose:()=>S(!1)}):"gitlab"===r?(0,s.jsx)(d.vj,{isOpen:C,providerInfo:e3,onSuccess:tN,onClose:()=>S(!1)}):(0,s.jsx)(d.LF,{isOpen:C,provider:r,providerInfo:e3,onSuccess:tN,onClose:()=>S(!1)}),"iflow"===r&&(0,s.jsx)(d.vE,{isOpen:A,onSuccess:()=>{th(),T(!1)},onClose:()=>T(!1)}),(0,s.jsx)(F,{isOpen:$,provider:r,providerName:e3.name,isCompatible:ts,isAnthropic:ta,authType:e3?.authType,authHint:e3?.authHint,website:e3?.website,proxyPools:k,error:R,onSave:tw,onBulkDone:th,onClose:()=>{O(""),I(!1)}}),(0,s.jsx)(d.wI,{isOpen:P,connection:K,proxyPools:k,onSave:tC,onClose:()=>E(!1)}),ts&&(0,s.jsx)(z,{isOpen:D,node:v,onSave:tg,onClose:()=>M(!1),isAnthropic:ta}),!ts&&(0,s.jsx)(q,{isOpen:ea,providerAlias:tn,providerDisplayAlias:to,onSave:async e=>{let t=e3?.passthroughModels?e.split("/").pop():e;await tf(e,t,tn),es(!1)},onClose:()=>es(!1)}),(0,s.jsx)(d.uo,{isOpen:e_,onClose:()=>eF(!1),onConfirm:()=>{(window.localStorage.setItem(eY,"true"),eF(!1),e6)?e0():e2()},title:"Risk Notice",message:e3?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(d.uo,{isOpen:!!eM,onClose:()=>eU(null),onConfirm:eM?.onConfirm,title:eM?.title||"Confirm",message:eM?.message,variant:"danger"})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}B.propTypes={label:g().string.isRequired,hint:g().string,value:g().string.isRequired,onChange:g().func.isRequired,disabled:g().bool},W.propTypes={providerStorageAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,modelAliases:g().object.isRequired}}},e=>{e.O(0,[2574,3862,246,2714,5772,5564,5263,5497,8441,3794,7358],()=>e(e.s=18205)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{15615:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>u});var a=t(95155),s=t(12115),i=t(73321),l=t(98500),d=t.n(l),o=t(35497),n=t(90620);let c=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),p=Object.values(n.MA).map(e=>({value:e.id,label:e.name}));function u(){let e=(0,i.useRouter)(),[r,t]=(0,s.useState)(!1),[l,u]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[h,m]=(0,s.useState)({}),x=(e,r)=>{u(t=>({...t,[e]:r})),h[e]&&m(r=>({...r,[e]:null}))},b=async r=>{let a;if(r.preventDefault(),a={},l.provider||(a.provider="Please select a provider"),"api_key"!==l.authMethod||l.apiKey||(a.apiKey="API Key is required"),m(a),0===Object.keys(a).length){t(!0);try{let r=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(r.ok)e.push("/dashboard/providers");else{let e=await r.json();m({submit:e.error||"Failed to create provider"})}}catch(e){m({submit:"An error occurred. Please try again."})}finally{t(!1)}}},v=n.Q2[l.provider];return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("form",{onSubmit:b,className:"flex flex-col gap-6",children:[(0,a.jsx)(o.l6,{label:"Provider",options:c,value:l.provider,onChange:e=>x("provider",e.target.value),placeholder:"Select a provider",error:h.provider,required:!0}),v&&(0,a.jsxs)(o.Zp.Section,{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:v.color},children:v.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:v.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Selected provider"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:p.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>x("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${l.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"api_key"===e.value?"key":"lock"}),(0,a.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===l.authMethod&&(0,a.jsx)(o.pd,{label:"API Key",type:"password",placeholder:"Enter your API key",value:l.apiKey,onChange:e=>x("apiKey",e.target.value),error:h.apiKey,hint:"Your API key will be encrypted and stored securely.",required:!0}),"oauth2"===l.authMethod&&(0,a.jsxs)(o.Zp.Section,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Connect your account using OAuth2 authentication."}),(0,a.jsx)(o.$n,{type:"button",variant:"secondary",icon:"link",children:"Connect with OAuth2"})]}),(0,a.jsx)(o.pd,{label:"Display Name",placeholder:"e.g., Production API, Dev Environment",value:l.displayName,onChange:e=>x("displayName",e.target.value),hint:"Optional. A friendly name to identify this configuration."}),(0,a.jsx)(o.lM,{checked:l.isActive,onChange:e=>x("isActive",e),label:"Active",description:"Enable this provider for use in your applications"}),h.submit&&(0,a.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:h.submit}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,a.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,a.jsx)(o.$n,{type:"button",variant:"ghost",fullWidth:!0,children:"Cancel"})}),(0,a.jsx)(o.$n,{type:"submit",loading:r,fullWidth:!0,className:"flex-1",children:"Create Provider"})]})]})})]})}},20302:(e,r,t)=>{Promise.resolve().then(t.bind(t,15615))}},e=>{e.O(0,[2574,3862,246,5792,5564,5263,5497,8441,3794,7358],()=>e(e.s=20302)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{15615:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>u});var a=t(95155),s=t(12115),i=t(73321),l=t(98500),d=t.n(l),o=t(35497),n=t(90620);let c=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),p=Object.values(n.MA).map(e=>({value:e.id,label:e.name}));function u(){let e=(0,i.useRouter)(),[r,t]=(0,s.useState)(!1),[l,u]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[h,m]=(0,s.useState)({}),x=(e,r)=>{u(t=>({...t,[e]:r})),h[e]&&m(r=>({...r,[e]:null}))},b=async r=>{let a;if(r.preventDefault(),a={},l.provider||(a.provider="Please select a provider"),"api_key"!==l.authMethod||l.apiKey||(a.apiKey="API Key is required"),m(a),0===Object.keys(a).length){t(!0);try{let r=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(r.ok)e.push("/dashboard/providers");else{let e=await r.json();m({submit:e.error||"Failed to create provider"})}}catch(e){m({submit:"An error occurred. Please try again."})}finally{t(!1)}}},v=n.Q2[l.provider];return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("form",{onSubmit:b,className:"flex flex-col gap-6",children:[(0,a.jsx)(o.l6,{label:"Provider",options:c,value:l.provider,onChange:e=>x("provider",e.target.value),placeholder:"Select a provider",error:h.provider,required:!0}),v&&(0,a.jsxs)(o.Zp.Section,{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:v.color},children:v.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:v.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Selected provider"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:p.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>x("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${l.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"api_key"===e.value?"key":"lock"}),(0,a.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===l.authMethod&&(0,a.jsx)(o.pd,{label:"API Key",type:"password",placeholder:"Enter your API key",value:l.apiKey,onChange:e=>x("apiKey",e.target.value),error:h.apiKey,hint:"Your API key will be encrypted and stored securely.",required:!0}),"oauth2"===l.authMethod&&(0,a.jsxs)(o.Zp.Section,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Connect your account using OAuth2 authentication."}),(0,a.jsx)(o.$n,{type:"button",variant:"secondary",icon:"link",children:"Connect with OAuth2"})]}),(0,a.jsx)(o.pd,{label:"Display Name",placeholder:"e.g., Production API, Dev Environment",value:l.displayName,onChange:e=>x("displayName",e.target.value),hint:"Optional. A friendly name to identify this configuration."}),(0,a.jsx)(o.lM,{checked:l.isActive,onChange:e=>x("isActive",e),label:"Active",description:"Enable this provider for use in your applications"}),h.submit&&(0,a.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:h.submit}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,a.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,a.jsx)(o.$n,{type:"button",variant:"ghost",fullWidth:!0,children:"Cancel"})}),(0,a.jsx)(o.$n,{type:"submit",loading:r,fullWidth:!0,className:"flex-1",children:"Create Provider"})]})]})})]})}},20302:(e,r,t)=>{Promise.resolve().then(t.bind(t,15615))}},e=>{e.O(0,[2574,3862,246,2714,5564,5263,5497,8441,3794,7358],()=>e(e.s=20302)),_N_E=e.O()}]);