@jheavenknows/bluerouter 2.0.4 → 2.0.5

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 (421) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +2 -2
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  36. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  37. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  38. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  39. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  40. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  41. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  42. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  43. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  45. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  46. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  47. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  48. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  49. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  50. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  51. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  52. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  87. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  89. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  90. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  91. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  166. package/app/.next-cli-build/server/app/callback.html +1 -1
  167. package/app/.next-cli-build/server/app/callback.rsc +3 -3
  168. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  169. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  170. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  171. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  172. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  173. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  174. package/app/.next-cli-build/server/app/dashboard/analytics.html +1 -1
  175. package/app/.next-cli-build/server/app/dashboard/analytics.rsc +4 -4
  176. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +1 -1
  177. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
  178. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  179. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  180. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_full.segment.rsc +4 -4
  181. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
  182. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_index.segment.rsc +3 -3
  183. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_tree.segment.rsc +1 -1
  184. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  185. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +5 -5
  186. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +2 -2
  187. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys.segment.rsc +1 -1
  188. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  189. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  190. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +5 -5
  191. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_head.segment.rsc +1 -1
  192. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_index.segment.rsc +3 -3
  193. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +1 -1
  194. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  195. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  196. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  197. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  198. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  199. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  200. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  201. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  202. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  203. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  204. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  205. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  206. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  207. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  208. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  209. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  210. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  211. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  212. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  213. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  214. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  215. package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  216. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  217. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  218. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  219. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  220. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  221. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  222. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  223. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  224. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  225. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  226. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  227. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  228. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  229. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  230. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  231. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  232. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  233. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  234. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  235. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  236. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  237. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  238. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  239. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  240. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  241. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  242. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  243. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  244. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  245. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  246. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  247. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  248. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  249. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  250. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  251. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  252. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  253. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  254. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  255. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  256. package/app/.next-cli-build/server/app/dashboard/profile.rsc +4 -4
  257. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +1 -1
  258. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  259. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  260. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  261. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +4 -4
  262. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  263. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  264. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  265. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  266. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +4 -4
  267. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +1 -1
  268. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
  269. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  270. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  271. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +4 -4
  272. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
  273. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +3 -3
  274. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +1 -1
  275. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  276. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +4 -4
  277. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
  278. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
  279. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  280. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  281. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +4 -4
  282. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
  283. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +3 -3
  284. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +1 -1
  285. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  286. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  287. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  288. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  289. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  290. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  291. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  292. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  293. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  294. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  295. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  296. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  297. package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  298. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  299. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  300. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  301. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  302. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  303. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  304. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  305. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  306. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  307. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  308. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  309. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  310. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  311. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  312. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  313. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  314. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  315. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  316. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  317. package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  318. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  319. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  320. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  321. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  322. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  323. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  324. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  325. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  326. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  327. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  328. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  329. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  330. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  331. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  332. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  333. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  334. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  335. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  336. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  337. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  338. package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  339. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  340. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  341. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  342. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  343. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  344. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  345. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  346. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  347. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  348. package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  349. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  350. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  351. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  352. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  353. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  354. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  355. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  356. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  357. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  358. package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  359. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  360. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  361. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  362. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  363. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  364. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  365. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  366. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  367. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  368. package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  369. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  370. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  371. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  372. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  373. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  374. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  375. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  376. package/app/.next-cli-build/server/app/index.html +1 -1
  377. package/app/.next-cli-build/server/app/index.rsc +3 -3
  378. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  379. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  380. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  381. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  382. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  384. package/app/.next-cli-build/server/app/landing.html +1 -1
  385. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  386. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  387. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  388. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  389. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  390. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  391. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  392. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  393. package/app/.next-cli-build/server/app/login.html +1 -1
  394. package/app/.next-cli-build/server/app/login.rsc +3 -3
  395. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +3 -3
  396. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  397. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  398. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  399. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  400. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  401. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  402. package/app/.next-cli-build/server/app-paths-manifest.json +2 -2
  403. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  404. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  405. package/app/.next-cli-build/server/chunks/5087.js +1 -1
  406. package/app/.next-cli-build/server/chunks/7130.js +1 -1
  407. package/app/.next-cli-build/server/chunks/7153.js +1 -1
  408. package/app/.next-cli-build/server/chunks/7795.js +2 -2
  409. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  410. package/app/.next-cli-build/server/middleware.js +1 -1
  411. package/app/.next-cli-build/server/pages/404.html +1 -1
  412. package/app/.next-cli-build/server/pages/500.html +1 -1
  413. package/app/.next-cli-build/static/chunks/{1321-367a4cb0a4292b2b.js → 1321-be125fa7c9907868.js} +1 -1
  414. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/api-keys/{page-af030495b98d571b.js → page-6f443344fdcd09a5.js} +3 -3
  415. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  416. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  417. package/app/package.json +1 -1
  418. package/package.json +1 -1
  419. /package/app/.next-cli-build/static/{INMprjIXKVE3JNf_76r-4 → gEY-knaHqU-pAk_B2Qd3c}/_buildManifest.js +0 -0
  420. /package/app/.next-cli-build/static/{INMprjIXKVE3JNf_76r-4 → gEY-knaHqU-pAk_B2Qd3c}/_ssgManifest.js +0 -0
  421. /package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-1.0.128-to-1.0.129-1.0.129-20260610-072001 → upgrade-2.0.4-to-2.0.5-2.0.5-20260610-223032}/data.sqlite +0 -0
@@ -1,5 +1,5 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7593],{56484:(e,t,s)=>{"use strict";s.d(t,{default:()=>k});var r=s(95155),n=s(12115),l=s(35497),a=s(94027),i=s(11059);let d=Object.freeze({enabled:!0,requestsPerMinute:20,requestsPerHour:0,requestsPerDay:0,promptCharsMax:12e4,maxCompletionTokens:4096,forceThinkingOff:!0,allowedIpCidrs:[],expiresAt:""});function o(e){return String(e||"").trim().toLowerCase()}function c(e){return Array.isArray(e)?[...new Set(e.map(e=>String(e||"").trim()).filter(Boolean))]:[]}function m(e,t=0){let s=Number(e);return Number.isFinite(s)?Math.max(0,Math.floor(s)):t}function x(e,t=!0){return null==e||""===e?t:!0===e||"true"===e||1===e||"1"===e}function u(e){return Array.isArray(e)?[...new Set(e.map(e=>String(e||"").trim()).filter(Boolean))]:[]}function h(e){return e&&"object"==typeof e&&!Array.isArray(e)&&Object.keys(e).length>0}function p(e={},t={}){let s={...t},r=e&&"object"==typeof e&&!Array.isArray(e)?e:{};return{enabled:x(r.enabled??s.enabled,!0),requestsPerMinute:m(r.requestsPerMinute??s.requestsPerMinute,0),requestsPerHour:m(r.requestsPerHour??s.requestsPerHour,0),requestsPerDay:m(r.requestsPerDay??s.requestsPerDay,0),promptCharsMax:m(r.promptCharsMax??s.promptCharsMax,0),maxCompletionTokens:m(r.maxCompletionTokens??s.maxCompletionTokens,0),forceThinkingOff:x(r.forceThinkingOff??s.forceThinkingOff,!0),allowedIpCidrs:u(r.allowedIpCidrs??s.allowedIpCidrs),expiresAt:String(r.expiresAt??s.expiresAt??"").trim()}}function b({models:e,emptyLabel:t="Chưa g\xe1n model"}){let s=c(e);return 0===s.length?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:t}):(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[s.slice(0,8).map(e=>(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1 font-mono text-xs",children:e},e)),s.length>8?(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1 text-xs",children:["+",s.length-8," model kh\xe1c"]}):null]})}function y({limits:e}){if(!h(e))return(0,r.jsx)("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-text-muted",children:(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:"policy: chưa set, kh\xf4ng giới hạn"})});let t=p(e);return(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-text-muted",children:[(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:["policy: ",t.enabled?"bật":"tắt"]}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:[t.requestsPerMinute||"∞"," req/ph\xfat"]}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:[t.requestsPerHour||"∞"," req/giờ"]}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:[t.requestsPerDay||"∞"," req/ng\xe0y"]}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:[t.promptCharsMax||"∞"," chars prompt"]}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:["max output ",t.maxCompletionTokens||"∞"]}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:["thinking: ",t.forceThinkingOff?"force off":"client tự quyết"]}),t.allowedIpCidrs.length>0?(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:"IP locked"}):null]})}function f({label:e,value:t,onChange:s,hint:n}){return(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:e}),(0,r.jsx)("input",{type:"number",min:"0",value:t,onChange:e=>s(m(e.target.value,0)),className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),n?(0,r.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:n}):null]})}function g({isOpen:e,keyName:t,policy:s,setPolicy:n,onClose:a,onSave:i,onClear:o,saving:c,clearLabel:m="X\xf3a policy / kh\xf4ng limit"}){let x=p(s,d),h=(e,t)=>n(s=>p({...s,[e]:t},d));return(0,r.jsx)(l.aF,{isOpen:e,onClose:a,title:`Policy API key: ${t||"API Key"}`,size:"xl",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface/60 p-3 text-sm text-text-muted",children:["Key mới tự c\xf3 ",(0,r.jsx)("b",{children:"default policy"}),". Chỉ admin được sửa policy. C\xe1c gi\xe1 trị 0 nghĩa l\xe0 kh\xf4ng giới hạn theo mục đ\xf3."]}),(0,r.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-xl border border-border p-3 text-sm",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("b",{children:"Bật policy"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Tắt mục n\xe0y th\xec policy được lưu nhưng kh\xf4ng \xe1p limit."})]}),(0,r.jsx)("input",{type:"checkbox",checked:x.enabled,onChange:e=>h("enabled",e.target.checked)})]}),(0,r.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,r.jsx)(f,{label:"Request / ph\xfat",value:x.requestsPerMinute,onChange:e=>h("requestsPerMinute",e)}),(0,r.jsx)(f,{label:"Request / giờ",value:x.requestsPerHour,onChange:e=>h("requestsPerHour",e),hint:"0 = kh\xf4ng giới hạn"}),(0,r.jsx)(f,{label:"Request / ng\xe0y",value:x.requestsPerDay,onChange:e=>h("requestsPerDay",e),hint:"0 = kh\xf4ng giới hạn"})]}),(0,r.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,r.jsx)(f,{label:"Prompt chars tối đa",value:x.promptCharsMax,onChange:e=>h("promptCharsMax",e)}),(0,r.jsx)(f,{label:"Output tokens tối đa",value:x.maxCompletionTokens,onChange:e=>h("maxCompletionTokens",e)})]}),(0,r.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-xl border border-border p-3 text-sm",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("b",{children:"Force Thinking Off"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Khi bật, gateway \xe9p request c\xf3 chat_template_kwargs.enable_thinking=false v\xe0 reasoning_budget=0."})]}),(0,r.jsx)("input",{type:"checkbox",checked:x.forceThinkingOff,onChange:e=>h("forceThinkingOff",e.target.checked)})]}),(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"IP/CIDR được ph\xe9p"}),(0,r.jsx)("textarea",{value:u(x.allowedIpCidrs).join("\n"),onChange:e=>h("allowedIpCidrs",[...new Set(String(e.target.value||"").split(/[\n,]+/).map(e=>e.trim()).filter(Boolean))]),rows:3,className:"w-full rounded-xl border border-border bg-background px-3 py-2 font-mono text-sm text-text-main outline-none focus:border-primary",placeholder:"10.0.0.0/8\n192.168.0.0/16"}),(0,r.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:"Để trống = mọi IP. Hỗ trợ IPv4 exact hoặc CIDR."})]}),(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Hết hạn l\xfac"}),(0,r.jsx)("input",{value:x.expiresAt,onChange:e=>h("expiresAt",e.target.value),className:"w-full rounded-xl border border-border bg-background px-3 py-2 font-mono text-sm text-text-main outline-none focus:border-primary",placeholder:"2026-12-31T23:59:59+07:00 hoặc để trống"})]}),(0,r.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,r.jsx)(l.$n,{variant:"ghost",onClick:a,children:"Hủy"}),(0,r.jsx)(l.$n,{variant:"outline",onClick:o,disabled:c,children:m}),(0,r.jsx)(l.$n,{onClick:()=>i(x),disabled:c,children:c?"Đang lưu...":"Lưu policy"})]})]})})}function j({open:e,keyName:t,models:s,setModels:a,activeProviders:i,modelAliases:d,onClose:o,onSave:m,saving:x}){let[u,h]=(0,n.useState)(!1),p=c(s),b=e=>{let t=e?.value||e?.name||e;a(e=>c(e).filter(e=>e!==t))};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.aF,{isOpen:e,onClose:o,title:`Model access: ${t||"API Key"}`,size:"xl",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Chọn một hoặc nhiều model m\xe0 API key n\xe0y được ph\xe9p sử dụng. Trang n\xe0y kh\xf4ng cho lưu danh s\xe1ch model rỗng."}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-sm font-medium",children:"Model được ph\xe9p d\xf9ng"}),(0,r.jsx)(l.$n,{size:"sm",variant:"outline",onClick:()=>h(!0),children:"Th\xeam model"})]}),0===p.length?(0,r.jsx)("div",{className:"rounded-xl border border-dashed border-border p-4 text-sm text-text-muted",children:"Chưa chọn model n\xe0o. H\xe3y th\xeam \xedt nhất một model trước khi lưu."}):(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:p.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>b(e),className:"rounded-full border border-primary/30 bg-primary/10 px-2 py-1 font-mono text-xs text-primary transition hover:bg-red-500/10 hover:text-red-600",title:"Bấm để gỡ model n\xe0y",children:[e," \xd7"]},e))}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(l.$n,{variant:"ghost",onClick:o,children:"Hủy"}),(0,r.jsx)(l.$n,{onClick:m,disabled:x||0===p.length,children:x?"Đang lưu...":"Lưu danh s\xe1ch model"})]})]})}),(0,r.jsx)(l.rq,{isOpen:u,onClose:()=>h(!1),onSelect:e=>{let t=e?.value||e?.name||e;t&&a(e=>c([...e,t]))},onDeselect:b,activeProviders:i,modelAliases:d,title:"Chọn model được ph\xe9p d\xf9ng",addedModelValues:p,closeOnSelect:!1})]})}function k(){let e,t,[s,m]=(0,n.useState)([]),[x,u]=(0,n.useState)(!0),[f,k]=(0,n.useState)(""),[v,N]=(0,n.useState)(!1),[C,w]=(0,n.useState)(""),[P,A]=(0,n.useState)(""),[S,I]=(0,n.useState)(""),[T,$]=(0,n.useState)(""),[M,O]=(0,n.useState)(new Set),[q,K]=(0,n.useState)(null),[D,z]=(0,n.useState)([]),[H,L]=(0,n.useState)(""),[E,B]=(0,n.useState)(!1),[U,R]=(0,n.useState)(!1),[_,F]=(0,n.useState)(""),[Z,J]=(0,n.useState)(""),[V,X]=(0,n.useState)(!1),[G,Y]=(0,n.useState)(d),[W,Q]=(0,n.useState)(d),[ee,et]=(0,n.useState)(!1),[es,er]=(0,n.useState)(!1),[en,el]=(0,n.useState)(!1),[ea,ei]=(0,n.useState)([]),[ed,eo]=(0,n.useState)({}),[ec,em]=(0,n.useState)(!1),[ex,eu]=(0,n.useState)(!1),[eh,ep]=(0,n.useState)(null),[eb,ey]=(0,n.useState)([]),[ef,eg]=(0,n.useState)(!1),[ej,ek]=(0,n.useState)(null),[ev,eN]=(0,n.useState)(d),[eC,ew]=(0,n.useState)(!1),[eP,eA]=(0,n.useState)(5),[eS,eI]=(0,n.useState)(0),[eT,e$]=(0,n.useState)(""),[eM,eO]=(0,n.useState)(null),{copied:eq,copy:eK}=(0,i.C)(),{isAdmin:eD,userId:ez}=(0,a.s)(),eH=Number.isFinite(Number(eP))?Number(eP):5,eL=Number.isFinite(Number(eS))?Number(eS):s.length,eE=!eD&&eL>=eH,eB=eT?`${eT}/v1`:"/v1",eU=eT?`${eT}/v1/chat/completions`:"/v1/chat/completions",eR=(e=c(eM?.allowedModels)[0],t=String(_||"").trim(),e||t||"YOUR_MODEL"),e_=eM?function({endpoint:e,apiKey:t,model:s}){let r=String(e||"/v1/chat/completions").replace(/"/g,""),n=String(t||"YOUR_API_KEY").replace(/"/g,""),l=JSON.stringify({model:String(s||"YOUR_MODEL"),messages:[{role:"user",content:"Say hi.\nReply in one short sentence."}],temperature:.2,stream:!1}).replace(/"/g,'\\"');return`curl.exe -X POST "${r}" ^
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7593],{56484:(e,t,s)=>{"use strict";s.d(t,{default:()=>k});var r=s(95155),n=s(12115),l=s(35497),a=s(94027),i=s(11059);let d=Object.freeze({enabled:!0,requestsPerMinute:20,requestsPerHour:0,requestsPerDay:0,promptCharsMax:12e4,forceThinkingOff:!0,allowedIpCidrs:[],expiresAt:""});function o(e){return String(e||"").trim().toLowerCase()}function c(e){return Array.isArray(e)?[...new Set(e.map(e=>String(e||"").trim()).filter(Boolean))]:[]}function m(e,t=0){let s=Number(e);return Number.isFinite(s)?Math.max(0,Math.floor(s)):t}function x(e,t=!0){return null==e||""===e?t:!0===e||"true"===e||1===e||"1"===e}function h(e){return Array.isArray(e)?[...new Set(e.map(e=>String(e||"").trim()).filter(Boolean))]:[]}function u(e){return e&&"object"==typeof e&&!Array.isArray(e)&&Object.keys(e).length>0}function p(e={},t={}){let s={...t},r=e&&"object"==typeof e&&!Array.isArray(e)?e:{};return{enabled:x(r.enabled??s.enabled,!0),requestsPerMinute:m(r.requestsPerMinute??s.requestsPerMinute,0),requestsPerHour:m(r.requestsPerHour??s.requestsPerHour,0),requestsPerDay:m(r.requestsPerDay??s.requestsPerDay,0),promptCharsMax:m(r.promptCharsMax??s.promptCharsMax,0),forceThinkingOff:x(r.forceThinkingOff??s.forceThinkingOff,!0),allowedIpCidrs:h(r.allowedIpCidrs??s.allowedIpCidrs),expiresAt:String(r.expiresAt??s.expiresAt??"").trim()}}function y({models:e,emptyLabel:t="Chưa g\xe1n model"}){let s=c(e);return 0===s.length?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:t}):(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[s.slice(0,8).map(e=>(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1 font-mono text-xs",children:e},e)),s.length>8?(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1 text-xs",children:["+",s.length-8," model kh\xe1c"]}):null]})}function b({limits:e}){if(!u(e))return(0,r.jsx)("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-text-muted",children:(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:"policy: chưa set, kh\xf4ng giới hạn"})});let t=p(e);return(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-text-muted",children:[(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:["policy: ",t.enabled?"bật":"tắt"]}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:[t.requestsPerMinute||"∞"," req/ph\xfat"]}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:[t.requestsPerHour||"∞"," req/giờ"]}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:[t.requestsPerDay||"∞"," req/ng\xe0y"]}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:[t.promptCharsMax||"∞"," chars prompt"]}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:["thinking: ",t.forceThinkingOff?"force off":"client tự quyết"]}),t.allowedIpCidrs.length>0?(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:"IP locked"}):null]})}function f({label:e,value:t,onChange:s,hint:n}){return(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:e}),(0,r.jsx)("input",{type:"number",min:"0",value:t,onChange:e=>s(m(e.target.value,0)),className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),n?(0,r.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:n}):null]})}function g({isOpen:e,keyName:t,policy:s,setPolicy:n,onClose:a,onSave:i,onClear:o,saving:c,clearLabel:m="X\xf3a policy / kh\xf4ng limit"}){let x=p(s,d),u=(e,t)=>n(s=>p({...s,[e]:t},d));return(0,r.jsx)(l.aF,{isOpen:e,onClose:a,title:`Policy API key: ${t||"API Key"}`,size:"xl",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface/60 p-3 text-sm text-text-muted",children:["Key mới tự c\xf3 ",(0,r.jsx)("b",{children:"default policy"}),". Chỉ admin được sửa policy. C\xe1c gi\xe1 trị 0 nghĩa l\xe0 kh\xf4ng giới hạn theo mục đ\xf3. Policy n\xe0y kh\xf4ng \xe9p max_tokens/output tokens."]}),(0,r.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-xl border border-border p-3 text-sm",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("b",{children:"Bật policy"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Tắt mục n\xe0y th\xec policy được lưu nhưng kh\xf4ng \xe1p limit."})]}),(0,r.jsx)("input",{type:"checkbox",checked:x.enabled,onChange:e=>u("enabled",e.target.checked)})]}),(0,r.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,r.jsx)(f,{label:"Request / ph\xfat",value:x.requestsPerMinute,onChange:e=>u("requestsPerMinute",e)}),(0,r.jsx)(f,{label:"Request / giờ",value:x.requestsPerHour,onChange:e=>u("requestsPerHour",e),hint:"0 = kh\xf4ng giới hạn"}),(0,r.jsx)(f,{label:"Request / ng\xe0y",value:x.requestsPerDay,onChange:e=>u("requestsPerDay",e),hint:"0 = kh\xf4ng giới hạn"})]}),(0,r.jsx)(f,{label:"Prompt chars tối đa",value:x.promptCharsMax,onChange:e=>u("promptCharsMax",e),hint:"0 = kh\xf4ng giới hạn. Policy kh\xf4ng can thiệp max_tokens/output tokens của client."}),(0,r.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-xl border border-border p-3 text-sm",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("b",{children:"Force Thinking Off"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Khi bật, gateway \xe9p request c\xf3 chat_template_kwargs.enable_thinking=false v\xe0 reasoning_budget=0."})]}),(0,r.jsx)("input",{type:"checkbox",checked:x.forceThinkingOff,onChange:e=>u("forceThinkingOff",e.target.checked)})]}),(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"IP/CIDR được ph\xe9p"}),(0,r.jsx)("textarea",{value:h(x.allowedIpCidrs).join("\n"),onChange:e=>u("allowedIpCidrs",[...new Set(String(e.target.value||"").split(/[\n,]+/).map(e=>e.trim()).filter(Boolean))]),rows:3,className:"w-full rounded-xl border border-border bg-background px-3 py-2 font-mono text-sm text-text-main outline-none focus:border-primary",placeholder:"10.0.0.0/8\n192.168.0.0/16"}),(0,r.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:"Để trống = mọi IP. Hỗ trợ IPv4 exact hoặc CIDR."})]}),(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Hết hạn l\xfac"}),(0,r.jsx)("input",{value:x.expiresAt,onChange:e=>u("expiresAt",e.target.value),className:"w-full rounded-xl border border-border bg-background px-3 py-2 font-mono text-sm text-text-main outline-none focus:border-primary",placeholder:"2026-12-31T23:59:59+07:00 hoặc để trống"})]}),(0,r.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,r.jsx)(l.$n,{variant:"ghost",onClick:a,children:"Hủy"}),(0,r.jsx)(l.$n,{variant:"outline",onClick:o,disabled:c,children:m}),(0,r.jsx)(l.$n,{onClick:()=>i(x),disabled:c,children:c?"Đang lưu...":"Lưu policy"})]})]})})}function j({open:e,keyName:t,models:s,setModels:a,activeProviders:i,modelAliases:d,onClose:o,onSave:m,saving:x}){let[h,u]=(0,n.useState)(!1),p=c(s),y=e=>{let t=e?.value||e?.name||e;a(e=>c(e).filter(e=>e!==t))};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.aF,{isOpen:e,onClose:o,title:`Model access: ${t||"API Key"}`,size:"xl",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Chọn một hoặc nhiều model m\xe0 API key n\xe0y được ph\xe9p sử dụng. Trang n\xe0y kh\xf4ng cho lưu danh s\xe1ch model rỗng."}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-sm font-medium",children:"Model được ph\xe9p d\xf9ng"}),(0,r.jsx)(l.$n,{size:"sm",variant:"outline",onClick:()=>u(!0),children:"Th\xeam model"})]}),0===p.length?(0,r.jsx)("div",{className:"rounded-xl border border-dashed border-border p-4 text-sm text-text-muted",children:"Chưa chọn model n\xe0o. H\xe3y th\xeam \xedt nhất một model trước khi lưu."}):(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:p.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>y(e),className:"rounded-full border border-primary/30 bg-primary/10 px-2 py-1 font-mono text-xs text-primary transition hover:bg-red-500/10 hover:text-red-600",title:"Bấm để gỡ model n\xe0y",children:[e," \xd7"]},e))}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(l.$n,{variant:"ghost",onClick:o,children:"Hủy"}),(0,r.jsx)(l.$n,{onClick:m,disabled:x||0===p.length,children:x?"Đang lưu...":"Lưu danh s\xe1ch model"})]})]})}),(0,r.jsx)(l.rq,{isOpen:h,onClose:()=>u(!1),onSelect:e=>{let t=e?.value||e?.name||e;t&&a(e=>c([...e,t]))},onDeselect:y,activeProviders:i,modelAliases:d,title:"Chọn model được ph\xe9p d\xf9ng",addedModelValues:p,closeOnSelect:!1})]})}function k(){let e,t,[s,m]=(0,n.useState)([]),[x,h]=(0,n.useState)(!0),[f,k]=(0,n.useState)(""),[v,N]=(0,n.useState)(!1),[C,w]=(0,n.useState)(""),[P,A]=(0,n.useState)(""),[S,I]=(0,n.useState)(""),[$,T]=(0,n.useState)(""),[M,O]=(0,n.useState)(new Set),[q,K]=(0,n.useState)(null),[D,z]=(0,n.useState)([]),[H,L]=(0,n.useState)(""),[E,B]=(0,n.useState)(!1),[_,U]=(0,n.useState)(!1),[R,F]=(0,n.useState)(""),[Z,J]=(0,n.useState)(""),[V,X]=(0,n.useState)(!1),[G,Y]=(0,n.useState)(d),[W,Q]=(0,n.useState)(d),[ee,et]=(0,n.useState)(!1),[es,er]=(0,n.useState)(!1),[en,el]=(0,n.useState)(!1),[ea,ei]=(0,n.useState)([]),[ed,eo]=(0,n.useState)({}),[ec,em]=(0,n.useState)(!1),[ex,eh]=(0,n.useState)(!1),[eu,ep]=(0,n.useState)(null),[ey,eb]=(0,n.useState)([]),[ef,eg]=(0,n.useState)(!1),[ej,ek]=(0,n.useState)(null),[ev,eN]=(0,n.useState)(d),[eC,ew]=(0,n.useState)(!1),[eP,eA]=(0,n.useState)(5),[eS,eI]=(0,n.useState)(0),[e$,eT]=(0,n.useState)(""),[eM,eO]=(0,n.useState)(null),{copied:eq,copy:eK}=(0,i.C)(),{isAdmin:eD,userId:ez}=(0,a.s)(),eH=Number.isFinite(Number(eP))?Number(eP):5,eL=Number.isFinite(Number(eS))?Number(eS):s.length,eE=!eD&&eL>=eH,eB=e$?`${e$}/v1`:"/v1",e_=e$?`${e$}/v1/chat/completions`:"/v1/chat/completions",eU=(e=c(eM?.allowedModels)[0],t=String(R||"").trim(),e||t||"YOUR_MODEL"),eR=eM?function({endpoint:e,apiKey:t,model:s}){let r=String(e||"/v1/chat/completions").replace(/"/g,""),n=String(t||"YOUR_API_KEY").replace(/"/g,""),l=JSON.stringify({model:String(s||"YOUR_MODEL"),messages:[{role:"user",content:"Say hi.\nReply in one short sentence."}],temperature:.2,stream:!1}).replace(/"/g,'\\"');return`curl.exe -X POST "${r}" ^
2
2
  -H "Authorization: Bearer ${n}" ^
3
3
  -H "Content-Type: application/json" ^
4
- -d "${l}"`}({endpoint:eU,apiKey:eM.key,model:eR}):"",eF=(0,n.useMemo)(()=>{let e=new Map;for(let t of D){let s=o(t.username||t.email||t.userPrincipalName||t.sAMAccountName);s&&e.set(s,{id:s,label:`${t.displayName||t.username||s}${t.email?` \xb7 ${t.email}`:""}`})}for(let t of s){let s=o(t.ownerUser||t.createdByUser);s&&!e.has(s)&&e.set(s,{id:s,label:s})}return ez&&!e.has(ez)&&e.set(ez,{id:ez,label:`${ez} (t\xf4i)`}),[...e.values()].sort((e,t)=>e.label.localeCompare(t.label))},[D,s,ez]),eZ=Z!==_,eJ=U||!C.trim()||!_.trim()||eE;(0,n.useEffect)(()=>{e$(window.location.origin)},[]),(0,n.useEffect)(()=>{eV()},[]),(0,n.useEffect)(()=>{!P&&ez&&A(ez)},[ez,P]);let eV=async()=>{u(!0),k("");try{let e=await fetch("/api/keys",{cache:"no-store"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng tải được danh s\xe1ch API keys");let s=t.keys||[],r=String(t.apiKeyDefaultModel||"").trim();m(s);let n=p(t.apiKeyDefaultPolicy||d,d);F(r),J(r),Y(n),Q(n),eA(t.apiKeyLimit??5),eI(t.apiKeyCount??s.length)}catch(e){k(e.message||"Kh\xf4ng tải được danh s\xe1ch API keys")}finally{u(!1)}},eX=async()=>{if(!ec&&!ex){eu(!0);try{let[e,t]=await Promise.allSettled([fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if("fulfilled"===e.status&&e.value.ok){let t=await e.value.json().catch(()=>({}));ei(t.connections||[])}if("fulfilled"===t.status&&t.value.ok){let e=await t.value.json().catch(()=>({}));eo(e.aliases||{})}em(!0)}catch{}finally{eu(!1)}}},eG=async(e=H)=>{if(eD){B(!0);try{let t=await fetch(`/api/auth/ldap/users?q=${encodeURIComponent(e||"")}`,{cache:"no-store"}),s=await t.json().catch(()=>({}));t.ok&&z(s.users||[])}catch{}finally{B(!1)}}},eY=async()=>{if(eD&&Z.trim()){X(!0),k("");try{let e=await fetch("/api/keys",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKeyDefaultModel:Z.trim()})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng lưu được default model");let s=String(t.apiKeyDefaultModel||"").trim(),r=p(t.apiKeyDefaultPolicy||d,d);F(s),J(s),Y(r),Q(r)}catch(e){k(e.message||"Kh\xf4ng lưu được default model")}finally{X(!1)}}},eW=async e=>{if(!eD)return;let t=p(e,d);et(!0),k("");try{let e=await fetch("/api/keys",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKeyDefaultPolicy:t})}),s=await e.json().catch(()=>({}));if(!e.ok)throw Error(s.error||"Kh\xf4ng lưu được default policy");let r=p(s.apiKeyDefaultPolicy||t,d);Y(r),Q(r),er(!1)}catch(e){k(e.message||"Kh\xf4ng lưu được default policy")}finally{et(!1)}},eQ=async()=>{await eW(d)},e0=async()=>{if(C.trim()){if(!_.trim())return void k("Admin cần cấu h\xecnh default model trước khi tạo API key.");if(eE)return void k(`Mỗi user chỉ được tạo tối đa ${eH} API keys.
5
- Vui l\xf2ng x\xf3a bớt key cũ trước khi tạo key mới.`);R(!0),k("");try{let e=eD?o(S||P||ez):void 0,t=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:C.trim(),ownerUser:e})}),s=await t.json().catch(()=>({}));if(!t.ok)throw Error(s.error||"Kh\xf4ng tạo được API key");$(s.key),w(""),I(""),N(!1),await eV()}catch(e){k(e.message||"Kh\xf4ng tạo được API key")}finally{R(!1)}}},e1=async(e,t)=>{let s=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),r=await s.json().catch(()=>({}));return s.ok?(await eV(),!0):(k(r.error||"Kh\xf4ng cập nhật được API key"),!1)},e3=async()=>{if(!eh)return;let e=c(eb);if(0===e.length)return void k("H\xe3y chọn \xedt nhất một model trước khi lưu quyền truy cập API key.");eg(!0),k("");try{await e1(eh.id,{allowedModels:e})&&(ep(null),ey([]))}finally{eg(!1)}},e2=async e=>{if(ej){ew(!0),k("");try{await e1(ej.id,{limits:p(e)})&&(ek(null),eN(d))}finally{ew(!1)}}},e5=async()=>{if(ej){ew(!0),k("");try{await e1(ej.id,{limits:{}})&&(ek(null),eN(d))}finally{ew(!1)}}};return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Quản l\xfd API Keys"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:eD?"Admin c\xf3 thể tạo API key, g\xe1n owner, chỉnh model access v\xe0 policy/limit từng key. Key mới tự c\xf3 default policy.":`Bạn c\xf3 thể quản l\xfd API key của t\xe0i khoản m\xecnh. Mỗi user thường được tạo tối đa ${eH} API keys.`})]}),(0,r.jsx)(l.$n,{onClick:()=>{N(!0),!P&&ez&&A(ez)},disabled:eE,children:"Tạo API Key"})]}),f?(0,r.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600 whitespace-pre-line",children:f}):null,eD?null:(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-medium",children:"Giới hạn API key theo user"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:["T\xe0i khoản của bạn đang c\xf3 ",eL,"/",eH," API keys. Key bị disabled vẫn được t\xednh v\xe0o giới hạn."]})]}),(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-3 py-1 text-sm",children:eE?"Đ\xe3 đạt giới hạn":"C\xf2n c\xf3 thể tạo th\xeam"})]})}),(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-medium",children:"Default model cho API key mới"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"API key mới sẽ mặc định chỉ được d\xf9ng model n\xe0y. Cần cấu h\xecnh default model trước khi tạo API key."})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[_?(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-3 py-1 font-mono text-sm",children:_}):(0,r.jsx)("span",{className:"text-sm text-red-600",children:"Chưa cấu h\xecnh default model"}),eD?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{el(!0),eX()},children:Z||"Chọn default model..."}),(0,r.jsx)(l.$n,{size:"sm",onClick:eY,disabled:!eZ||V||!Z.trim(),children:V?"Đang lưu...":"Lưu"})]}):null]}),eD?(0,r.jsx)("p",{className:"text-xs text-text-muted",children:ex?"Đang tải danh s\xe1ch model...":"Danh s\xe1ch model chỉ được tải khi mở bộ chọn để trang load nhanh hơn."}):null]})}),(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-medium",children:"Default policy cho API key mới"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Policy n\xe0y được tự động g\xe1n cho key mới. Chỉ admin chỉnh được. Policy ri\xeang từng key vẫn c\xf3 thể override sau khi tạo."})]}),eD?(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{Q(p(G||d,d)),er(!0)},children:"Chỉnh default policy"}):null]}),(0,r.jsx)(y,{limits:G}),eD?(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Thay đổi ở đ\xe2y chỉ \xe1p dụng cho API key tạo mới sau thời điểm lưu. Key cũ giữ policy hiện tại cho tới khi admin chỉnh ri\xeang từng key."}):null]})}),(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-medium",children:"Th\xf4ng tin API endpoint"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"D\xf9ng API key b\xean dưới để gọi gateway theo chuẩn OpenAI-compatible. Endpoint lấy theo domain hiện tại của dashboard."})]}),(0,r.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,r.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:eB})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"Chat Completions"}),(0,r.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:eU})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>eK(eB,"api-base-url"),children:"api-base-url"===eq?"Đ\xe3 copy Base URL":"Copy Base URL"}),(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>eK(eU,"api-chat-endpoint"),children:"api-chat-endpoint"===eq?"Đ\xe3 copy Endpoint":"Copy Endpoint"})]})]})}),T?(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("h3",{className:"font-medium",children:"Đ\xe3 tạo API key"}),(0,r.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-sm",children:T}),(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:["H\xe3y copy ngay. Key mới mặc định chỉ được d\xf9ng ",_||"default model"," v\xe0 default policy đang cấu h\xecnh trong Dashboard, trừ khi admin chỉnh quyền model/policy."]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.$n,{size:"sm",onClick:()=>eK(T,"created"),children:"created"===eq?"Đ\xe3 copy":"Copy"}),(0,r.jsx)(l.$n,{size:"sm",variant:"ghost",onClick:()=>$(""),children:"Đ\xf3ng"})]})]})}):null,x?(0,r.jsx)(l.Zp,{children:(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Đang tải API keys..."})}):0===s.length?(0,r.jsx)(l.Zp,{children:(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Chưa c\xf3 API key n\xe0o."})}):(0,r.jsx)("div",{className:"space-y-3",children:s.map(e=>{var t;let s=M.has(e.id),n=e.ownerUser||e.createdByUser||"chưa g\xe1n",a=c(e.allowedModels);return(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"font-medium",children:e.name||"API Key"}),(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap gap-2 text-xs text-text-muted",children:[(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:e.isActive?"Đang bật":"Đ\xe3 tắt"}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:["Owner: ",n]}),(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:a.length>0?`${a.length} model`:"Legacy full access"})]})]}),(0,r.jsx)(l.lM,{checked:!!e.isActive,onChange:t=>e1(e.id,{isActive:t})})]}),(0,r.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-sm",children:s?e.key:(t=e.key)?t.length>12?`${t.slice(0,8)}...${t.slice(-4)}`:t:""}),(0,r.jsxs)("p",{className:"text-xs text-text-muted",children:["Tạo l\xfac: ",e.createdAt?new Date(e.createdAt).toLocaleString():"kh\xf4ng r\xf5",e.createdByUser?` \xb7 Tạo bởi: ${e.createdByUser}`:""]}),(0,r.jsx)(b,{models:a,emptyLabel:"Legacy full access"}),(0,r.jsx)(y,{limits:e.limits}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{var t;return t=e.id,void O(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},children:s?"Ẩn":"Hiện"}),(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>eK(e.key,e.id),children:eq===e.id?"Đ\xe3 copy":"Copy"}),(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>eO(e),children:"API Test"}),(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{var t;let s;return t=e.id,s=prompt("T\xean API key mới",e.name||""),void(s?.trim()&&e1(t,{name:s.trim()}))},children:"Đổi t\xean"}),eD?(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{eD&&(ep(e),ey(c(e.allowedModels)),eX())},children:"Models"}):null,eD?(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{eD&&(ek(e),eN(h(e.limits)?p(e.limits):d))},children:"Policy"}):null,eD?(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>((e,t)=>{if(!eD)return;let s=prompt("G\xe1n owner username/email",t||ez||"");null!==s&&e1(e,{ownerUser:o(s)})})(e.id,n),children:"G\xe1n owner"}):null,(0,r.jsx)(l.$n,{variant:"danger",size:"sm",onClick:()=>{var t;return t=e.id,void K({title:"X\xf3a API Key",message:"Bạn chắc chắn muốn x\xf3a API key n\xe0y? Thao t\xe1c n\xe0y kh\xf4ng thể ho\xe0n t\xe1c.",onConfirm:async()=>{K(null),(await fetch(`/api/keys/${t}`,{method:"DELETE"})).ok&&await eV()}})},children:"X\xf3a"})]})]})},e.id)})}),(0,r.jsx)(l.aF,{isOpen:v,onClose:()=>N(!1),title:"Tạo API Key",size:"lg",children:(0,r.jsxs)("div",{className:"space-y-4",children:[_.trim()?eE?(0,r.jsxs)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600",children:["Bạn đ\xe3 đạt giới hạn ",eH," API keys. H\xe3y x\xf3a bớt key cũ trước khi tạo key mới."]}):(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:["Key n\xe0y sẽ được tạo với quyền d\xf9ng default model: ",(0,r.jsx)("b",{children:_})," v\xe0 default policy đang cấu h\xecnh trong Dashboard."]}):(0,r.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600",children:"Admin cần cấu h\xecnh default model trước khi tạo API key."}),(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"T\xean API key"}),(0,r.jsx)("input",{value:C,onChange:e=>w(e.target.value),placeholder:"VD: VSCode, LibreChat, team-user",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"})]}),eD?(0,r.jsxs)("div",{className:"space-y-3 rounded-xl border border-border p-3",children:[(0,r.jsx)("div",{className:"text-sm font-medium",children:"Owner user"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("input",{value:H,onChange:e=>L(e.target.value),placeholder:"Nhập từ kh\xf3a rồi bấm Tải",className:"min-w-0 flex-1 rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"}),(0,r.jsx)(l.$n,{variant:"outline",onClick:()=>eG(H),disabled:E,children:E?"Đang tải":"Tải LDAP"})]}),(0,r.jsxs)("select",{value:P,onChange:e=>A(e.target.value),className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,r.jsxs)("option",{value:ez||"",children:["G\xe1n cho t\xf4i (",ez||"local",")"]}),eF.map(e=>(0,r.jsx)("option",{value:e.id,children:e.label},e.id))]}),(0,r.jsx)("input",{value:S,onChange:e=>I(e.target.value),placeholder:"username hoặc email, kh\xf4ng bắt buộc",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"LDAP kh\xf4ng tự tải khi mở trang để giảm thời gian load. C\xf3 thể nhập owner thủ c\xf4ng hoặc nhập từ kh\xf3a rồi bấm Tải LDAP."})]}):(0,r.jsxs)("p",{className:"rounded-xl border border-border bg-surface p-3 text-sm text-text-muted",children:["Owner: ",ez||"user hiện tại"]}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(l.$n,{variant:"ghost",onClick:()=>N(!1),children:"Hủy"}),(0,r.jsx)(l.$n,{onClick:e0,disabled:eJ,children:U?"Đang tạo...":"Tạo"})]})]})}),(0,r.jsx)(l.aF,{isOpen:!!eM,onClose:()=>eO(null),title:"API Test bằng curl Windows",size:"xl",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Lệnh dưới đ\xe2y gọi thử endpoint Chat Completions bằng API key đang chọn v\xe0 đ\xe3 nh\xfang sẵn Bearer token."}),(0,r.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,r.jsx)("div",{className:"mt-1 text-sm",children:eM?.name||"API Key"})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"Endpoint"}),(0,r.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:eU})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"Model test"}),(0,r.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:eR})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"Lệnh curl cho Windows CMD"}),(0,r.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:e_})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"D\xe1n lệnh v\xe0o CMD hoặc Windows Terminal để test nhanh. Nếu domain dashboard chạy sau reverse proxy, endpoint sẽ d\xf9ng đ\xfang domain đang mở tr\xean tr\xecnh duyệt."}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(l.$n,{variant:"ghost",onClick:()=>eO(null),children:"Đ\xf3ng"}),(0,r.jsx)(l.$n,{onClick:()=>eK(e_,`api-test-curl-${eM?.id||"current"}`),children:eq===`api-test-curl-${eM?.id||"current"}`?"Đ\xe3 copy":"Copy lệnh curl"})]})]})}),(0,r.jsx)(j,{open:!!eh,keyName:eh?.name,models:eb,setModels:ey,activeProviders:ea,modelAliases:ed,onClose:()=>{ep(null),ey([])},onSave:e3,saving:ef}),(0,r.jsx)(g,{isOpen:es,keyName:"Default cho API key mới",policy:W,setPolicy:Q,onClose:()=>{er(!1),Q(G||d)},onSave:eW,onClear:eQ,saving:ee,clearLabel:"Reset default an to\xe0n"}),(0,r.jsx)(g,{isOpen:!!ej,keyName:ej?.name,policy:ev,setPolicy:eN,onClose:()=>{ek(null),eN(d)},onSave:e2,onClear:e5,saving:eC}),(0,r.jsx)(l.rq,{isOpen:en,onClose:()=>el(!1),onSelect:e=>{let t=String(e?.value||e?.name||e||"").trim();t&&(J(t),el(!1))},activeProviders:ea,modelAliases:ed,title:"Chọn default model cho API key",selectedModel:Z,addedModelValues:Z?[Z]:[]}),q?(0,r.jsx)(l.uo,{isOpen:!!q,onClose:()=>K(null),onConfirm:q.onConfirm,title:q.title,message:q.message,confirmText:"X\xf3a",cancelText:"Hủy",variant:"danger"}):null]})}},84223:(e,t,s)=>{Promise.resolve().then(s.bind(s,56484))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=84223)),_N_E=e.O()}]);
4
+ -d "${l}"`}({endpoint:e_,apiKey:eM.key,model:eU}):"",eF=(0,n.useMemo)(()=>{let e=new Map;for(let t of D){let s=o(t.username||t.email||t.userPrincipalName||t.sAMAccountName);s&&e.set(s,{id:s,label:`${t.displayName||t.username||s}${t.email?` \xb7 ${t.email}`:""}`})}for(let t of s){let s=o(t.ownerUser||t.createdByUser);s&&!e.has(s)&&e.set(s,{id:s,label:s})}return ez&&!e.has(ez)&&e.set(ez,{id:ez,label:`${ez} (t\xf4i)`}),[...e.values()].sort((e,t)=>e.label.localeCompare(t.label))},[D,s,ez]),eZ=Z!==R,eJ=_||!C.trim()||!R.trim()||eE;(0,n.useEffect)(()=>{eT(window.location.origin)},[]),(0,n.useEffect)(()=>{eV()},[]),(0,n.useEffect)(()=>{!P&&ez&&A(ez)},[ez,P]);let eV=async()=>{h(!0),k("");try{let e=await fetch("/api/keys",{cache:"no-store"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng tải được danh s\xe1ch API keys");let s=t.keys||[],r=String(t.apiKeyDefaultModel||"").trim();m(s);let n=p(t.apiKeyDefaultPolicy||d,d);F(r),J(r),Y(n),Q(n),eA(t.apiKeyLimit??5),eI(t.apiKeyCount??s.length)}catch(e){k(e.message||"Kh\xf4ng tải được danh s\xe1ch API keys")}finally{h(!1)}},eX=async()=>{if(!ec&&!ex){eh(!0);try{let[e,t]=await Promise.allSettled([fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if("fulfilled"===e.status&&e.value.ok){let t=await e.value.json().catch(()=>({}));ei(t.connections||[])}if("fulfilled"===t.status&&t.value.ok){let e=await t.value.json().catch(()=>({}));eo(e.aliases||{})}em(!0)}catch{}finally{eh(!1)}}},eG=async(e=H)=>{if(eD){B(!0);try{let t=await fetch(`/api/auth/ldap/users?q=${encodeURIComponent(e||"")}`,{cache:"no-store"}),s=await t.json().catch(()=>({}));t.ok&&z(s.users||[])}catch{}finally{B(!1)}}},eY=async()=>{if(eD&&Z.trim()){X(!0),k("");try{let e=await fetch("/api/keys",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKeyDefaultModel:Z.trim()})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng lưu được default model");let s=String(t.apiKeyDefaultModel||"").trim(),r=p(t.apiKeyDefaultPolicy||d,d);F(s),J(s),Y(r),Q(r)}catch(e){k(e.message||"Kh\xf4ng lưu được default model")}finally{X(!1)}}},eW=async e=>{if(!eD)return;let t=p(e,d);et(!0),k("");try{let e=await fetch("/api/keys",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKeyDefaultPolicy:t})}),s=await e.json().catch(()=>({}));if(!e.ok)throw Error(s.error||"Kh\xf4ng lưu được default policy");let r=p(s.apiKeyDefaultPolicy||t,d);Y(r),Q(r),er(!1)}catch(e){k(e.message||"Kh\xf4ng lưu được default policy")}finally{et(!1)}},eQ=async()=>{await eW(d)},e0=async()=>{if(C.trim()){if(!R.trim())return void k("Admin cần cấu h\xecnh default model trước khi tạo API key.");if(eE)return void k(`Mỗi user chỉ được tạo tối đa ${eH} API keys.
5
+ Vui l\xf2ng x\xf3a bớt key cũ trước khi tạo key mới.`);U(!0),k("");try{let e=eD?o(S||P||ez):void 0,t=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:C.trim(),ownerUser:e})}),s=await t.json().catch(()=>({}));if(!t.ok)throw Error(s.error||"Kh\xf4ng tạo được API key");T(s.key),w(""),I(""),N(!1),await eV()}catch(e){k(e.message||"Kh\xf4ng tạo được API key")}finally{U(!1)}}},e1=async(e,t)=>{let s=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),r=await s.json().catch(()=>({}));return s.ok?(await eV(),!0):(k(r.error||"Kh\xf4ng cập nhật được API key"),!1)},e3=async()=>{if(!eu)return;let e=c(ey);if(0===e.length)return void k("H\xe3y chọn \xedt nhất một model trước khi lưu quyền truy cập API key.");eg(!0),k("");try{await e1(eu.id,{allowedModels:e})&&(ep(null),eb([]))}finally{eg(!1)}},e2=async e=>{if(ej){ew(!0),k("");try{await e1(ej.id,{limits:p(e)})&&(ek(null),eN(d))}finally{ew(!1)}}},e5=async()=>{if(ej){ew(!0),k("");try{await e1(ej.id,{limits:{}})&&(ek(null),eN(d))}finally{ew(!1)}}};return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Quản l\xfd API Keys"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:eD?"Admin c\xf3 thể tạo API key, g\xe1n owner, chỉnh model access v\xe0 policy/limit từng key. Key mới tự c\xf3 default policy.":`Bạn c\xf3 thể quản l\xfd API key của t\xe0i khoản m\xecnh. Mỗi user thường được tạo tối đa ${eH} API keys.`})]}),(0,r.jsx)(l.$n,{onClick:()=>{N(!0),!P&&ez&&A(ez)},disabled:eE,children:"Tạo API Key"})]}),f?(0,r.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600 whitespace-pre-line",children:f}):null,eD?null:(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-medium",children:"Giới hạn API key theo user"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:["T\xe0i khoản của bạn đang c\xf3 ",eL,"/",eH," API keys. Key bị disabled vẫn được t\xednh v\xe0o giới hạn."]})]}),(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-3 py-1 text-sm",children:eE?"Đ\xe3 đạt giới hạn":"C\xf2n c\xf3 thể tạo th\xeam"})]})}),(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-medium",children:"Default model cho API key mới"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"API key mới sẽ mặc định chỉ được d\xf9ng model n\xe0y. Cần cấu h\xecnh default model trước khi tạo API key."})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[R?(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-3 py-1 font-mono text-sm",children:R}):(0,r.jsx)("span",{className:"text-sm text-red-600",children:"Chưa cấu h\xecnh default model"}),eD?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{el(!0),eX()},children:Z||"Chọn default model..."}),(0,r.jsx)(l.$n,{size:"sm",onClick:eY,disabled:!eZ||V||!Z.trim(),children:V?"Đang lưu...":"Lưu"})]}):null]}),eD?(0,r.jsx)("p",{className:"text-xs text-text-muted",children:ex?"Đang tải danh s\xe1ch model...":"Danh s\xe1ch model chỉ được tải khi mở bộ chọn để trang load nhanh hơn."}):null]})}),(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-medium",children:"Default policy cho API key mới"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Policy n\xe0y được tự động g\xe1n cho key mới. Chỉ admin chỉnh được. Policy ri\xeang từng key vẫn c\xf3 thể override sau khi tạo."})]}),eD?(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{Q(p(G||d,d)),er(!0)},children:"Chỉnh default policy"}):null]}),(0,r.jsx)(b,{limits:G}),eD?(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Thay đổi ở đ\xe2y chỉ \xe1p dụng cho API key tạo mới sau thời điểm lưu. Key cũ giữ policy hiện tại cho tới khi admin chỉnh ri\xeang từng key."}):null]})}),(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-medium",children:"Th\xf4ng tin API endpoint"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"D\xf9ng API key b\xean dưới để gọi gateway theo chuẩn OpenAI-compatible. Endpoint lấy theo domain hiện tại của dashboard."})]}),(0,r.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,r.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:eB})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"Chat Completions"}),(0,r.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:e_})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>eK(eB,"api-base-url"),children:"api-base-url"===eq?"Đ\xe3 copy Base URL":"Copy Base URL"}),(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>eK(e_,"api-chat-endpoint"),children:"api-chat-endpoint"===eq?"Đ\xe3 copy Endpoint":"Copy Endpoint"})]})]})}),$?(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("h3",{className:"font-medium",children:"Đ\xe3 tạo API key"}),(0,r.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-sm",children:$}),(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:["H\xe3y copy ngay. Key mới mặc định chỉ được d\xf9ng ",R||"default model"," v\xe0 default policy đang cấu h\xecnh trong Dashboard, trừ khi admin chỉnh quyền model/policy."]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.$n,{size:"sm",onClick:()=>eK($,"created"),children:"created"===eq?"Đ\xe3 copy":"Copy"}),(0,r.jsx)(l.$n,{size:"sm",variant:"ghost",onClick:()=>T(""),children:"Đ\xf3ng"})]})]})}):null,x?(0,r.jsx)(l.Zp,{children:(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Đang tải API keys..."})}):0===s.length?(0,r.jsx)(l.Zp,{children:(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Chưa c\xf3 API key n\xe0o."})}):(0,r.jsx)("div",{className:"space-y-3",children:s.map(e=>{var t;let s=M.has(e.id),n=e.ownerUser||e.createdByUser||"chưa g\xe1n",a=c(e.allowedModels);return(0,r.jsx)(l.Zp,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"font-medium",children:e.name||"API Key"}),(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap gap-2 text-xs text-text-muted",children:[(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:e.isActive?"Đang bật":"Đ\xe3 tắt"}),(0,r.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:["Owner: ",n]}),(0,r.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1",children:a.length>0?`${a.length} model`:"Legacy full access"})]})]}),(0,r.jsx)(l.lM,{checked:!!e.isActive,onChange:t=>e1(e.id,{isActive:t})})]}),(0,r.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-sm",children:s?e.key:(t=e.key)?t.length>12?`${t.slice(0,8)}...${t.slice(-4)}`:t:""}),(0,r.jsxs)("p",{className:"text-xs text-text-muted",children:["Tạo l\xfac: ",e.createdAt?new Date(e.createdAt).toLocaleString():"kh\xf4ng r\xf5",e.createdByUser?` \xb7 Tạo bởi: ${e.createdByUser}`:""]}),(0,r.jsx)(y,{models:a,emptyLabel:"Legacy full access"}),(0,r.jsx)(b,{limits:e.limits}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{var t;return t=e.id,void O(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},children:s?"Ẩn":"Hiện"}),(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>eK(e.key,e.id),children:eq===e.id?"Đ\xe3 copy":"Copy"}),(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>eO(e),children:"API Test"}),(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{var t;let s;return t=e.id,s=prompt("T\xean API key mới",e.name||""),void(s?.trim()&&e1(t,{name:s.trim()}))},children:"Đổi t\xean"}),eD?(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{eD&&(ep(e),eb(c(e.allowedModels)),eX())},children:"Models"}):null,eD?(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{eD&&(ek(e),eN(u(e.limits)?p(e.limits):d))},children:"Policy"}):null,eD?(0,r.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>((e,t)=>{if(!eD)return;let s=prompt("G\xe1n owner username/email",t||ez||"");null!==s&&e1(e,{ownerUser:o(s)})})(e.id,n),children:"G\xe1n owner"}):null,(0,r.jsx)(l.$n,{variant:"danger",size:"sm",onClick:()=>{var t;return t=e.id,void K({title:"X\xf3a API Key",message:"Bạn chắc chắn muốn x\xf3a API key n\xe0y? Thao t\xe1c n\xe0y kh\xf4ng thể ho\xe0n t\xe1c.",onConfirm:async()=>{K(null),(await fetch(`/api/keys/${t}`,{method:"DELETE"})).ok&&await eV()}})},children:"X\xf3a"})]})]})},e.id)})}),(0,r.jsx)(l.aF,{isOpen:v,onClose:()=>N(!1),title:"Tạo API Key",size:"lg",children:(0,r.jsxs)("div",{className:"space-y-4",children:[R.trim()?eE?(0,r.jsxs)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600",children:["Bạn đ\xe3 đạt giới hạn ",eH," API keys. H\xe3y x\xf3a bớt key cũ trước khi tạo key mới."]}):(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:["Key n\xe0y sẽ được tạo với quyền d\xf9ng default model: ",(0,r.jsx)("b",{children:R})," v\xe0 default policy đang cấu h\xecnh trong Dashboard."]}):(0,r.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600",children:"Admin cần cấu h\xecnh default model trước khi tạo API key."}),(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"T\xean API key"}),(0,r.jsx)("input",{value:C,onChange:e=>w(e.target.value),placeholder:"VD: VSCode, LibreChat, team-user",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"})]}),eD?(0,r.jsxs)("div",{className:"space-y-3 rounded-xl border border-border p-3",children:[(0,r.jsx)("div",{className:"text-sm font-medium",children:"Owner user"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("input",{value:H,onChange:e=>L(e.target.value),placeholder:"Nhập từ kh\xf3a rồi bấm Tải",className:"min-w-0 flex-1 rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"}),(0,r.jsx)(l.$n,{variant:"outline",onClick:()=>eG(H),disabled:E,children:E?"Đang tải":"Tải LDAP"})]}),(0,r.jsxs)("select",{value:P,onChange:e=>A(e.target.value),className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,r.jsxs)("option",{value:ez||"",children:["G\xe1n cho t\xf4i (",ez||"local",")"]}),eF.map(e=>(0,r.jsx)("option",{value:e.id,children:e.label},e.id))]}),(0,r.jsx)("input",{value:S,onChange:e=>I(e.target.value),placeholder:"username hoặc email, kh\xf4ng bắt buộc",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"LDAP kh\xf4ng tự tải khi mở trang để giảm thời gian load. C\xf3 thể nhập owner thủ c\xf4ng hoặc nhập từ kh\xf3a rồi bấm Tải LDAP."})]}):(0,r.jsxs)("p",{className:"rounded-xl border border-border bg-surface p-3 text-sm text-text-muted",children:["Owner: ",ez||"user hiện tại"]}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(l.$n,{variant:"ghost",onClick:()=>N(!1),children:"Hủy"}),(0,r.jsx)(l.$n,{onClick:e0,disabled:eJ,children:_?"Đang tạo...":"Tạo"})]})]})}),(0,r.jsx)(l.aF,{isOpen:!!eM,onClose:()=>eO(null),title:"API Test bằng curl Windows",size:"xl",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Lệnh dưới đ\xe2y gọi thử endpoint Chat Completions bằng API key đang chọn v\xe0 đ\xe3 nh\xfang sẵn Bearer token."}),(0,r.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,r.jsx)("div",{className:"mt-1 text-sm",children:eM?.name||"API Key"})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"Endpoint"}),(0,r.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:e_})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"Model test"}),(0,r.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:eU})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"Lệnh curl cho Windows CMD"}),(0,r.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:eR})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"D\xe1n lệnh v\xe0o CMD hoặc Windows Terminal để test nhanh. Nếu domain dashboard chạy sau reverse proxy, endpoint sẽ d\xf9ng đ\xfang domain đang mở tr\xean tr\xecnh duyệt."}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(l.$n,{variant:"ghost",onClick:()=>eO(null),children:"Đ\xf3ng"}),(0,r.jsx)(l.$n,{onClick:()=>eK(eR,`api-test-curl-${eM?.id||"current"}`),children:eq===`api-test-curl-${eM?.id||"current"}`?"Đ\xe3 copy":"Copy lệnh curl"})]})]})}),(0,r.jsx)(j,{open:!!eu,keyName:eu?.name,models:ey,setModels:eb,activeProviders:ea,modelAliases:ed,onClose:()=>{ep(null),eb([])},onSave:e3,saving:ef}),(0,r.jsx)(g,{isOpen:es,keyName:"Default cho API key mới",policy:W,setPolicy:Q,onClose:()=>{er(!1),Q(G||d)},onSave:eW,onClear:eQ,saving:ee,clearLabel:"Reset default an to\xe0n"}),(0,r.jsx)(g,{isOpen:!!ej,keyName:ej?.name,policy:ev,setPolicy:eN,onClose:()=>{ek(null),eN(d)},onSave:e2,onClear:e5,saving:eC}),(0,r.jsx)(l.rq,{isOpen:en,onClose:()=>el(!1),onSelect:e=>{let t=String(e?.value||e?.name||e||"").trim();t&&(J(t),el(!1))},activeProviders:ea,modelAliases:ed,title:"Chọn default model cho API key",selectedModel:Z,addedModelValues:Z?[Z]:[]}),q?(0,r.jsx)(l.uo,{isOpen:!!q,onClose:()=>K(null),onConfirm:q.onConfirm,title:q.title,message:q.message,confirmText:"X\xf3a",cancelText:"Hủy",variant:"danger"}):null]})}},84223:(e,t,s)=>{Promise.resolve().then(s.bind(s,56484))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=84223)),_N_E=e.O()}]);
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluerouter-app",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "Router web dashboard",
5
5
  "private": false,
6
6
  "scripts": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jheavenknows/bluerouter",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "Bluerouter CLI - Start and manage Bluerouter server",
5
5
  "bin": {
6
6
  "bluerouter": "./cli.js"