@jheavenknows/bluerouter 5.3.49 → 5.3.51

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 (678) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +4 -4
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page.js.nft.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js +1 -5
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  94. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js +1 -1
  95. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
  97. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-topology/page.js +1 -1
  98. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-topology/page.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-topology/page_client-reference-manifest.js +1 -1
  100. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
  101. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  103. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  104. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  106. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  107. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  109. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  110. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  112. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  113. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  115. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  117. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  118. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  119. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  120. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  121. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  122. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  123. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  125. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  126. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  127. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  128. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  129. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  130. package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/audit-proxy/route.js +28 -5
  132. package/app/.next-cli-build/server/app/api/audit-proxy/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/auth/view-mode/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/auth/view-mode/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/branding/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/branding/upload/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  163. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +2 -2
  167. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/cluster/config/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/cluster/config/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/cluster/peers/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js +2 -2
  197. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/cluster/sync/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/cluster/test/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +2 -2
  203. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js +2 -2
  207. package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js +2 -2
  211. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +2 -2
  213. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/dashboard/local-ai-report/route.js +2 -2
  219. package/app/.next-cli-build/server/app/api/dashboard/local-ai-report/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/config/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/config/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/live/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/live/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js +2 -2
  233. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/keys/route.js +2 -2
  243. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +2 -2
  250. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/pricing/catalog/route.js +2 -2
  317. package/app/.next-cli-build/server/app/api/pricing/catalog/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  354. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  356. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  360. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js +3 -3
  362. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js +2 -2
  366. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js +2 -2
  368. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/resource-monitor/route.js +3 -3
  370. package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  383. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  403. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  407. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  423. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  455. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  456. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/version/restart/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  461. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  462. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  464. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  466. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  467. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  468. package/app/.next-cli-build/server/app/callback.html +1 -1
  469. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  470. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  471. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  472. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  473. package/app/.next-cli-build/server/app/dashboard/ai-power-index.html +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/ai-power-index.rsc +6 -6
  475. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/!KGRhc2hib2FyZCk/dashboard/ai-power-index/__PAGE__.segment.rsc +6 -6
  476. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_full.segment.rsc +6 -6
  477. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_tree.segment.rsc +1 -1
  478. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +9 -9
  480. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +9 -9
  481. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +9 -9
  482. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/audit-proxy.html +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/audit-proxy.rsc +7 -7
  485. package/app/.next-cli-build/server/app/dashboard/audit-proxy.segments/!KGRhc2hib2FyZCk/dashboard/audit-proxy/__PAGE__.segment.rsc +7 -7
  486. package/app/.next-cli-build/server/app/dashboard/audit-proxy.segments/_full.segment.rsc +7 -7
  487. package/app/.next-cli-build/server/app/dashboard/audit-proxy.segments/_tree.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  489. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  490. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  491. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  492. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.html +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.rsc +7 -7
  495. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/model-profiles/__PAGE__.segment.rsc +7 -7
  496. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_full.segment.rsc +7 -7
  497. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_tree.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  499. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  500. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
  501. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  502. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/cluster.rsc +6 -6
  505. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +6 -6
  506. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +6 -6
  507. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  509. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  510. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
  511. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  512. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  515. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  516. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  517. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/local-ai-report.html +1 -1
  519. package/app/.next-cli-build/server/app/dashboard/local-ai-report.rsc +6 -6
  520. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk/dashboard/local-ai-report/__PAGE__.segment.rsc +6 -6
  521. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_full.segment.rsc +6 -6
  522. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_tree.segment.rsc +1 -1
  523. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  525. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
  526. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  527. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  529. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  530. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
  531. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  532. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  533. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  535. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
  536. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  537. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  539. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +6 -6
  540. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +6 -6
  541. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +6 -6
  542. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +1 -1
  543. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +6 -6
  545. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +6 -6
  546. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +6 -6
  547. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  550. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
  551. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  552. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  553. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  555. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
  556. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  557. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  559. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  560. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
  561. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  562. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  563. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  565. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
  566. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  567. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  568. package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +6 -6
  570. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +6 -6
  571. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +6 -6
  572. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +1 -1
  573. package/app/.next-cli-build/server/app/dashboard/routing-topology.html +1 -1
  574. package/app/.next-cli-build/server/app/dashboard/routing-topology.rsc +6 -6
  575. package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/!KGRhc2hib2FyZCk/dashboard/routing-topology/__PAGE__.segment.rsc +6 -6
  576. package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/_full.segment.rsc +6 -6
  577. package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/_tree.segment.rsc +1 -1
  578. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  579. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  580. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
  581. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  582. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  584. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  585. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
  586. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  587. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  588. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  589. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  590. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
  591. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  592. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  594. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  595. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
  596. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  597. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  598. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  599. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  600. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
  601. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  602. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  603. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  604. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  605. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  606. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  607. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  608. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  609. package/app/.next-cli-build/server/app/index.html +1 -1
  610. package/app/.next-cli-build/server/app/index.rsc +5 -5
  611. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  612. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  613. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  614. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  615. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  616. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  617. package/app/.next-cli-build/server/app/landing.html +1 -1
  618. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  619. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  620. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  622. package/app/.next-cli-build/server/app/login/page.js +1 -1
  623. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  624. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  625. package/app/.next-cli-build/server/app/login.html +1 -1
  626. package/app/.next-cli-build/server/app/login.rsc +6 -6
  627. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  628. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
  630. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  631. package/app/.next-cli-build/server/app/page.js +1 -1
  632. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  633. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  634. package/app/.next-cli-build/server/app-paths-manifest.json +4 -4
  635. package/app/.next-cli-build/server/chunks/{4746.js → 1350.js} +2 -2
  636. package/app/.next-cli-build/server/chunks/1876.js +1 -0
  637. package/app/.next-cli-build/server/chunks/{6064.js → 1900.js} +1 -1
  638. package/app/.next-cli-build/server/chunks/2999.js +1 -0
  639. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  640. package/app/.next-cli-build/server/chunks/4459.js +9 -0
  641. package/app/.next-cli-build/server/chunks/4696.js +1 -1
  642. package/app/.next-cli-build/server/chunks/4755.js +1 -0
  643. package/app/.next-cli-build/server/chunks/5623.js +1 -0
  644. package/app/.next-cli-build/server/chunks/5901.js +1 -1
  645. package/app/.next-cli-build/server/chunks/595.js +1 -1
  646. package/app/.next-cli-build/server/chunks/6053.js +1 -1
  647. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  648. package/app/.next-cli-build/server/chunks/6811.js +1 -1
  649. package/app/.next-cli-build/server/chunks/6992.js +1 -1
  650. package/app/.next-cli-build/server/chunks/7242.js +1 -1
  651. package/app/.next-cli-build/server/chunks/{402.js → 7638.js} +8 -8
  652. package/app/.next-cli-build/server/chunks/7639.js +1 -1
  653. package/app/.next-cli-build/server/chunks/{6936.js → 7700.js} +4 -4
  654. package/app/.next-cli-build/server/chunks/7895.js +1 -0
  655. package/app/.next-cli-build/server/chunks/8141.js +1 -0
  656. package/app/.next-cli-build/server/chunks/8255.js +1 -1
  657. package/app/.next-cli-build/server/chunks/8316.js +1 -1
  658. package/app/.next-cli-build/server/chunks/8360.js +1 -1
  659. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  660. package/app/.next-cli-build/server/pages/404.html +1 -1
  661. package/app/.next-cli-build/server/pages/500.html +1 -1
  662. package/app/.next-cli-build/static/chunks/{5263-4d0783ef24c50911.js → 5263-a4be856dc2147222.js} +1 -1
  663. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/audit-proxy/page-3cc19ecb784ad07d.js +1 -0
  664. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.3.43-to-5.3.44-5.3.44-20260822-133629 → upgrade-5.3.47-to-5.3.48-5.3.48-20260822-174803}/data.sqlite +0 -0
  665. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.3.44-to-5.3.45-5.3.45-20260822-134846 → upgrade-5.3.48-to-5.3.49-5.3.49-20260822-180559}/data.sqlite +0 -0
  666. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.3.45-to-5.3.46-5.3.46-20260822-140303 → upgrade-5.3.48-to-5.3.49-5.3.49-20260822-180600}/data.sqlite +0 -0
  667. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite +0 -0
  668. package/app/package.json +1 -1
  669. package/package.json +1 -1
  670. package/app/.next-cli-build/server/chunks/2507.js +0 -1
  671. package/app/.next-cli-build/server/chunks/2944.js +0 -1
  672. package/app/.next-cli-build/server/chunks/5206.js +0 -1
  673. package/app/.next-cli-build/server/chunks/5915.js +0 -1
  674. package/app/.next-cli-build/server/chunks/607.js +0 -9
  675. package/app/.next-cli-build/server/chunks/8347.js +0 -1
  676. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/audit-proxy/page-3f3d666087630a55.js +0 -5
  677. /package/app/.next-cli-build/static/{L_h01kCNsdvHq-NfbF9cq → PXcKGLgd2EewsleTzBWlp}/_buildManifest.js +0 -0
  678. /package/app/.next-cli-build/static/{L_h01kCNsdvHq-NfbF9cq → PXcKGLgd2EewsleTzBWlp}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (()=>{var a={};a.id=3538,a.ids=[3538],a.modules={1863:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>x,handler:()=>z,routeModule:()=>y});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,32059))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.bind(c,80785))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v={children:["",{children:["(dashboard)",{children:["dashboard",{children:["personalcloudprovider",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,4984))),"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\page.js"]}]},{layout:[t,"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\layout.js"],"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"D:\\bluerouter\\src\\app\\(dashboard)\\layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"D:\\bluerouter\\src\\app\\layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,w=(0,e.H)({tree:v,page:"/(dashboard)/dashboard/personalcloudprovider/page",pathname:"/dashboard/personalcloudprovider",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),x=w.__next_app__,y=w.routeModule,z=w.handler},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},4984:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>k,dynamic:()=>j});var d=c(5735),e=c(73335),f=c(85643),g=c(31067),h=c(61805),i=c.n(h);let j="force-dynamic";function k(){return(0,d.jsxs)("div",{className:i().page,children:[(0,d.jsx)(e.default,{}),(0,d.jsx)(g.default,{}),(0,d.jsx)(f.default,{})]})}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8385:(a,b,c)=>{"use strict";c.d(b,{default:()=>k});var d=c(48249),e=c(67484),f=c(50412),g=c(72738);function h(a,b){return b.find(b=>b.id===a)?.name||a}function i(a){return String(a||"").trim().toLowerCase()}function j(a){return Array.isArray(a?.importedModels)?a.importedModels:[]}function k(){let[a,b]=(0,e.useState)(!0),[c,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(""),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)([]),[v,w]=(0,e.useState)([]),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)(null),[B,C]=(0,e.useState)(null),[D,E]=(0,e.useState)(null),[F,G]=(0,e.useState)(""),[H,I]=(0,e.useState)(null),[J,K]=(0,e.useState)([]),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(""),[P,Q]=(0,e.useState)([]),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(!1),[V,W]=(0,e.useState)({}),[X,Y]=(0,e.useState)({}),[Z,$]=(0,e.useState)(""),[_,aa]=(0,e.useState)({}),[ab,ac]=(0,e.useState)(""),[ad,ae]=(0,e.useState)(""),[af,ag]=(0,e.useState)(3),[ah,ai]=(0,e.useState)("3"),[aj,ak]=(0,e.useState)(!1),[al,am]=(0,e.useState)({}),[an,ao]=(0,e.useState)(null),[ap,aq]=(0,e.useState)({}),[ar,as]=(0,e.useState)(""),[at,au]=(0,e.useState)(""),[av,aw]=(0,e.useState)({}),[ax,ay]=(0,e.useState)({}),[az,aA]=(0,e.useState)(""),[aB,aC]=(0,e.useState)(!1),[aD,aE]=(0,e.useState)(!0),[aF,aG]=(0,e.useState)(null),aH=(0,e.useCallback)(async()=>{b(!0),m("");try{let a=await fetch("/api/personal-cloud-providers",{cache:"no-store"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Kh\xf4ng tải được personal cloud providers");q(b.userId||""),s(!0===b.isAdmin),u(b.providers||[]),w(b.connections||[]),aE(!1!==b.globalRtkEnabled),"number"==typeof b.connectionsPerProviderLimit&&b.connectionsPerProviderLimit>0&&aG(b.connectionsPerProviderLimit),aw(b.routing||{}),ay(a=>{let c={...a};for(let[a,d]of Object.entries(b.routing||{}))c[a]={...d};return c}),$(a=>a||b.userId||"")}catch(a){m(a.message||"Kh\xf4ng tải được personal cloud providers")}finally{b(!1)}},[]),aI=(0,e.useCallback)(a=>{W(a.permissions||{}),Y(a.connectionsByUser||{}),"number"==typeof a.globalConnectionsPerProviderLimit&&a.globalConnectionsPerProviderLimit>0&&(ag(a.globalConnectionsPerProviderLimit),ai(String(a.globalConnectionsPerProviderLimit))),a.connectionsPerProviderLimitOverrides&&"object"==typeof a.connectionsPerProviderLimitOverrides&&am(a.connectionsPerProviderLimitOverrides)},[]),aJ=(0,e.useCallback)(async()=>{if(r){U(!0);try{let a=await fetch("/api/personal-cloud-providers/permissions",{cache:"no-store"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Kh\xf4ng tải được quyền OAuth");aI(b)}catch(a){m(a.message||"Kh\xf4ng tải được quyền OAuth")}finally{U(!1)}}},[r,aI]),aK=(0,e.useMemo)(()=>{let a=i(H?.ownerUser||p);return a?J.filter(b=>i(b.ownerUser||b.createdByUser||p)===a):[]},[J,H,p]),aL=(0,e.useMemo)(()=>{let a=new Map;for(let b of J){let c=String(b.id||"").slice(0,8);a.set(b.id,`${b.name||"API key"}${c?` \xb7 ${c}`:""}`)}return a},[J]),aM=(0,e.useMemo)(()=>Array.from(new Set([...Object.keys(V||{}),...Object.keys(X||{})])).map(a=>{let b=V[a]||{},c=X[a]||{},d=t.filter(a=>b?.[a.id]===!0),e=t.some(a=>(c[a.id]||0)>0);return{userId:a,providerState:b,connectionsByProvider:c,enabledProviders:d,hasAnyConnection:e}}).filter(a=>a.enabledProviders.length>0||a.hasAnyConnection).sort((a,b)=>a.userId.localeCompare(b.userId)),[V,X,t]),aN=async()=>{let a=!!z;y(null),A(null),o(a?"Đ\xe3 reauth th\xe0nh c\xf4ng. Token mới đ\xe3 ghi đ\xe8 l\xean account, t\xean/routing/priority giữ nguy\xean.":"OAuth account đ\xe3 được th\xeam. Model sẽ được import tự động nếu provider hỗ trợ."),await aH()},aO=async(a,b)=>{m(""),o("");try{let c=await fetch(`/api/personal-cloud-providers/${encodeURIComponent(a)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),d=await c.json().catch(()=>({}));if(!c.ok)throw Error(d.error||"Kh\xf4ng cập nhật được connection");await aH()}catch(a){m(a.message||"Kh\xf4ng cập nhật được connection")}},aP=async a=>{m(""),o(""),G(a.id);try{let b=await fetch(`/api/personal-cloud-providers/${encodeURIComponent(a.id)}/import-models`,{method:"POST"}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Kh\xf4ng import được model");w(b=>b.map(b=>b.id===a.id?{...b,availableModels:c.models||[],importedModels:c.importedModels||[],modelImport:c.modelImport||b.modelImport}:b)),ao(b=>b?.id===a.id?{...b,availableModels:c.models||[],importedModels:c.importedModels||[],modelImport:c.modelImport||b.modelImport}:b);let d=c.modelImport?.source==="provider"?"provider":"catalog fallback";o(`Đ\xe3 cập nhật ${c.models?.length||0} model từ ${d}.`)}catch(a){m(a.message||"Kh\xf4ng import được model")}finally{G("")}};(0,e.useCallback)(async()=>{let a=i(p);if(a){M(!0);try{let b=`&ownerUser=${encodeURIComponent(a)}`,c=await fetch(`/api/keys?pageSize=100&status=active${b}`,{cache:"no-store"}),d=await c.json().catch(()=>({}));if(!c.ok)throw Error(d.error||"Kh\xf4ng tải được API keys");K(Array.isArray(d.keys)?d.keys:[])}catch(a){m(a.message||"Kh\xf4ng tải được API keys")}finally{M(!1)}}},[p]);let aQ=async a=>{M(!0);try{let b=i(a?.ownerUser||p),c=b?`&ownerUser=${encodeURIComponent(b)}`:"",d=await fetch(`/api/keys?pageSize=100&status=active${c}`,{cache:"no-store"}),e=await d.json().catch(()=>({}));if(!d.ok)throw Error(e.error||"Kh\xf4ng tải được API keys");let f=Array.isArray(e.keys)?e.keys:[];K(f);let g=i(e.userId),h=f.find(a=>i(a.ownerUser||a.createdByUser||g)===b);O(a=>a||h?.id||"")}catch(a){m(a.message||"Kh\xf4ng tải được API keys")}finally{M(!1)}},aR=async a=>{let b,c;m(""),o(""),I(a),Q((c=(b=j(a)).filter(a=>"llm"===(a.type||"llm")).slice(0,3).map(a=>a.routeModel).filter(Boolean)).length>0?c:b.slice(0,3).map(a=>a.routeModel).filter(Boolean)),O(""),await aQ(a)},aS=async()=>{if(!H)return;if(!N)return void m("Chọn API key cần th\xeam model.");let a=Array.from(new Set((Array.isArray(P)?P:[]).map(a=>String(a||"").trim()).filter(Boolean)));if(0===a.length)return void m("Chọn \xedt nhất một model.");S(!0),m(""),o("");try{let b=await fetch(`/api/personal-cloud-providers/${encodeURIComponent(H.id)}/api-key-models`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKeyId:N,models:a})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Kh\xf4ng th\xeam được model v\xe0o API key");I(null),o(`Đ\xe3 th\xeam ${c.addedModels?.length||a.length} model v\xe0o API key ${c.key?.name||""}.`)}catch(a){m(a.message||"Kh\xf4ng th\xeam được model v\xe0o API key")}finally{S(!1)}},aT=async()=>{if(D){m(""),o("");try{let a=await fetch(`/api/personal-cloud-providers/${encodeURIComponent(D.id)}`,{method:"DELETE"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Kh\xf4ng x\xf3a được connection");o(function(a,b="OAuth connection"){let c=a?.revocation||{};return!0===c.upstreamRevoked?`Đ\xe3 revoke token tại provider v\xe0 x\xf3a ${b} khỏi gateway.`:"unsupported"===c.status?`Đ\xe3 x\xf3a token v\xe0 ${b} khỏi gateway. Provider chưa hỗ trợ revoke tự động; h\xe3y thu hồi thủ c\xf4ng trong phần Security/Connected Apps của provider.`:`Đ\xe3 x\xf3a token v\xe0 ${b} khỏi gateway, nhưng kh\xf4ng x\xe1c nhận được revoke tại provider (${c.error||"unknown error"}). H\xe3y thu hồi thủ c\xf4ng trong phần Security/Connected Apps.`}(b.disconnect,D.name||D.id)),E(null),await aH()}catch(a){m(a.message||"Kh\xf4ng x\xf3a được connection")}}},aU=async(a,b)=>{if(a?.id&&b?.routeModel){m(""),as(b.routeModel),aq(a=>({...a,[b.routeModel]:{...a[b.routeModel]||{},loading:!0}}));try{let c=`/api/personal-cloud-providers/${encodeURIComponent(a.id)}/models/${b.routeModel.split("/").map(encodeURIComponent).join("/")}`,d=await fetch(c,{method:"POST"}),e=await d.json().catch(()=>({})),f={ok:e?.ok===!0,status:e?.status||d.status,text:e?.text||"",error:e?.error||(d.ok?"":"Test failed"),latencyMs:e?.latencyMs||0};aq(a=>({...a,[b.routeModel]:f}))}catch(a){aq(c=>({...c,[b.routeModel]:{ok:!1,error:a.message||"Test failed"}}))}finally{as("")}}},aV=async(a,b)=>{if(a?.id&&b?.routeModel&&window.confirm(`X\xf3a model ${b.routeModel} khỏi connection ${a.name||a.id}?`)){m(""),o(""),au(b.routeModel);try{let c=`/api/personal-cloud-providers/${encodeURIComponent(a.id)}/models/${b.routeModel.split("/").map(encodeURIComponent).join("/")}`,d=await fetch(c,{method:"DELETE"}),e=await d.json().catch(()=>({}));if(!d.ok)throw Error(e?.error||"Kh\xf4ng x\xf3a được model");(a=>{if(!a?.connectionId&&!a?.id)return;let b=a.connectionId||a.id;w(c=>c.map(c=>c.id===b?{...c,importedModels:Array.isArray(a.importedModels)?a.importedModels:c.importedModels,availableModels:Array.isArray(a.models)?a.models:Array.isArray(a.availableModels)?a.availableModels:c.availableModels,modelImport:a.modelImport||c.modelImport}:c)),ao(c=>c?.id===b?{...c,importedModels:Array.isArray(a.importedModels)?a.importedModels:c.importedModels,availableModels:Array.isArray(a.models)?a.models:Array.isArray(a.availableModels)?a.availableModels:c.availableModels,modelImport:a.modelImport||c.modelImport}:c)})(e),aq(a=>{let c={...a};return delete c[b.routeModel],c}),o(`Đ\xe3 x\xf3a model ${b.routeModel}.`)}catch(a){m(a.message||"Kh\xf4ng x\xf3a được model")}finally{au("")}}},aW=(a,b)=>{ay(c=>{let d={...c[a]||{},...b};for(let a of Object.keys(d))(""===d[a]||void 0===d[a])&&delete d[a];return{...c,[a]:d}})},aX=async a=>{m(""),o(""),aA(a);try{let b=ax[a]||{},c={providerId:a,override:{fallbackStrategy:b.fallbackStrategy||"",stickyRoundRobinLimit:b.stickyRoundRobinLimit,stickyScope:b.stickyScope||"",stickyTtlMinutes:b.stickyTtlMinutes,stickyFallbackToClientIp:b.stickyFallbackToClientIp,stickyRebindOnFailure:b.stickyRebindOnFailure,stickyRebindFailureThreshold:b.stickyRebindFailureThreshold}},d=await fetch("/api/personal-cloud-providers/routing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}),e=await d.json().catch(()=>({}));if(!d.ok)throw Error(e?.error||"Kh\xf4ng lưu được routing");aw(e.routing||{}),o(`Đ\xe3 cập nhật routing cho ${a}.`)}catch(a){m(a.message||"Kh\xf4ng lưu được routing")}finally{aA("")}},aY=async a=>{m(""),o(""),aA(a);try{let b=await fetch(`/api/personal-cloud-providers/routing?providerId=${encodeURIComponent(a)}`,{method:"DELETE"}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c?.error||"Kh\xf4ng reset được routing");aw(c.routing||{}),ay(b=>{let c={...b};return delete c[a],c}),o(`Đ\xe3 reset ${a} về ch\xednh s\xe1ch mặc định.`)}catch(a){m(a.message||"Kh\xf4ng reset được routing")}finally{aA("")}},aZ=async()=>{let a,b=i(Z);if(!b)return void m("Nhập username/email cần cấp quyền.");let c=String(ab||"").trim();if(""===c)a=null;else{let b=Number.parseInt(c,10);if(!Number.isFinite(b)||b<=0)return void m("Per-user override giới hạn phải l\xe0 số nguy\xean dương hoặc bỏ trống.");a=b}k(!0),m(""),o("");try{let c=await fetch("/api/personal-cloud-providers/permissions",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:b,providers:_,connectionsPerProviderLimit:a})}),d=await c.json().catch(()=>({}));if(!c.ok)throw Error(d.error||"Kh\xf4ng lưu được quyền OAuth");aI(d);let e=d.user?.id||b;e!==b&&$(e),o(`Đ\xe3 lưu quyền OAuth cho ${e}.`),await aH()}catch(a){m(a.message||"Kh\xf4ng lưu được quyền OAuth")}finally{k(!1)}},a$=async()=>{let a=Number.parseInt(ah,10);if(!Number.isFinite(a)||a<=0)return void m("Global limit phải l\xe0 số nguy\xean dương.");ak(!0),m(""),o("");try{let b=await fetch("/api/personal-cloud-providers/permissions",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({globalConnectionsPerProviderLimit:a})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Kh\xf4ng lưu được global limit");aI(c),o(`Đ\xe3 đặt global limit = ${a} account / provider / user.`)}catch(a){m(a.message||"Kh\xf4ng lưu được global limit")}finally{ak(!1)}},a_=async a=>{let b=i(a);if(b){k(!0),m(""),o("");try{let a=await fetch(`/api/personal-cloud-providers/permissions?userId=${encodeURIComponent(b)}`,{method:"DELETE"}),c=await a.json().catch(()=>({}));if(!a.ok)throw Error(c.error||"Kh\xf4ng thu hồi được quyền OAuth");aI(c),i(Z)===b&&$("");let d=c.disconnectSummary||{},e=Number(d.manualActionRequired)||0;o(`Đ\xe3 x\xf3a ${d.deletedCount||0} OAuth connection của ${b} khỏi gateway; ${d.upstreamRevokedCount||0} token đ\xe3 được revoke tại provider.${e>0?` ${e} connection cần kiểm tra/thu hồi thủ c\xf4ng tại provider.`:""}`),ae(""),await aH()}catch(a){m(a.message||"Kh\xf4ng thu hồi được quyền OAuth")}finally{k(!1)}}},a0=x?function(a={}){return{id:a.id,name:a.name||a.id,icon:a.icon||"cloud",color:a.color||"#64748b",website:a.website||"",notice:a.notice||null,deprecationNotice:a.deprecationNotice||"",serviceKinds:a.serviceKinds||["llm"]}}(x):null,a1=r?t:t.filter(a=>a.enabled),a2=j(H),a3=H?.modelImport||{},a4=j(an),a5=aM.find(a=>a.userId===i(ad)),a6=t.reduce((a,b)=>a+Number(a5?.connectionsByProvider?.[b.id]||0),0);return(0,d.jsxs)("div",{className:"space-y-6",children:[(0,d.jsx)("div",{children:(0,d.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-start md:justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Personal Cloud Providers"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Kết nối OAuth c\xe1 nh\xe2n cho Claude Code, OpenAI Codex v\xe0 Antigravity. Account c\xe1 nh\xe2n chỉ owner v\xe0 quản trị vi\xean c\xf3 thẩm quyền nh\xecn thấy; chỉ API key của owner được d\xf9ng. Tắt Active chỉ tạm ngưng v\xe0 vẫn giữ token. Reauth cho ph\xe9p OAuth lại đ\xfang account đ\xf3 khi token hết hạn — ghi đ\xe8 token mới, giữ nguy\xean t\xean/routing/priority (khỏi phải revoke rồi add lại). Delete sẽ thử revoke tại provider rồi x\xf3a token/connection local. Cột RTK cho ph\xe9p override ri\xeang từng account (Lu\xf4n ON / Lu\xf4n OFF) bất kể cấu h\xecnh RTK global ở /dashboard/endpoint đang on hay off — để trống th\xec theo global."})]}),(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface px-4 py-3 text-sm",children:[(0,d.jsx)("div",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Current user"}),(0,d.jsx)("div",{className:"mt-1 break-all font-mono text-text-main",children:p||"—"}),r||null===aF?null:(0,d.jsxs)("div",{className:"mt-2 border-t border-border pt-2 text-xs text-text-muted",children:["Giới hạn: ",(0,d.jsx)("span",{className:"font-semibold text-text-main",children:aF})," account / provider"]})]})]})}),l?(0,d.jsx)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-700 dark:text-red-300",children:l}):null,n?(0,d.jsx)("div",{className:"rounded-2xl border border-green-500/30 bg-green-500/10 px-4 py-3 text-sm text-green-700 dark:text-green-300",children:n}):null,(0,d.jsx)("div",{className:"grid gap-4 lg:grid-cols-3",children:0===t.length?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted lg:col-span-3",children:"Admin chưa cấp quyền personal OAuth provider n\xe0o cho user n\xe0y."}):t.map(a=>{let b=v.filter(b=>b.provider===a.id).length,c=!r&&null!==aF&&a.enabled,e=c&&b>=aF;return(0,d.jsxs)(f.Zp,{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"inline-flex size-10 shrink-0 items-center justify-center rounded-xl",style:{backgroundColor:`${a.color||"#64748b"}22`},children:(0,d.jsx)(g.A,{src:`/providers/${a.id}.png`,alt:a.name,size:34,className:"max-h-[34px] max-w-[34px] rounded-lg object-contain",fallbackText:a.id.slice(0,2).toUpperCase(),fallbackColor:a.color||"#64748b"})}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("h2",{className:"font-semibold text-text-main",children:a.name}),a.enabled?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Enabled"}):(0,d.jsx)(f.Ex,{variant:"warning",size:"sm",children:"Locked"}),c?(0,d.jsxs)(f.Ex,{variant:e?"error":"default",size:"sm",title:"Số account OAuth c\xe1 nh\xe2n bạn c\xf3 thể add cho provider n\xe0y",children:[b,"/",aF]}):null]}),(0,d.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:a.enabled?"Được admin cấp quyền, c\xf3 thể add OAuth account c\xe1 nh\xe2n.":"Admin chưa cấp quyền cho user n\xe0y."})]})]}),a.deprecationNotice?(0,d.jsx)("p",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:a.deprecationNotice}):null,(0,d.jsx)(f.$n,{fullWidth:!0,disabled:!a.enabled||e,onClick:()=>{a.enabled&&C(a)},icon:"add_link",children:e?`Đ\xe3 đạt giới hạn ${aF} account`:`Add ${a.name} account`})]},a.id)})}),(0,d.jsxs)(f.Zp,{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"My personal accounts"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"OAuth xong sẽ tự import model nếu provider hỗ trợ. Nếu kh\xf4ng gọi được endpoint model, hệ thống d\xf9ng catalog fallback để user vẫn chọn được model."})]}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:aH,loading:a,icon:"refresh",children:"Refresh"})]}),a?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:"Đang tải..."}):0===v.length?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:"Chưa c\xf3 personal OAuth account n\xe0o."}):(0,d.jsx)("div",{className:"overflow-x-auto rounded-2xl border border-border",children:(0,d.jsxs)("table",{className:"min-w-full divide-y divide-border text-sm",children:[(0,d.jsx)("thead",{className:"bg-surface/80 text-left text-xs uppercase tracking-wide text-text-muted",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Connection"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Provider"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Account"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Models"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Created"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"API key routing"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",title:"Tắt = tạm ngưng sử dụng, token vẫn được giữ",children:"Active (tạm ngưng)"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["RTK (Token Savings)",(0,d.jsxs)(f.Ex,{variant:aD?"success":"default",size:"sm",className:"normal-case",children:["Global: ",aD?"ON":"OFF"]}),(0,d.jsx)("button",{type:"button",onClick:()=>aC(!0),title:"RTK l\xe0 g\xec? Bấm để xem giải th\xedch",className:"inline-flex size-4 shrink-0 items-center justify-center rounded-full border border-border text-[10px] font-bold normal-case text-text-muted transition-colors hover:border-brand-500 hover:text-brand-600",children:"?"})]})}),(0,d.jsx)("th",{className:"px-4 py-3 text-right font-medium",children:"Actions"})]})}),(0,d.jsx)("tbody",{className:"divide-y divide-border bg-background",children:v.map(a=>{let b=Array.isArray(a?.availableModels)?a.availableModels:[],c=a.modelImport||{};return(0,d.jsxs)("tr",{className:"align-top hover:bg-surface/50",children:[(0,d.jsxs)("td",{className:"px-4 py-4",children:[(0,d.jsx)("div",{className:"font-medium text-text-main",children:a.name||a.id}),(0,d.jsx)("div",{className:"mt-1 font-mono text-xs text-text-muted",children:a.id})]}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(g.A,{src:`/providers/${a.provider}.png`,alt:a.provider,size:24,className:"max-h-[24px] max-w-[24px] rounded object-contain",fallbackText:a.provider.slice(0,2).toUpperCase()}),(0,d.jsx)("span",{children:h(a.provider,t)})]})}),(0,d.jsxs)("td",{className:"px-4 py-4",children:[(0,d.jsx)("div",{className:"break-all text-text-main",children:function(a={}){let b=a.providerSpecificData&&"object"==typeof a.providerSpecificData?a.providerSpecificData:{};return a.email||b.email||b.preferredUsername||a.displayName||b.sub||b.accountId||b.claudeAccountId||b.chatgptAccountId||"—"}(a)}),(0,d.jsxs)("div",{className:"mt-1 break-all text-xs text-text-muted",children:["Owner: ",a.ownerUser||p||"—"]})]}),(0,d.jsxs)("td",{className:"px-4 py-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[function(a={}){return"provider"===(a.source||"catalog")?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Imported"}):(0,d.jsx)(f.Ex,{variant:"warning",size:"sm",children:"Catalog"})}(c),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:[b.length," model(s)"]})]}),c.warning?(0,d.jsx)("div",{className:"mt-1 max-w-[320px] truncate text-xs text-amber-600 dark:text-amber-300",title:c.warning,children:c.warning}):null,b.length>0?(0,d.jsxs)("div",{className:"mt-2 flex max-w-[360px] flex-wrap gap-1",children:[b.slice(0,4).map(a=>(0,d.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-0.5 font-mono text-[11px] text-text-muted",children:a.routeModel},a.routeModel)),b.length>4?(0,d.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-0.5 text-[11px] text-text-muted",children:["+",b.length-4]}):null]}):null]}),(0,d.jsx)("td",{className:"px-4 py-4 text-xs text-text-muted",children:function(a){if(!a)return"—";try{return new Intl.DateTimeFormat("vi-VN",{dateStyle:"short",timeStyle:"short"}).format(new Date(a))}catch{return a}}(a.createdAt)}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("div",{className:"min-w-[220px] space-y-1",children:[(0,d.jsxs)("select",{value:a.routeApiKeyId||"",onChange:b=>aO(a.id,{routeApiKeyId:b.target.value||null}),disabled:L||i(a.ownerUser||p)!==i(p),className:"h-9 w-full rounded-xl border border-border bg-background px-2 text-xs text-text-main outline-none focus:border-brand-500 disabled:opacity-60",children:[(0,d.jsx)("option",{value:"",children:"Shared across my API keys"}),J.filter(b=>i(b.ownerUser||b.createdByUser||p)===i(a.ownerUser||p)).map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))]}),(0,d.jsx)("div",{className:"text-[11px] text-text-muted",children:a.routeApiKeyId?`Only ${aL.get(a.routeApiKeyId)||"selected API key"} can use this account.`:"Unassigned accounts remain shared fallback for your eligible API keys."})]})}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsx)(f.lM,{checked:!1!==a.isActive,onChange:b=>aO(a.id,{isActive:b})})}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("select",{value:!0===a.rtkEnabled?"on":!1===a.rtkEnabled?"off":"inherit",onChange:b=>{let c=b.target.value;aO(a.id,{rtkEnabled:"inherit"===c?null:"on"===c})},className:"h-9 w-full min-w-[140px] rounded-xl border border-border bg-background px-2 text-xs text-text-main outline-none focus:border-brand-500",children:[(0,d.jsx)("option",{value:"inherit",children:"Theo global"}),(0,d.jsx)("option",{value:"on",children:"Lu\xf4n ON"}),(0,d.jsx)("option",{value:"off",children:"Lu\xf4n OFF"})]})}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"outline",size:"sm",loading:F===a.id,onClick:()=>aP(a),children:"Import models"}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",disabled:0===j(a).length,onClick:()=>{m(""),o(""),ao(a),aq({}),as(""),au("")},children:"Manage models"}),(0,d.jsx)(f.$n,{variant:"secondary",size:"sm",disabled:0===j(a).length,onClick:()=>aR(a),children:"Add to API key"}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>{let b;return b=window.prompt("T\xean connection mới",a.name||""),void(b?.trim()&&aO(a.id,{name:b.trim()}))},children:"Rename"}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",icon:"autorenew",title:"OAuth lại account n\xe0y khi token hết hạn — token mới sẽ ghi đ\xe8, giữ nguy\xean t\xean/routing/priority",onClick:()=>{let b;!(b=t.find(b=>b.id===a.provider))?m("Provider kh\xf4ng c\xf2n khả dụng, kh\xf4ng thể reauth."):(m(""),o(""),A(a),y(b))},children:"Reauth"}),(0,d.jsx)(f.$n,{variant:"danger",size:"sm",onClick:()=>E(a),children:"Revoke & delete"})]})})]},a.id)})})]})})]}),(0,d.jsxs)(f.Zp,{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Routing strategy"}),(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Khi bạn c\xf3 nhiều personal account cho c\xf9ng provider, đ\xe2y l\xe0 ch\xednh s\xe1ch chọn account cho từng request. Để trống = kế thừa ch\xednh s\xe1ch của admin ở ",(0,d.jsx)("span",{className:"font-mono",children:"/dashboard/providers/<provider>"}),"."]})]}),(0,d.jsx)("div",{className:"grid gap-4 lg:grid-cols-3",children:0===a1.length?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-6 text-center text-sm text-text-muted lg:col-span-3",children:"Bạn chưa được cấp quyền provider n\xe0o, n\xean chưa cần thiết lập routing."}):a1.map(a=>{let b=ax[a.id]||{},c=av[a.id]||null,e=!c,g=b.fallbackStrategy||"",h="round-robin"===g,i=az===a.id;return(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.name}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:e?"Đang kế thừa policy global":`Override active: ${c.fallbackStrategy||"inherit"}`})]}),e?(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Inherit"}):(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Override"})]}),(0,d.jsxs)("label",{className:"block text-sm",children:[(0,d.jsx)("span",{className:"mb-1 block font-medium text-text-main",children:"Strategy"}),(0,d.jsxs)("select",{value:g,onChange:b=>aW(a.id,{fallbackStrategy:b.target.value}),className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none focus:border-brand-500",disabled:i,children:[(0,d.jsx)("option",{value:"",children:"Inherit (use global)"}),(0,d.jsx)("option",{value:"fill-first",children:"fill-first — chạy hết account 1 mới sang account 2"}),(0,d.jsx)("option",{value:"round-robin",children:"round-robin — lu\xe2n phi\xean theo sticky limit"}),(0,d.jsx)("option",{value:"least-latency",children:"least-latency — chọn account nhanh nhất"}),(0,d.jsx)("option",{value:"p2c",children:"p2c — power-of-two-choices"})]})]}),h?(0,d.jsxs)("div",{className:"space-y-2 rounded-xl border border-border/50 bg-background/50 p-3",children:[(0,d.jsx)("div",{className:"text-xs text-text-muted",children:"Round-robin sticky params (để trống = d\xf9ng gi\xe1 trị global)"}),(0,d.jsxs)("label",{className:"block text-xs",children:[(0,d.jsx)("span",{className:"mb-1 block text-text-muted",children:"Sticky limit (số request li\xean tiếp trước khi rotate)"}),(0,d.jsx)(f.pd,{type:"number",min:1,value:b.stickyRoundRobinLimit??"",onChange:b=>aW(a.id,{stickyRoundRobinLimit:b.target.value?Number(b.target.value):void 0}),placeholder:"v\xed dụ 3",disabled:i})]}),(0,d.jsxs)("label",{className:"block text-xs",children:[(0,d.jsx)("span",{className:"mb-1 block text-text-muted",children:"Sticky scope"}),(0,d.jsxs)("select",{value:b.stickyScope||"",onChange:b=>aW(a.id,{stickyScope:b.target.value}),className:"h-9 w-full rounded-xl border border-border bg-background px-3 text-xs text-text-main outline-none focus:border-brand-500",disabled:i,children:[(0,d.jsx)("option",{value:"",children:"(inherit)"}),(0,d.jsx)("option",{value:"global",children:"global — rotate cho mọi request"}),(0,d.jsx)("option",{value:"client_ip",children:"client_ip — sticky theo IP"}),(0,d.jsx)("option",{value:"client_session",children:"client_session — sticky theo CLI session"})]})]}),(0,d.jsxs)("label",{className:"block text-xs",children:[(0,d.jsx)("span",{className:"mb-1 block text-text-muted",children:"Sticky TTL (ph\xfat)"}),(0,d.jsx)(f.pd,{type:"number",min:1,value:b.stickyTtlMinutes??"",onChange:b=>aW(a.id,{stickyTtlMinutes:b.target.value?Number(b.target.value):void 0}),placeholder:"v\xed dụ 120",disabled:i})]})]}):null,(0,d.jsxs)("div",{className:"flex flex-wrap gap-2 pt-1",children:[(0,d.jsx)(f.$n,{size:"sm",loading:i,onClick:()=>aX(a.id),children:"Save"}),(0,d.jsx)(f.$n,{size:"sm",variant:"ghost",disabled:i||e,onClick:()=>aY(a.id),children:"Reset to inherit"})]})]},a.id)})})]}),r?(0,d.jsxs)(f.Zp,{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Admin: OAuth provider access"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Default l\xe0 kh\xf4ng c\xf3 quyền. Tắt provider chỉ tạm ngưng connection v\xe0 giữ token để c\xf3 thể bật lại. N\xfat Revoke all sẽ thử revoke upstream rồi x\xf3a to\xe0n bộ connection/token local của user."})]}),(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,d.jsx)("div",{className:"text-sm font-medium",children:"Global limit — số account OAuth c\xe1 nh\xe2n / provider / user thường"}),(0,d.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"\xc1p dụng cho user kh\xf4ng c\xf3 per-user override. Admin kh\xf4ng bị chặn bởi limit n\xe0y."}),(0,d.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,d.jsx)(f.pd,{type:"number",min:1,value:ah,onChange:a=>ai(a.target.value),className:"sm:w-48"}),(0,d.jsx)(f.$n,{onClick:a$,loading:aj,disabled:aj||Number.parseInt(ah,10)===af,children:"Lưu global"}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Đang lưu: ",af]})]})]}),(0,d.jsxs)("div",{className:"grid gap-3 md:grid-cols-[minmax(0,1fr)_auto] md:items-end",children:[(0,d.jsx)(f.pd,{label:"User ID / Email",value:Z,onChange:a=>$(a.target.value),placeholder:"anh-tct hoặc anh-tct@fujinet.net"}),(0,d.jsx)(f.$n,{onClick:aZ,loading:c,icon:"save",children:"Save permissions"})]}),(0,d.jsx)("div",{className:"grid gap-3 md:grid-cols-3",children:t.map(a=>(0,d.jsx)("div",{className:"rounded-2xl border border-border bg-surface p-4",children:(0,d.jsx)(f.lM,{checked:!0===_[a.id],onChange:b=>aa(c=>({...c,[a.id]:b})),label:a.name,description:_[a.id]?"User được ph\xe9p add account":"User chưa được cấp quyền"})},a.id))}),(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,d.jsx)("div",{className:"text-sm font-medium",children:"Per-user override — account / provider"}),(0,d.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Ghi đ\xe8 global cho ",(0,d.jsx)("span",{className:"font-mono",children:i(Z)||"user đang chọn"}),". Để trống rồi Save permissions để bỏ override v\xe0 quay lại global (",af,")."]}),(0,d.jsx)("div",{className:"mt-3 max-w-xs",children:(0,d.jsx)(f.pd,{type:"number",min:1,value:ab,onChange:a=>ac(a.target.value),placeholder:`Để trống = d\xf9ng global (${af})`})})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-4",children:[(0,d.jsxs)("div",{className:"mb-3 flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Granted OAuth Access"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Danh s\xe1ch user hiện đang được cấp quyền add personal OAuth account."})]}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:aJ,loading:T,icon:"refresh",children:"Refresh list"})]}),T?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-6 text-center text-sm text-text-muted",children:"Đang tải quyền..."}):0===aM.length?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-6 text-center text-sm text-text-muted",children:"Chưa c\xf3 user n\xe0o được cấp quyền OAuth provider."}):(0,d.jsx)("div",{className:"overflow-x-auto rounded-2xl border border-border",children:(0,d.jsxs)("table",{className:"min-w-full divide-y divide-border text-sm",children:[(0,d.jsx)("thead",{className:"bg-surface/80 text-left text-xs uppercase tracking-wide text-text-muted",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"User"}),t.map(a=>(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:a.name},a.id)),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",title:"Số account OAuth tối đa cho mỗi provider m\xe0 user được add",children:"Limit / provider"}),(0,d.jsx)("th",{className:"px-4 py-3 text-right font-medium",children:"Actions"})]})}),(0,d.jsx)("tbody",{className:"divide-y divide-border bg-background",children:aM.map(a=>(0,d.jsxs)("tr",{className:"hover:bg-surface/50",children:[(0,d.jsxs)("td",{className:"px-4 py-4",children:[(0,d.jsx)("div",{className:"break-all font-mono text-text-main",children:a.userId}),i(Z)===a.userId?(0,d.jsx)("div",{className:"mt-1 text-xs text-brand-600 dark:text-brand-300",children:"Đang edit ở form ph\xeda tr\xean"}):null]}),t.map(b=>{let c=!0===a.providerState[b.id],e=a.connectionsByProvider?.[b.id]||0,h=e>0;return(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[c?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"ON"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"OFF"}),h?(0,d.jsxs)("span",{className:"inline-flex items-center gap-0.5",title:`User đ\xe3 add ${e} ${b.name} account${e>1?"s":""}`,children:[(0,d.jsx)(g.A,{src:`/providers/${b.id}.png`,alt:b.name,size:16,className:"max-h-[16px] max-w-[16px] rounded object-contain",fallbackText:b.id.slice(0,2).toUpperCase(),fallbackColor:b.color||"#64748b"}),e>1?(0,d.jsxs)("span",{className:"text-[10px] font-semibold text-text-muted",children:["\xd7",e]}):null]}):null]})},b.id)}),(0,d.jsx)("td",{className:"px-4 py-4 text-xs",children:al[a.userId]>0?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,d.jsx)(f.Ex,{variant:"warning",size:"sm",children:"Override"}),(0,d.jsx)("span",{className:"font-mono",children:al[a.userId]})]}):(0,d.jsxs)("span",{className:"text-text-muted",children:["Global \xb7 ",af]})}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>(a=>{let b=i(a);$(b);let c=V[b]||{},d={};for(let a of t)d[a.id]=!0===c[a.id];aa(d)})(a.userId),children:"Edit"}),(0,d.jsx)(f.$n,{variant:"danger",size:"sm",loading:c&&ad===a.userId,onClick:()=>ae(a.userId),children:"Revoke all & delete"})]})})]},a.userId))})]})})]})]}):null,H?(0,d.jsx)(f.aF,{isOpen:!!H,onClose:()=>I(null),title:"Add models to API key",size:"full",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.$n,{variant:"ghost",onClick:()=>I(null),disabled:R,children:"Cancel"}),(0,d.jsx)(f.$n,{onClick:aS,loading:R,disabled:!N||0===P.length,children:"Add selected models"})]}),children:(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 text-sm",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:H.name||H.id}),(0,d.jsxs)("div",{className:"mt-1 text-text-muted",children:[h(H.provider,t)," \xb7 ",a2.length," imported model(s)"]}),a3.warning?(0,d.jsx)("div",{className:"mt-2 text-xs text-amber-600 dark:text-amber-300",children:a3.warning}):null,0===a2.length?(0,d.jsx)("div",{className:"mt-2 rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:'Chưa import được model n\xe0o từ provider. Bấm "Import models" tr\xean d\xf2ng connection trước khi g\xe1n v\xe0o API key.'}):null]}),(0,d.jsxs)("label",{className:"block text-sm",children:[(0,d.jsx)("span",{className:"mb-1 block font-medium text-text-main",children:"API key"}),(0,d.jsxs)("select",{value:N,onChange:a=>O(a.target.value),className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none focus:border-brand-500",disabled:L,children:[(0,d.jsx)("option",{value:"",children:L?"Đang tải API keys...":"Chọn API key"}),aK.map(a=>(0,d.jsxs)("option",{value:a.id,children:[a.name," \xb7 ",a.ownerUser||p]},a.id))]})]}),0!==aK.length||L?null:(0,d.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-sm text-amber-700 dark:text-amber-300",children:"User n\xe0y chưa c\xf3 API key active để th\xeam model."}),(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Models"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Model được lưu v\xe0o allowedModels của API key. Request sẽ route qua personal OAuth account của owner."})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>Q(a2.map(a=>a.routeModel).filter(Boolean)),children:"Select all"}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>Q([]),children:"Clear"})]})]}),(0,d.jsx)("div",{className:"grid gap-2 md:grid-cols-2",children:a2.map(a=>(0,d.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border border-border bg-background p-3 hover:bg-surface",children:[(0,d.jsx)("input",{type:"checkbox",className:"mt-1",checked:P.includes(a.routeModel),onChange:()=>{var b;return b=a.routeModel,void Q(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])}}),(0,d.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,d.jsx)("span",{className:"block font-medium text-text-main",children:a.name||a.id}),(0,d.jsx)("span",{className:"mt-1 block break-all font-mono text-xs text-text-muted",children:a.routeModel}),a.type&&"llm"!==a.type?(0,d.jsx)("span",{className:"mt-2 inline-flex rounded-full bg-surface px-2 py-0.5 text-[11px] text-text-muted",children:a.type}):null]})]},a.routeModel))})]})}):null,an?(0,d.jsx)(f.aF,{isOpen:!!an,onClose:()=>ao(null),title:"Manage imported models",size:"full",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.$n,{variant:"ghost",onClick:()=>ao(null),children:"Close"}),(0,d.jsx)(f.$n,{variant:"outline",loading:F===an.id,onClick:()=>aP(an),icon:"refresh",children:"Re-import from provider"})]}),children:(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 text-sm",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:an.name||an.id}),(0,d.jsxs)("div",{className:"mt-1 text-text-muted",children:[h(an.provider,t)," \xb7 ",a4.length," imported model(s)"]}),(0,d.jsx)("div",{className:"mt-2 text-xs text-text-muted",children:'Test gửi 1 prompt "Say hello in five words" qua ch\xednh OAuth account của bạn, qua đ\xfang proxy của connection. X\xf3a model sẽ bỏ n\xf3 khỏi list importable; c\xe1c API key đ\xe3 gắn model n\xe0y kh\xf4ng bị thay đổi (request đến model đ\xf3 sẽ do provider ph\xeda tr\xean quyết định chấp nhận hay kh\xf4ng).'})]}),0===a4.length?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:'Chưa c\xf3 model n\xe0o được import. Bấm "Re-import from provider".'}):(0,d.jsx)("div",{className:"overflow-x-auto rounded-2xl border border-border",children:(0,d.jsxs)("table",{className:"min-w-full divide-y divide-border text-sm",children:[(0,d.jsx)("thead",{className:"bg-surface/80 text-left text-xs uppercase tracking-wide text-text-muted",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Model"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Route ID"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Test result"}),(0,d.jsx)("th",{className:"px-4 py-3 text-right font-medium",children:"Actions"})]})}),(0,d.jsx)("tbody",{className:"divide-y divide-border bg-background",children:a4.map(a=>{let b=ap[a.routeModel],c=ar===a.routeModel,e=at===a.routeModel;return(0,d.jsxs)("tr",{className:"align-top",children:[(0,d.jsxs)("td",{className:"px-4 py-3",children:[(0,d.jsx)("div",{className:"font-medium text-text-main",children:a.name||a.id}),a.type&&"llm"!==a.type?(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:a.type}):null]}),(0,d.jsx)("td",{className:"px-4 py-3 font-mono text-xs text-text-muted break-all",children:a.routeModel}),(0,d.jsx)("td",{className:"px-4 py-3 text-xs",children:c?(0,d.jsx)("span",{className:"text-text-muted",children:"Đang test..."}):b?b.ok?(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsxs)("div",{className:"text-green-700 dark:text-green-300",children:["OK \xb7 ",b.latencyMs||0,"ms"]}),(0,d.jsx)("div",{className:"break-all text-text-muted",children:(b.text||"").slice(0,200)})]}):(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsxs)("div",{className:"text-red-700 dark:text-red-300",children:["FAIL \xb7 status ",b.status||"?"]}),(0,d.jsx)("div",{className:"break-all text-text-muted",children:(b.error||"").slice(0,200)})]}):(0,d.jsx)("span",{className:"text-text-muted",children:"—"})}),(0,d.jsx)("td",{className:"px-4 py-3",children:(0,d.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"outline",size:"sm",loading:c,disabled:e,onClick:()=>aU(an,a),children:"Say hello"}),(0,d.jsx)(f.$n,{variant:"danger",size:"sm",loading:e,disabled:c,onClick:()=>aV(an,a),children:"Delete"})]})})]},a.routeModel)})})]})})]})}):null,aB?(0,d.jsx)(f.aF,{isOpen:aB,onClose:()=>aC(!1),title:"RTK (Token Savings) l\xe0 g\xec?",size:"xl",footer:(0,d.jsx)(f.$n,{onClick:()=>aC(!1),children:"Đ\xe3 hiểu"}),children:(0,d.jsxs)("div",{className:"space-y-5 text-sm text-text-main",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-border bg-surface px-3 py-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Global RTK hiện đang:"}),(0,d.jsx)(f.Ex,{variant:aD?"success":"default",size:"sm",children:aD?"ON":"OFF"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:'— \xe1p dụng cho mọi account chọn "Theo global"'})]}),(0,d.jsx)("p",{className:"text-text-muted",children:"RTK l\xe0 bộ lọc n\xe9n output của tool (Bash, Grep, Glob, Read...) ngay trong request trước khi gửi l\xean model, gi\xfap giảm số token phải gửi m\xe0 kh\xf4ng l\xe0m mất th\xf4ng tin quan trọng — chỉ t\xe1c động tới phần tool output, kh\xf4ng đụng v\xe0o nội dung chat."}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"mb-2 font-semibold text-text-main",children:"Hoạt động ra sao với CLI tool"}),(0,d.jsx)("p",{className:"text-text-muted",children:"Mỗi khi Claude Code / Codex CLI / OpenCode... gọi tool v\xe0 nhận lại output, RTK tự nhận diện định dạng quen thuộc rồi r\xfat gọn theo đ\xfang cấu tr\xfac của n\xf3:"}),(0,d.jsxs)("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-text-muted",children:[(0,d.jsxs)("li",{children:[(0,d.jsx)("span",{className:"font-mono text-text-main",children:"git diff"})," — giữ v\xe0i d\xf2ng context quanh thay đổi, cắt phần hunk qu\xe1 d\xe0i"]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("span",{className:"font-mono text-text-main",children:"git status"})," / ",(0,d.jsx)("span",{className:"font-mono text-text-main",children:"git log"})," — gom gọn danh s\xe1ch file thay đổi, danh s\xe1ch commit"]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("span",{className:"font-mono text-text-main",children:"grep"})," / ",(0,d.jsx)("span",{className:"font-mono text-text-main",children:"find"})," — giới hạn số match hiển thị mỗi file/thư mục"]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("span",{className:"font-mono text-text-main",children:"ls -la"})," / ",(0,d.jsx)("span",{className:"font-mono text-text-main",children:"tree"})," — t\xf3m tắt theo loại file, cắt c\xe2y thư mục qu\xe1 s\xe2u"]}),(0,d.jsx)("li",{children:"Build log (npm/yarn/cargo...) — chỉ giữ d\xf2ng quan trọng (lỗi, kết quả build)"}),(0,d.jsx)("li",{children:"Output d\xe0i chung kh\xf4ng r\xf5 định dạng — fallback dedup d\xf2ng lặp hoặc smart-truncate (giữ đầu + cuối)"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"mb-2 font-semibold text-text-main",children:"Hiệu quả thực tế"}),(0,d.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",children:(0,d.jsxs)("table",{className:"min-w-full text-xs",children:[(0,d.jsx)("thead",{className:"bg-surface/80 text-left uppercase tracking-wide text-text-muted",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-3 py-2 font-medium",children:"Loại output"}),(0,d.jsx)("th",{className:"px-3 py-2 font-medium",children:"Trước"}),(0,d.jsx)("th",{className:"px-3 py-2 font-medium",children:"Sau"}),(0,d.jsx)("th",{className:"px-3 py-2 font-medium",children:"Tiết kiệm"})]})}),(0,d.jsxs)("tbody",{className:"divide-y divide-border",children:[(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{className:"px-3 py-2 font-mono",children:"git diff"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"7384B"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"3894B"}),(0,d.jsx)("td",{className:"px-3 py-2 text-green-600 dark:text-green-400",children:"47.3%"})]}),(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{className:"px-3 py-2 font-mono",children:"grep -n"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"3723B"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"1447B"}),(0,d.jsx)("td",{className:"px-3 py-2 text-green-600 dark:text-green-400",children:"61.1%"})]}),(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{className:"px-3 py-2 font-mono",children:"find"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"729B"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"264B"}),(0,d.jsx)("td",{className:"px-3 py-2 text-green-600 dark:text-green-400",children:"63.8%"})]})]})]})})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"mb-2 font-semibold text-text-main",children:"Khi n\xe0o KH\xd4NG bị n\xe9n"}),(0,d.jsxs)("ul",{className:"list-disc space-y-1 pl-5 text-text-muted",children:[(0,d.jsx)("li",{children:"Chat thường kh\xf4ng gọi tool — kh\xf4ng c\xf3 g\xec để n\xe9n"}),(0,d.jsx)("li",{children:"Output nhỏ hơn 500B — kh\xf4ng đ\xe1ng n\xe9n"}),(0,d.jsxs)("li",{children:["Output b\xe1o lỗi (",(0,d.jsx)("span",{className:"font-mono text-text-main",children:"is_error"}),") — lu\xf4n giữ nguy\xean để debug"]}),(0,d.jsx)("li",{children:"Output lớn hơn 10MB — bỏ qua để tr\xe1nh tốn CPU xử l\xfd"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"mb-2 font-semibold text-text-main",children:"Global vs từng account"}),(0,d.jsxs)("p",{className:"text-text-muted",children:["Dropdown RTK ở bảng tr\xean cho ph\xe9p override ri\xeang từng account:",(0,d.jsx)("span",{className:"font-semibold text-text-main",children:" Theo global"})," (mặc định, d\xf9ng đ\xfang setting global),",(0,d.jsx)("span",{className:"font-semibold text-text-main",children:" Lu\xf4n ON"})," hoặc",(0,d.jsx)("span",{className:"font-semibold text-text-main",children:" Lu\xf4n OFF"})," — override lu\xf4n thắng global theo cả 2 chiều, n\xean c\xf3 thể để global OFF v\xe0 chỉ bật cho account d\xf9ng CLI tool, hoặc ngược lại."]})]})]})}):null,(0,d.jsx)(f.v9,{isOpen:!!B,provider:B,onAccept:()=>{C(null),B&&y(B)},onCancel:()=>{C(null)}}),a0?(0,d.jsx)(f.LF,{isOpen:!!x,provider:x.id,providerInfo:a0,connectionScope:"personal",reauthConnectionId:z?.id||"",onSuccess:aN,onClose:()=>{y(null),A(null)}}):null,D?(0,d.jsx)(f.uo,{isOpen:!!D,onClose:()=>E(null),onConfirm:aT,title:"Revoke and delete personal account",message:`Gateway sẽ thử revoke token của ${D.name||D.id} tại provider, sau đ\xf3 x\xf3a token v\xe0 connection local. ${"claude"===D.provider?"Claude chưa c\xf3 endpoint revoke tự động được c\xf4ng bố; bạn c\xf3 thể cần thu hồi thủ c\xf4ng trong t\xe0i khoản Claude.":"Nếu provider kh\xf4ng x\xe1c nhận revoke, hệ thống sẽ th\xf4ng b\xe1o để bạn thu hồi thủ c\xf4ng."}`,confirmText:"Revoke & delete",cancelText:"Cancel",variant:"danger"}):null,ad?(0,d.jsx)(f.aF,{isOpen:!!ad,onClose:()=>ae(""),title:"Thu hồi to\xe0n bộ quyền OAuth",size:"lg",busy:c,closeOnOverlay:!c,footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.$n,{variant:"ghost",onClick:()=>ae(""),disabled:c,children:"Hủy"}),(0,d.jsx)(f.$n,{variant:"danger",icon:"delete_forever",loading:c,onClick:()=>a_(ad),children:"Thu hồi v\xe0 x\xf3a to\xe0n bộ"})]}),children:(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{className:"flex items-start gap-4 rounded-2xl border border-red-500/30 bg-gradient-to-br from-red-500/15 to-orange-500/5 p-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-2xl bg-red-500 text-white shadow-lg shadow-red-500/20",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[28px]",children:"warning"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("div",{className:"text-sm font-medium text-red-700 dark:text-red-300",children:"H\xe0nh động nguy hiểm, kh\xf4ng thể ho\xe0n t\xe1c"}),(0,d.jsx)("div",{className:"mt-1 break-all text-lg font-semibold text-text-main",children:ad}),(0,d.jsxs)("p",{className:"mt-2 text-sm leading-6 text-text-muted",children:["Thu hồi to\xe0n bộ quyền OAuth provider của ",(0,d.jsx)("span",{className:"font-semibold text-text-main",children:ad}),"? OAuth account của user n\xe0y sẽ bị ",(0,d.jsx)("span",{className:"font-semibold text-red-600 dark:text-red-300",children:"X\xd3A HẲN"})," khỏi gateway."]})]})]}),(0,d.jsx)("div",{className:"grid gap-3 sm:grid-cols-3",children:[["key_off","Token OAuth","Thử revoke upstream rồi x\xf3a token local"],["deployed_code","Model đ\xe3 import","X\xf3a dữ liệu model của connection"],["vpn_key_off","API key đ\xe3 g\xe1n","Gỡ model tương ứng khỏi API key"]].map(([a,b,c])=>(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-background p-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px] text-red-500",children:a}),(0,d.jsx)("div",{className:"mt-2 text-sm font-semibold text-text-main",children:b}),(0,d.jsx)("div",{className:"mt-1 text-xs leading-5 text-text-muted",children:c})]},b))}),(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface/70 p-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,d.jsx)("span",{className:"text-sm text-text-muted",children:"Connection t\xecm thấy"}),(0,d.jsx)(f.Ex,{variant:a6>0?"warning":"default",size:"sm",children:a6})]}),a5?(0,d.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:t.map(a=>{let b=Number(a5.connectionsByProvider?.[a.id]||0);return b>0?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-border bg-background px-2.5 py-1 text-xs text-text-muted",children:[(0,d.jsx)(g.A,{src:`/providers/${a.id}.png`,alt:a.name,size:16,className:"max-h-[16px] max-w-[16px] rounded object-contain",fallbackText:a.id.slice(0,2).toUpperCase()}),a.name," \xd7",b]},a.id):null})}):null]}),(0,d.jsx)("p",{className:"text-xs leading-5 text-text-muted",children:"Nếu provider kh\xf4ng hỗ trợ revoke tự động hoặc kh\xf4ng phản hồi, gateway vẫn x\xf3a token local v\xe0 sẽ th\xf4ng b\xe1o để quản trị vi\xean thu hồi thủ c\xf4ng trong Security/Connected Apps của provider."})]})}):null]})}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17194:(a,b,c)=>{"use strict";c.d(b,{default:()=>i});var d=c(48249),e=c(67484),f=c(50412),g=c(72738),h=c(20151);function i(){let{isAdmin:a}=(0,h.s)(),[b,c]=(0,e.useState)([]),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),q=(0,e.useCallback)(async()=>{if(a){j(!0),n("");try{let a=await fetch("/api/personal-cloud-providers/visibility",{cache:"no-store"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Kh\xf4ng tải được trạng th\xe1i Show/Hide provider");c(Array.isArray(b.providers)?b.providers:[])}catch(a){n(a?.message||"Kh\xf4ng tải được trạng th\xe1i Show/Hide provider")}finally{j(!1)}}},[a]);if(!a)return null;let r=async(a,b)=>{l(a.id),n(""),p("");try{let d=await fetch("/api/personal-cloud-providers/visibility",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerId:a.id,visible:b})}),e=await d.json().catch(()=>({}));if(!d.ok)throw Error(e.error||"Kh\xf4ng cập nhật được visibility provider");c(Array.isArray(e.providers)?e.providers:[]),p(`${a.name}: ${b?"đ\xe3 Show cho user":"đ\xe3 Hide khỏi user"}.`)}catch(a){n(a?.message||"Kh\xf4ng cập nhật được visibility provider")}finally{l("")}};return(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface/50 p-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:"Admin: Show / Hide Personal Cloud Providers"}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:"Chỉ điều khiển provider c\xf3 xuất hiện tr\xean giao diện của user hay kh\xf4ng. Kh\xf4ng đổi quyền OAuth, kh\xf4ng deactivate connection, kh\xf4ng x\xf3a token, kh\xf4ng đổi API key/routing v\xe0 kh\xf4ng ảnh hưởng sử dụng thực tế."})]}),(0,d.jsx)(f.$n,{size:"sm",variant:"outline",onClick:q,loading:i,icon:"refresh",children:"Refresh"})]}),m?(0,d.jsx)("div",{className:"mt-3 rounded-xl border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-700 dark:text-red-300",children:m}):null,o?(0,d.jsx)("div",{className:"mt-3 rounded-xl border border-green-500/30 bg-green-500/10 px-3 py-2 text-xs text-green-700 dark:text-green-300",children:o}):null,(0,d.jsx)("div",{className:"mt-4 grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:b.map(a=>{let b=!1!==a.visible,c=k===a.id;return(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-border bg-background p-3",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)(g.A,{src:`/providers/${a.id}.png`,alt:a.name,size:30,className:"max-h-[30px] max-w-[30px] rounded object-contain",fallbackText:a.id.slice(0,2).toUpperCase(),fallbackColor:a.color||"#64748b"}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("div",{className:"truncate text-sm font-medium text-text-main",children:a.name}),(0,d.jsx)(f.Ex,{variant:b?"success":"default",size:"sm",children:b?"Shown":"Hidden"})]})]}),(0,d.jsx)(f.$n,{size:"sm",variant:b?"outline":"secondary",disabled:c,loading:c,icon:b?"visibility_off":"visibility",onClick:()=>r(a,!b),children:b?"Hide":"Show"})]},a.id)})})]})}},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19771:a=>{"use strict";a.exports=require("process")},19987:(a,b,c)=>{Promise.resolve().then(c.bind(c,17194))},21820:a=>{"use strict";a.exports=require("os")},26941:(a,b,c)=>{"use strict";c.d(b,{default:()=>l});var d=c(48249),e=c(67484),f=c(50412),g=c(72738),h=c(63634),i=c.n(h);function j(a={}){let b=a.providerSpecificData||{};return a.email||b.githubEmail||b.username||a.displayName||a.name||b.accountId||a.id}function k(a){let b=String(a||"Personal OAuth");return b.charAt(0).toUpperCase()+b.slice(1)}function l(){let[a,b]=(0,e.useState)([]),[c,h]=(0,e.useState)([]),[l,m]=(0,e.useState)(!0),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)("");(0,e.useCallback)(async()=>{m(!0),o("");try{let a=await fetch("/api/personal-cloud-providers/shares",{cache:"no-store"}),c=await a.json().catch(()=>({}));if(!a.ok)throw Error(c.error||"Failed to load sharing settings");b(Array.isArray(c.ownedConnections)?c.ownedConnections:[]),h(Array.isArray(c.sharedWithMe)?c.sharedWithMe:[])}catch(a){o(a.message||"Failed to load sharing settings")}finally{m(!1)}},[]);let x=(0,e.useMemo)(()=>a.find(a=>a.id===p)||null,[a,p]),y=(0,e.useCallback)(a=>{b(b=>b.map(b=>b.id===a.id?a:b))},[]),z=(0,e.useCallback)(async a=>{a.preventDefault();let b=r.trim().toLowerCase();if(x&&b&&!t){u(!0),w("");try{let a=await fetch("/api/personal-cloud-providers/shares",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:x.id,userId:b})}),c=await a.json().catch(()=>({}));if(!a.ok)throw Error(c.error||"Unable to share this account");c.connection&&y(c.connection),s("")}catch(a){w(a.message||"Unable to share this account")}finally{u(!1)}}},[t,x,y,r]),A=(0,e.useCallback)(async a=>{if(x&&!t){u(!0),w("");try{let b=await fetch("/api/personal-cloud-providers/shares",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:x.id,userId:a})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Unable to remove viewer");c.connection&&y(c.connection)}catch(a){w(a.message||"Unable to remove viewer")}finally{u(!1)}}},[t,x,y]),B=(0,e.useCallback)(a=>{q(a),s(""),w("")},[]),C=(0,e.useCallback)(()=>{t||(q(""),s(""),w(""))},[t]);return l?(0,d.jsxs)("section",{className:i().section,children:[(0,d.jsx)("div",{className:i().loadingLine}),(0,d.jsx)("div",{className:i().loadingLineShort})]}):(0,d.jsxs)("div",{className:i().shell,children:[(0,d.jsxs)("section",{className:i().section,children:[(0,d.jsxs)("div",{className:i().sectionHeader,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:i().eyebrow,children:"Read-only quota sharing"}),(0,d.jsx)("h2",{className:i().title,children:"Share Personal OAuth monitoring"}),(0,d.jsx)("p",{className:i().description,children:"Give another dashboard user visibility into account status and quota only. Shared users cannot edit, disable, delete, import models, or change routing."})]}),(0,d.jsxs)("div",{className:i().lockPill,children:[(0,d.jsx)("span",{className:"material-symbols-outlined",children:"visibility"}),"View only"]})]}),n?(0,d.jsx)("div",{className:i().errorBox,children:n}):null,0===a.length?(0,d.jsx)("div",{className:i().emptyState,children:"Add a Personal OAuth account above first. It will appear here and can then be shared with viewers."}):(0,d.jsx)("div",{className:i().accountGrid,children:a.map(a=>{let b=a.sharedWith?.length||0;return(0,d.jsxs)("article",{className:i().accountCard,children:[(0,d.jsxs)("div",{className:i().accountIdentity,children:[(0,d.jsx)("span",{className:i().providerIconWrap,children:(0,d.jsx)(g.A,{src:`/providers/${a.provider}.png`,alt:a.provider,size:30,className:i().providerIcon,fallbackText:String(a.provider||"?").slice(0,2).toUpperCase()})}),(0,d.jsxs)("div",{className:i().accountText,children:[(0,d.jsxs)("div",{className:i().accountTopLine,children:[(0,d.jsx)("strong",{children:j(a)}),(0,d.jsx)("span",{className:a.isActive?i().activeBadge:i().inactiveBadge,children:a.isActive?"Active":"Off"})]}),(0,d.jsxs)("div",{className:i().accountMeta,children:[k(a.provider)," \xb7 ",0===b?"Not shared":`${b} viewer${1===b?"":"s"}`]})]})]}),(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>B(a.id),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"person_add"}),"Share"]})]},a.id)})})]}),c.length>0?(0,d.jsxs)("section",{className:`${i().section} ${i().sharedSection}`,children:[(0,d.jsxs)("div",{className:i().sectionHeader,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:i().eyebrow,children:"Shared with me"}),(0,d.jsx)("h2",{className:i().title,children:"Read-only Personal OAuth accounts"}),(0,d.jsx)("p",{className:i().description,children:"These accounts are owned by other users. You can inspect their status here and quota on Personal Quota, but you cannot change anything."})]}),(0,d.jsxs)("div",{className:i().lockPill,children:[(0,d.jsx)("span",{className:"material-symbols-outlined",children:"lock"}),"Read only"]})]}),(0,d.jsx)("div",{className:i().accountGrid,children:c.map(a=>(0,d.jsxs)("article",{className:`${i().accountCard} ${i().readOnlyCard}`,children:[(0,d.jsxs)("div",{className:i().accountIdentity,children:[(0,d.jsx)("span",{className:i().providerIconWrap,children:(0,d.jsx)(g.A,{src:`/providers/${a.provider}.png`,alt:a.provider,size:30,className:i().providerIcon,fallbackText:String(a.provider||"?").slice(0,2).toUpperCase()})}),(0,d.jsxs)("div",{className:i().accountText,children:[(0,d.jsxs)("div",{className:i().accountTopLine,children:[(0,d.jsx)("strong",{children:j(a)}),(0,d.jsx)("span",{className:i().readOnlyBadge,children:"Shared \xb7 Read only"})]}),(0,d.jsxs)("div",{className:i().accountMeta,children:[k(a.provider)," \xb7 Owner: ",a.ownerUser||"Unknown"]})]})]}),(0,d.jsx)("span",{className:i().noEditHint,children:"No edit access"})]},a.id))})]}):null,x?(0,d.jsx)(f.aF,{isOpen:!!x,onClose:C,title:"Share quota monitoring",size:"lg",children:(0,d.jsxs)("div",{className:i().modalBody,children:[(0,d.jsxs)("div",{className:i().modalAccount,children:[(0,d.jsx)(g.A,{src:`/providers/${x.provider}.png`,alt:x.provider,size:34,className:i().modalProviderIcon,fallbackText:String(x.provider||"?").slice(0,2).toUpperCase()}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:i().modalAccountLabel,children:j(x)}),(0,d.jsx)("div",{className:i().modalAccountMeta,children:k(x.provider)})]})]}),(0,d.jsxs)("div",{className:i().readOnlyNotice,children:[(0,d.jsx)("span",{className:"material-symbols-outlined",children:"verified_user"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("strong",{children:"Viewer permission only"}),(0,d.jsx)("p",{children:"Shared users can view this account on Personal OAuth and Personal Quota. All write actions remain owner-only on the server."})]})]}),(0,d.jsxs)("form",{className:i().shareForm,onSubmit:z,children:[(0,d.jsx)("label",{className:i().inputLabel,htmlFor:"personal-oauth-share-user",children:"User ID or email"}),(0,d.jsxs)("div",{className:i().inputRow,children:[(0,d.jsx)("input",{id:"personal-oauth-share-user",className:i().shareInput,value:r,onChange:a=>s(a.target.value),placeholder:"name@example.com",autoComplete:"off",disabled:t}),(0,d.jsx)(f.$n,{type:"submit",disabled:!r.trim()||t,loading:t,children:"Share"})]}),(0,d.jsx)("p",{className:i().inputHelp,children:"Use the same normalized user ID/email the person uses to sign in to the dashboard."})]}),v?(0,d.jsx)("div",{className:i().errorBox,children:v}):null,(0,d.jsxs)("div",{className:i().viewerBlock,children:[(0,d.jsxs)("div",{className:i().viewerHeading,children:[(0,d.jsx)("span",{children:"People with access"}),(0,d.jsx)("span",{children:x.sharedWith?.length||0})]}),0===(x.sharedWith?.length||0)?(0,d.jsx)("div",{className:i().viewerEmpty,children:"No viewers yet."}):(0,d.jsx)("div",{className:i().viewerList,children:x.sharedWith.map(a=>(0,d.jsxs)("div",{className:i().viewerRow,children:[(0,d.jsxs)("div",{className:i().viewerIdentity,children:[(0,d.jsx)("span",{className:i().avatar,children:a.slice(0,1).toUpperCase()}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:i().viewerName,children:a}),(0,d.jsx)("div",{className:i().viewerRole,children:"Viewer \xb7 read only"})]})]}),(0,d.jsx)("button",{type:"button",className:i().removeButton,onClick:()=>A(a),disabled:t,children:"Remove"})]},a))})]})]})}):null]})}},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31067:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\personalcloudprovider\\\\PersonalCloudProviderOrderEnhancer.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\PersonalCloudProviderOrderEnhancer.js","default")},33873:a=>{"use strict";a.exports=require("path")},34631:a=>{"use strict";a.exports=require("tls")},38522:a=>{"use strict";a.exports=require("node:zlib")},38825:(a,b,c)=>{"use strict";function d(){return null}c.d(b,{default:()=>d}),c(67484)},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41204:a=>{"use strict";a.exports=require("string_decoder")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},54873:(a,b,c)=>{Promise.resolve().then(c.bind(c,38825)),Promise.resolve().then(c.bind(c,8385)),Promise.resolve().then(c.bind(c,26941))},55511:a=>{"use strict";a.exports=require("crypto")},61805:a=>{a.exports={page:"PersonalCloudProviderPage_page__WEiqp"}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63634:a=>{a.exports={shell:"PersonalCloudProviderShares_shell__US6gE",section:"PersonalCloudProviderShares_section__OHcNf",sharedSection:"PersonalCloudProviderShares_sharedSection___aHlv",sectionHeader:"PersonalCloudProviderShares_sectionHeader__vLKx5",eyebrow:"PersonalCloudProviderShares_eyebrow__ouAqZ",title:"PersonalCloudProviderShares_title__y8xC6",description:"PersonalCloudProviderShares_description__xqUNc",lockPill:"PersonalCloudProviderShares_lockPill__cRApp",readOnlyBadge:"PersonalCloudProviderShares_readOnlyBadge__vVzHd",activeBadge:"PersonalCloudProviderShares_activeBadge__1BOdA",inactiveBadge:"PersonalCloudProviderShares_inactiveBadge__3EO5q",accountGrid:"PersonalCloudProviderShares_accountGrid__CDIR9",accountCard:"PersonalCloudProviderShares_accountCard__BIwC5",readOnlyCard:"PersonalCloudProviderShares_readOnlyCard___k8Zg",accountIdentity:"PersonalCloudProviderShares_accountIdentity__wihlv",providerIconWrap:"PersonalCloudProviderShares_providerIconWrap__ahFle",providerIcon:"PersonalCloudProviderShares_providerIcon__73NZX",modalProviderIcon:"PersonalCloudProviderShares_modalProviderIcon__EIGx8",accountText:"PersonalCloudProviderShares_accountText__zeFWz",accountTopLine:"PersonalCloudProviderShares_accountTopLine__PhQY9",accountMeta:"PersonalCloudProviderShares_accountMeta__sndtV",modalAccountMeta:"PersonalCloudProviderShares_modalAccountMeta__9lzRs",inputHelp:"PersonalCloudProviderShares_inputHelp__KDqPa",viewerRole:"PersonalCloudProviderShares_viewerRole__2RT5B",noEditHint:"PersonalCloudProviderShares_noEditHint__5jcuv",emptyState:"PersonalCloudProviderShares_emptyState__7iKlL",viewerEmpty:"PersonalCloudProviderShares_viewerEmpty__I5ePR",errorBox:"PersonalCloudProviderShares_errorBox__Y7BnC",loadingLine:"PersonalCloudProviderShares_loadingLine__5dZ2T",loadingLineShort:"PersonalCloudProviderShares_loadingLineShort__CMied",pulse:"PersonalCloudProviderShares_pulse__hN35n",modalBody:"PersonalCloudProviderShares_modalBody__Yp6fA",modalAccount:"PersonalCloudProviderShares_modalAccount__8zW4q",modalAccountLabel:"PersonalCloudProviderShares_modalAccountLabel__zSz8C",readOnlyNotice:"PersonalCloudProviderShares_readOnlyNotice__O4gsg",shareForm:"PersonalCloudProviderShares_shareForm__p4mTP",inputLabel:"PersonalCloudProviderShares_inputLabel__5hRNA",inputRow:"PersonalCloudProviderShares_inputRow__5Yzd4",shareInput:"PersonalCloudProviderShares_shareInput__RfEew",viewerBlock:"PersonalCloudProviderShares_viewerBlock__OWaSu",viewerHeading:"PersonalCloudProviderShares_viewerHeading__sDj0L",viewerList:"PersonalCloudProviderShares_viewerList__gHcbG",viewerRow:"PersonalCloudProviderShares_viewerRow__OlmjU",viewerIdentity:"PersonalCloudProviderShares_viewerIdentity__HBkDt",avatar:"PersonalCloudProviderShares_avatar__acZLv",viewerName:"PersonalCloudProviderShares_viewerName__9tkp7",removeButton:"PersonalCloudProviderShares_removeButton__GpaF6"}},64939:a=>{"use strict";a.exports=import("pg")},66136:a=>{"use strict";a.exports=require("timers")},66843:(a,b,c)=>{Promise.resolve().then(c.bind(c,78696))},73024:a=>{"use strict";a.exports=require("node:fs")},73335:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\personalcloudprovider\\\\PersonalCloudProviderPageClient.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\PersonalCloudProviderPageClient.js","default")},74075:a=>{"use strict";a.exports=require("zlib")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78696:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\personalcloudprovider\\\\PersonalCloudProviderVisibilityAdmin.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\PersonalCloudProviderVisibilityAdmin.js","default")},79428:a=>{"use strict";a.exports=require("buffer")},79748:a=>{"use strict";a.exports=require("fs/promises")},80099:a=>{"use strict";a.exports=require("node:sqlite")},80785:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(5735),e=c(78696);function f({children:a}){return(0,d.jsxs)("div",{className:"space-y-6",children:[(0,d.jsx)(e.default,{}),a]})}},81787:a=>{"use strict";a.exports=require("bun:sqlite")},84249:(a,b,c)=>{Promise.resolve().then(c.bind(c,31067)),Promise.resolve().then(c.bind(c,73335)),Promise.resolve().then(c.bind(c,85643))},85643:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\personalcloudprovider\\\\PersonalCloudProviderShares.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\PersonalCloudProviderShares.js","default")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,2430,8316,8946,402,5681,4404,6064,6328,8640],()=>b(b.s=1863));module.exports=c})();
1
+ (()=>{var a={};a.id=3538,a.ids=[3538],a.modules={1863:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>x,handler:()=>z,routeModule:()=>y});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,32059))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.bind(c,80785))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v={children:["",{children:["(dashboard)",{children:["dashboard",{children:["personalcloudprovider",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,4984))),"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\page.js"]}]},{layout:[t,"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\layout.js"],"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"D:\\bluerouter\\src\\app\\(dashboard)\\layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"D:\\bluerouter\\src\\app\\layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,w=(0,e.H)({tree:v,page:"/(dashboard)/dashboard/personalcloudprovider/page",pathname:"/dashboard/personalcloudprovider",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),x=w.__next_app__,y=w.routeModule,z=w.handler},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},4984:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>k,dynamic:()=>j});var d=c(5735),e=c(73335),f=c(85643),g=c(31067),h=c(61805),i=c.n(h);let j="force-dynamic";function k(){return(0,d.jsxs)("div",{className:i().page,children:[(0,d.jsx)(e.default,{}),(0,d.jsx)(g.default,{}),(0,d.jsx)(f.default,{})]})}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8385:(a,b,c)=>{"use strict";c.d(b,{default:()=>k});var d=c(48249),e=c(67484),f=c(50412),g=c(72738);function h(a,b){return b.find(b=>b.id===a)?.name||a}function i(a){return String(a||"").trim().toLowerCase()}function j(a){return Array.isArray(a?.importedModels)?a.importedModels:[]}function k(){let[a,b]=(0,e.useState)(!0),[c,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(""),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)([]),[v,w]=(0,e.useState)([]),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)(null),[B,C]=(0,e.useState)(null),[D,E]=(0,e.useState)(null),[F,G]=(0,e.useState)(""),[H,I]=(0,e.useState)(null),[J,K]=(0,e.useState)([]),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(""),[P,Q]=(0,e.useState)([]),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(!1),[V,W]=(0,e.useState)({}),[X,Y]=(0,e.useState)({}),[Z,$]=(0,e.useState)(""),[_,aa]=(0,e.useState)({}),[ab,ac]=(0,e.useState)(""),[ad,ae]=(0,e.useState)(""),[af,ag]=(0,e.useState)(3),[ah,ai]=(0,e.useState)("3"),[aj,ak]=(0,e.useState)(!1),[al,am]=(0,e.useState)({}),[an,ao]=(0,e.useState)(null),[ap,aq]=(0,e.useState)({}),[ar,as]=(0,e.useState)(""),[at,au]=(0,e.useState)(""),[av,aw]=(0,e.useState)({}),[ax,ay]=(0,e.useState)({}),[az,aA]=(0,e.useState)(""),[aB,aC]=(0,e.useState)(!1),[aD,aE]=(0,e.useState)(!0),[aF,aG]=(0,e.useState)(null),aH=(0,e.useCallback)(async()=>{b(!0),m("");try{let a=await fetch("/api/personal-cloud-providers",{cache:"no-store"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Kh\xf4ng tải được personal cloud providers");q(b.userId||""),s(!0===b.isAdmin),u(b.providers||[]),w(b.connections||[]),aE(!1!==b.globalRtkEnabled),"number"==typeof b.connectionsPerProviderLimit&&b.connectionsPerProviderLimit>0&&aG(b.connectionsPerProviderLimit),aw(b.routing||{}),ay(a=>{let c={...a};for(let[a,d]of Object.entries(b.routing||{}))c[a]={...d};return c}),$(a=>a||b.userId||"")}catch(a){m(a.message||"Kh\xf4ng tải được personal cloud providers")}finally{b(!1)}},[]),aI=(0,e.useCallback)(a=>{W(a.permissions||{}),Y(a.connectionsByUser||{}),"number"==typeof a.globalConnectionsPerProviderLimit&&a.globalConnectionsPerProviderLimit>0&&(ag(a.globalConnectionsPerProviderLimit),ai(String(a.globalConnectionsPerProviderLimit))),a.connectionsPerProviderLimitOverrides&&"object"==typeof a.connectionsPerProviderLimitOverrides&&am(a.connectionsPerProviderLimitOverrides)},[]),aJ=(0,e.useCallback)(async()=>{if(r){U(!0);try{let a=await fetch("/api/personal-cloud-providers/permissions",{cache:"no-store"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Kh\xf4ng tải được quyền OAuth");aI(b)}catch(a){m(a.message||"Kh\xf4ng tải được quyền OAuth")}finally{U(!1)}}},[r,aI]),aK=(0,e.useMemo)(()=>{let a=i(H?.ownerUser||p);return a?J.filter(b=>i(b.ownerUser||b.createdByUser||p)===a):[]},[J,H,p]),aL=(0,e.useMemo)(()=>{let a=new Map;for(let b of J){let c=String(b.id||"").slice(0,8);a.set(b.id,`${b.name||"API key"}${c?` \xb7 ${c}`:""}`)}return a},[J]),aM=(0,e.useMemo)(()=>Array.from(new Set([...Object.keys(V||{}),...Object.keys(X||{})])).map(a=>{let b=V[a]||{},c=X[a]||{},d=t.filter(a=>b?.[a.id]===!0),e=t.some(a=>(c[a.id]||0)>0);return{userId:a,providerState:b,connectionsByProvider:c,enabledProviders:d,hasAnyConnection:e}}).filter(a=>a.enabledProviders.length>0||a.hasAnyConnection).sort((a,b)=>a.userId.localeCompare(b.userId)),[V,X,t]),aN=async()=>{let a=!!z;y(null),A(null),o(a?"Đ\xe3 reauth th\xe0nh c\xf4ng. Token mới đ\xe3 ghi đ\xe8 l\xean account, t\xean/routing/priority giữ nguy\xean.":"OAuth account đ\xe3 được th\xeam. Model sẽ được import tự động nếu provider hỗ trợ."),await aH()},aO=async(a,b)=>{m(""),o("");try{let c=await fetch(`/api/personal-cloud-providers/${encodeURIComponent(a)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),d=await c.json().catch(()=>({}));if(!c.ok)throw Error(d.error||"Kh\xf4ng cập nhật được connection");await aH()}catch(a){m(a.message||"Kh\xf4ng cập nhật được connection")}},aP=async a=>{m(""),o(""),G(a.id);try{let b=await fetch(`/api/personal-cloud-providers/${encodeURIComponent(a.id)}/import-models`,{method:"POST"}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Kh\xf4ng import được model");w(b=>b.map(b=>b.id===a.id?{...b,availableModels:c.models||[],importedModels:c.importedModels||[],modelImport:c.modelImport||b.modelImport}:b)),ao(b=>b?.id===a.id?{...b,availableModels:c.models||[],importedModels:c.importedModels||[],modelImport:c.modelImport||b.modelImport}:b);let d=c.modelImport?.source==="provider"?"provider":"catalog fallback";o(`Đ\xe3 cập nhật ${c.models?.length||0} model từ ${d}.`)}catch(a){m(a.message||"Kh\xf4ng import được model")}finally{G("")}};(0,e.useCallback)(async()=>{let a=i(p);if(a){M(!0);try{let b=`&ownerUser=${encodeURIComponent(a)}`,c=await fetch(`/api/keys?pageSize=100&status=active${b}`,{cache:"no-store"}),d=await c.json().catch(()=>({}));if(!c.ok)throw Error(d.error||"Kh\xf4ng tải được API keys");K(Array.isArray(d.keys)?d.keys:[])}catch(a){m(a.message||"Kh\xf4ng tải được API keys")}finally{M(!1)}}},[p]);let aQ=async a=>{M(!0);try{let b=i(a?.ownerUser||p),c=b?`&ownerUser=${encodeURIComponent(b)}`:"",d=await fetch(`/api/keys?pageSize=100&status=active${c}`,{cache:"no-store"}),e=await d.json().catch(()=>({}));if(!d.ok)throw Error(e.error||"Kh\xf4ng tải được API keys");let f=Array.isArray(e.keys)?e.keys:[];K(f);let g=i(e.userId),h=f.find(a=>i(a.ownerUser||a.createdByUser||g)===b);O(a=>a||h?.id||"")}catch(a){m(a.message||"Kh\xf4ng tải được API keys")}finally{M(!1)}},aR=async a=>{let b,c;m(""),o(""),I(a),Q((c=(b=j(a)).filter(a=>"llm"===(a.type||"llm")).slice(0,3).map(a=>a.routeModel).filter(Boolean)).length>0?c:b.slice(0,3).map(a=>a.routeModel).filter(Boolean)),O(""),await aQ(a)},aS=async()=>{if(!H)return;if(!N)return void m("Chọn API key cần th\xeam model.");let a=Array.from(new Set((Array.isArray(P)?P:[]).map(a=>String(a||"").trim()).filter(Boolean)));if(0===a.length)return void m("Chọn \xedt nhất một model.");S(!0),m(""),o("");try{let b=await fetch(`/api/personal-cloud-providers/${encodeURIComponent(H.id)}/api-key-models`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKeyId:N,models:a})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Kh\xf4ng th\xeam được model v\xe0o API key");I(null),o(`Đ\xe3 th\xeam ${c.addedModels?.length||a.length} model v\xe0o API key ${c.key?.name||""}.`)}catch(a){m(a.message||"Kh\xf4ng th\xeam được model v\xe0o API key")}finally{S(!1)}},aT=async()=>{if(D){m(""),o("");try{let a=await fetch(`/api/personal-cloud-providers/${encodeURIComponent(D.id)}`,{method:"DELETE"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Kh\xf4ng x\xf3a được connection");o(function(a,b="OAuth connection"){let c=a?.revocation||{};return!0===c.upstreamRevoked?`Đ\xe3 revoke token tại provider v\xe0 x\xf3a ${b} khỏi gateway.`:"unsupported"===c.status?`Đ\xe3 x\xf3a token v\xe0 ${b} khỏi gateway. Provider chưa hỗ trợ revoke tự động; h\xe3y thu hồi thủ c\xf4ng trong phần Security/Connected Apps của provider.`:`Đ\xe3 x\xf3a token v\xe0 ${b} khỏi gateway, nhưng kh\xf4ng x\xe1c nhận được revoke tại provider (${c.error||"unknown error"}). H\xe3y thu hồi thủ c\xf4ng trong phần Security/Connected Apps.`}(b.disconnect,D.name||D.id)),E(null),await aH()}catch(a){m(a.message||"Kh\xf4ng x\xf3a được connection")}}},aU=async(a,b)=>{if(a?.id&&b?.routeModel){m(""),as(b.routeModel),aq(a=>({...a,[b.routeModel]:{...a[b.routeModel]||{},loading:!0}}));try{let c=`/api/personal-cloud-providers/${encodeURIComponent(a.id)}/models/${b.routeModel.split("/").map(encodeURIComponent).join("/")}`,d=await fetch(c,{method:"POST"}),e=await d.json().catch(()=>({})),f={ok:e?.ok===!0,status:e?.status||d.status,text:e?.text||"",error:e?.error||(d.ok?"":"Test failed"),latencyMs:e?.latencyMs||0};aq(a=>({...a,[b.routeModel]:f}))}catch(a){aq(c=>({...c,[b.routeModel]:{ok:!1,error:a.message||"Test failed"}}))}finally{as("")}}},aV=async(a,b)=>{if(a?.id&&b?.routeModel&&window.confirm(`X\xf3a model ${b.routeModel} khỏi connection ${a.name||a.id}?`)){m(""),o(""),au(b.routeModel);try{let c=`/api/personal-cloud-providers/${encodeURIComponent(a.id)}/models/${b.routeModel.split("/").map(encodeURIComponent).join("/")}`,d=await fetch(c,{method:"DELETE"}),e=await d.json().catch(()=>({}));if(!d.ok)throw Error(e?.error||"Kh\xf4ng x\xf3a được model");(a=>{if(!a?.connectionId&&!a?.id)return;let b=a.connectionId||a.id;w(c=>c.map(c=>c.id===b?{...c,importedModels:Array.isArray(a.importedModels)?a.importedModels:c.importedModels,availableModels:Array.isArray(a.models)?a.models:Array.isArray(a.availableModels)?a.availableModels:c.availableModels,modelImport:a.modelImport||c.modelImport}:c)),ao(c=>c?.id===b?{...c,importedModels:Array.isArray(a.importedModels)?a.importedModels:c.importedModels,availableModels:Array.isArray(a.models)?a.models:Array.isArray(a.availableModels)?a.availableModels:c.availableModels,modelImport:a.modelImport||c.modelImport}:c)})(e),aq(a=>{let c={...a};return delete c[b.routeModel],c}),o(`Đ\xe3 x\xf3a model ${b.routeModel}.`)}catch(a){m(a.message||"Kh\xf4ng x\xf3a được model")}finally{au("")}}},aW=(a,b)=>{ay(c=>{let d={...c[a]||{},...b};for(let a of Object.keys(d))(""===d[a]||void 0===d[a])&&delete d[a];return{...c,[a]:d}})},aX=async a=>{m(""),o(""),aA(a);try{let b=ax[a]||{},c={providerId:a,override:{fallbackStrategy:b.fallbackStrategy||"",stickyRoundRobinLimit:b.stickyRoundRobinLimit,stickyScope:b.stickyScope||"",stickyTtlMinutes:b.stickyTtlMinutes,stickyFallbackToClientIp:b.stickyFallbackToClientIp,stickyRebindOnFailure:b.stickyRebindOnFailure,stickyRebindFailureThreshold:b.stickyRebindFailureThreshold}},d=await fetch("/api/personal-cloud-providers/routing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}),e=await d.json().catch(()=>({}));if(!d.ok)throw Error(e?.error||"Kh\xf4ng lưu được routing");aw(e.routing||{}),o(`Đ\xe3 cập nhật routing cho ${a}.`)}catch(a){m(a.message||"Kh\xf4ng lưu được routing")}finally{aA("")}},aY=async a=>{m(""),o(""),aA(a);try{let b=await fetch(`/api/personal-cloud-providers/routing?providerId=${encodeURIComponent(a)}`,{method:"DELETE"}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c?.error||"Kh\xf4ng reset được routing");aw(c.routing||{}),ay(b=>{let c={...b};return delete c[a],c}),o(`Đ\xe3 reset ${a} về ch\xednh s\xe1ch mặc định.`)}catch(a){m(a.message||"Kh\xf4ng reset được routing")}finally{aA("")}},aZ=async()=>{let a,b=i(Z);if(!b)return void m("Nhập username/email cần cấp quyền.");let c=String(ab||"").trim();if(""===c)a=null;else{let b=Number.parseInt(c,10);if(!Number.isFinite(b)||b<=0)return void m("Per-user override giới hạn phải l\xe0 số nguy\xean dương hoặc bỏ trống.");a=b}k(!0),m(""),o("");try{let c=await fetch("/api/personal-cloud-providers/permissions",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:b,providers:_,connectionsPerProviderLimit:a})}),d=await c.json().catch(()=>({}));if(!c.ok)throw Error(d.error||"Kh\xf4ng lưu được quyền OAuth");aI(d);let e=d.user?.id||b;e!==b&&$(e),o(`Đ\xe3 lưu quyền OAuth cho ${e}.`),await aH()}catch(a){m(a.message||"Kh\xf4ng lưu được quyền OAuth")}finally{k(!1)}},a$=async()=>{let a=Number.parseInt(ah,10);if(!Number.isFinite(a)||a<=0)return void m("Global limit phải l\xe0 số nguy\xean dương.");ak(!0),m(""),o("");try{let b=await fetch("/api/personal-cloud-providers/permissions",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({globalConnectionsPerProviderLimit:a})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Kh\xf4ng lưu được global limit");aI(c),o(`Đ\xe3 đặt global limit = ${a} account / provider / user.`)}catch(a){m(a.message||"Kh\xf4ng lưu được global limit")}finally{ak(!1)}},a_=async a=>{let b=i(a);if(b){k(!0),m(""),o("");try{let a=await fetch(`/api/personal-cloud-providers/permissions?userId=${encodeURIComponent(b)}`,{method:"DELETE"}),c=await a.json().catch(()=>({}));if(!a.ok)throw Error(c.error||"Kh\xf4ng thu hồi được quyền OAuth");aI(c),i(Z)===b&&$("");let d=c.disconnectSummary||{},e=Number(d.manualActionRequired)||0;o(`Đ\xe3 x\xf3a ${d.deletedCount||0} OAuth connection của ${b} khỏi gateway; ${d.upstreamRevokedCount||0} token đ\xe3 được revoke tại provider.${e>0?` ${e} connection cần kiểm tra/thu hồi thủ c\xf4ng tại provider.`:""}`),ae(""),await aH()}catch(a){m(a.message||"Kh\xf4ng thu hồi được quyền OAuth")}finally{k(!1)}}},a0=x?function(a={}){return{id:a.id,name:a.name||a.id,icon:a.icon||"cloud",color:a.color||"#64748b",website:a.website||"",notice:a.notice||null,deprecationNotice:a.deprecationNotice||"",serviceKinds:a.serviceKinds||["llm"]}}(x):null,a1=r?t:t.filter(a=>a.enabled),a2=j(H),a3=H?.modelImport||{},a4=j(an),a5=aM.find(a=>a.userId===i(ad)),a6=t.reduce((a,b)=>a+Number(a5?.connectionsByProvider?.[b.id]||0),0);return(0,d.jsxs)("div",{className:"space-y-6",children:[(0,d.jsx)("div",{children:(0,d.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-start md:justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Personal Cloud Providers"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Kết nối OAuth c\xe1 nh\xe2n cho Claude Code, OpenAI Codex v\xe0 Antigravity. Account c\xe1 nh\xe2n chỉ owner v\xe0 quản trị vi\xean c\xf3 thẩm quyền nh\xecn thấy; chỉ API key của owner được d\xf9ng. Tắt Active chỉ tạm ngưng v\xe0 vẫn giữ token. Reauth cho ph\xe9p OAuth lại đ\xfang account đ\xf3 khi token hết hạn — ghi đ\xe8 token mới, giữ nguy\xean t\xean/routing/priority (khỏi phải revoke rồi add lại). Delete sẽ thử revoke tại provider rồi x\xf3a token/connection local. Cột RTK cho ph\xe9p override ri\xeang từng account (Lu\xf4n ON / Lu\xf4n OFF) bất kể cấu h\xecnh RTK global ở /dashboard/endpoint đang on hay off — để trống th\xec theo global."})]}),(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface px-4 py-3 text-sm",children:[(0,d.jsx)("div",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Current user"}),(0,d.jsx)("div",{className:"mt-1 break-all font-mono text-text-main",children:p||"—"}),r||null===aF?null:(0,d.jsxs)("div",{className:"mt-2 border-t border-border pt-2 text-xs text-text-muted",children:["Giới hạn: ",(0,d.jsx)("span",{className:"font-semibold text-text-main",children:aF})," account / provider"]})]})]})}),l?(0,d.jsx)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-700 dark:text-red-300",children:l}):null,n?(0,d.jsx)("div",{className:"rounded-2xl border border-green-500/30 bg-green-500/10 px-4 py-3 text-sm text-green-700 dark:text-green-300",children:n}):null,(0,d.jsx)("div",{className:"grid gap-4 lg:grid-cols-3",children:0===t.length?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted lg:col-span-3",children:"Admin chưa cấp quyền personal OAuth provider n\xe0o cho user n\xe0y."}):t.map(a=>{let b=v.filter(b=>b.provider===a.id).length,c=!r&&null!==aF&&a.enabled,e=c&&b>=aF;return(0,d.jsxs)(f.Zp,{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"inline-flex size-10 shrink-0 items-center justify-center rounded-xl",style:{backgroundColor:`${a.color||"#64748b"}22`},children:(0,d.jsx)(g.A,{src:`/providers/${a.id}.png`,alt:a.name,size:34,className:"max-h-[34px] max-w-[34px] rounded-lg object-contain",fallbackText:a.id.slice(0,2).toUpperCase(),fallbackColor:a.color||"#64748b"})}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("h2",{className:"font-semibold text-text-main",children:a.name}),a.enabled?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Enabled"}):(0,d.jsx)(f.Ex,{variant:"warning",size:"sm",children:"Locked"}),c?(0,d.jsxs)(f.Ex,{variant:e?"error":"default",size:"sm",title:"Số account OAuth c\xe1 nh\xe2n bạn c\xf3 thể add cho provider n\xe0y",children:[b,"/",aF]}):null]}),(0,d.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:a.enabled?"Được admin cấp quyền, c\xf3 thể add OAuth account c\xe1 nh\xe2n.":"Admin chưa cấp quyền cho user n\xe0y."})]})]}),a.deprecationNotice?(0,d.jsx)("p",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:a.deprecationNotice}):null,(0,d.jsx)(f.$n,{fullWidth:!0,disabled:!a.enabled||e,onClick:()=>{a.enabled&&C(a)},icon:"add_link",children:e?`Đ\xe3 đạt giới hạn ${aF} account`:`Add ${a.name} account`})]},a.id)})}),(0,d.jsxs)(f.Zp,{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"My personal accounts"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"OAuth xong sẽ tự import model nếu provider hỗ trợ. Nếu kh\xf4ng gọi được endpoint model, hệ thống d\xf9ng catalog fallback để user vẫn chọn được model."})]}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:aH,loading:a,icon:"refresh",children:"Refresh"})]}),a?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:"Đang tải..."}):0===v.length?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:"Chưa c\xf3 personal OAuth account n\xe0o."}):(0,d.jsx)("div",{className:"overflow-x-auto rounded-2xl border border-border",children:(0,d.jsxs)("table",{className:"min-w-full divide-y divide-border text-sm",children:[(0,d.jsx)("thead",{className:"bg-surface/80 text-left text-xs uppercase tracking-wide text-text-muted",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Connection"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Provider"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Account"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Models"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Created"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"API key routing"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",title:"Tắt = tạm ngưng sử dụng, token vẫn được giữ",children:"Active (tạm ngưng)"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["RTK (Token Savings)",(0,d.jsxs)(f.Ex,{variant:aD?"success":"default",size:"sm",className:"normal-case",children:["Global: ",aD?"ON":"OFF"]}),(0,d.jsx)("button",{type:"button",onClick:()=>aC(!0),title:"RTK l\xe0 g\xec? Bấm để xem giải th\xedch",className:"inline-flex size-4 shrink-0 items-center justify-center rounded-full border border-border text-[10px] font-bold normal-case text-text-muted transition-colors hover:border-brand-500 hover:text-brand-600",children:"?"})]})}),(0,d.jsx)("th",{className:"px-4 py-3 text-right font-medium",children:"Actions"})]})}),(0,d.jsx)("tbody",{className:"divide-y divide-border bg-background",children:v.map(a=>{let b=Array.isArray(a?.availableModels)?a.availableModels:[],c=a.modelImport||{};return(0,d.jsxs)("tr",{className:"align-top hover:bg-surface/50",children:[(0,d.jsxs)("td",{className:"px-4 py-4",children:[(0,d.jsx)("div",{className:"font-medium text-text-main",children:a.name||a.id}),(0,d.jsx)("div",{className:"mt-1 font-mono text-xs text-text-muted",children:a.id})]}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(g.A,{src:`/providers/${a.provider}.png`,alt:a.provider,size:24,className:"max-h-[24px] max-w-[24px] rounded object-contain",fallbackText:a.provider.slice(0,2).toUpperCase()}),(0,d.jsx)("span",{children:h(a.provider,t)})]})}),(0,d.jsxs)("td",{className:"px-4 py-4",children:[(0,d.jsx)("div",{className:"break-all text-text-main",children:function(a={}){let b=a.providerSpecificData&&"object"==typeof a.providerSpecificData?a.providerSpecificData:{};return a.email||b.email||b.preferredUsername||a.displayName||b.sub||b.accountId||b.claudeAccountId||b.chatgptAccountId||"—"}(a)}),(0,d.jsxs)("div",{className:"mt-1 break-all text-xs text-text-muted",children:["Owner: ",a.ownerUser||p||"—"]})]}),(0,d.jsxs)("td",{className:"px-4 py-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[function(a={}){return"provider"===(a.source||"catalog")?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Imported"}):(0,d.jsx)(f.Ex,{variant:"warning",size:"sm",children:"Catalog"})}(c),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:[b.length," model(s)"]})]}),c.warning?(0,d.jsx)("div",{className:"mt-1 max-w-[320px] truncate text-xs text-amber-600 dark:text-amber-300",title:c.warning,children:c.warning}):null,b.length>0?(0,d.jsxs)("div",{className:"mt-2 flex max-w-[360px] flex-wrap gap-1",children:[b.slice(0,4).map(a=>(0,d.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-0.5 font-mono text-[11px] text-text-muted",children:a.routeModel},a.routeModel)),b.length>4?(0,d.jsxs)("span",{className:"rounded-full border border-border bg-surface px-2 py-0.5 text-[11px] text-text-muted",children:["+",b.length-4]}):null]}):null]}),(0,d.jsx)("td",{className:"px-4 py-4 text-xs text-text-muted",children:function(a){if(!a)return"—";try{return new Intl.DateTimeFormat("vi-VN",{dateStyle:"short",timeStyle:"short"}).format(new Date(a))}catch{return a}}(a.createdAt)}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("div",{className:"min-w-[220px] space-y-1",children:[(0,d.jsxs)("select",{value:a.routeApiKeyId||"",onChange:b=>aO(a.id,{routeApiKeyId:b.target.value||null}),disabled:L||i(a.ownerUser||p)!==i(p),className:"h-9 w-full rounded-xl border border-border bg-background px-2 text-xs text-text-main outline-none focus:border-brand-500 disabled:opacity-60",children:[(0,d.jsx)("option",{value:"",children:"Shared across my API keys"}),J.filter(b=>i(b.ownerUser||b.createdByUser||p)===i(a.ownerUser||p)).map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))]}),(0,d.jsx)("div",{className:"text-[11px] text-text-muted",children:a.routeApiKeyId?`Only ${aL.get(a.routeApiKeyId)||"selected API key"} can use this account.`:"Unassigned accounts remain shared fallback for your eligible API keys."})]})}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsx)(f.lM,{checked:!1!==a.isActive,onChange:b=>aO(a.id,{isActive:b})})}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("select",{value:!0===a.rtkEnabled?"on":!1===a.rtkEnabled?"off":"inherit",onChange:b=>{let c=b.target.value;aO(a.id,{rtkEnabled:"inherit"===c?null:"on"===c})},className:"h-9 w-full min-w-[140px] rounded-xl border border-border bg-background px-2 text-xs text-text-main outline-none focus:border-brand-500",children:[(0,d.jsx)("option",{value:"inherit",children:"Theo global"}),(0,d.jsx)("option",{value:"on",children:"Lu\xf4n ON"}),(0,d.jsx)("option",{value:"off",children:"Lu\xf4n OFF"})]})}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"outline",size:"sm",loading:F===a.id,onClick:()=>aP(a),children:"Import models"}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",disabled:0===j(a).length,onClick:()=>{m(""),o(""),ao(a),aq({}),as(""),au("")},children:"Manage models"}),(0,d.jsx)(f.$n,{variant:"secondary",size:"sm",disabled:0===j(a).length,onClick:()=>aR(a),children:"Add to API key"}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>{let b;return b=window.prompt("T\xean connection mới",a.name||""),void(b?.trim()&&aO(a.id,{name:b.trim()}))},children:"Rename"}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",icon:"autorenew",title:"OAuth lại account n\xe0y khi token hết hạn — token mới sẽ ghi đ\xe8, giữ nguy\xean t\xean/routing/priority",onClick:()=>{let b;!(b=t.find(b=>b.id===a.provider))?m("Provider kh\xf4ng c\xf2n khả dụng, kh\xf4ng thể reauth."):(m(""),o(""),A(a),y(b))},children:"Reauth"}),(0,d.jsx)(f.$n,{variant:"danger",size:"sm",onClick:()=>E(a),children:"Revoke & delete"})]})})]},a.id)})})]})})]}),(0,d.jsxs)(f.Zp,{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Routing strategy"}),(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Khi bạn c\xf3 nhiều personal account cho c\xf9ng provider, đ\xe2y l\xe0 ch\xednh s\xe1ch chọn account cho từng request. Để trống = kế thừa ch\xednh s\xe1ch của admin ở ",(0,d.jsx)("span",{className:"font-mono",children:"/dashboard/providers/<provider>"}),"."]})]}),(0,d.jsx)("div",{className:"grid gap-4 lg:grid-cols-3",children:0===a1.length?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-6 text-center text-sm text-text-muted lg:col-span-3",children:"Bạn chưa được cấp quyền provider n\xe0o, n\xean chưa cần thiết lập routing."}):a1.map(a=>{let b=ax[a.id]||{},c=av[a.id]||null,e=!c,g=b.fallbackStrategy||"",h="round-robin"===g,i=az===a.id;return(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.name}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:e?"Đang kế thừa policy global":`Override active: ${c.fallbackStrategy||"inherit"}`})]}),e?(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Inherit"}):(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Override"})]}),(0,d.jsxs)("label",{className:"block text-sm",children:[(0,d.jsx)("span",{className:"mb-1 block font-medium text-text-main",children:"Strategy"}),(0,d.jsxs)("select",{value:g,onChange:b=>aW(a.id,{fallbackStrategy:b.target.value}),className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none focus:border-brand-500",disabled:i,children:[(0,d.jsx)("option",{value:"",children:"Inherit (use global)"}),(0,d.jsx)("option",{value:"fill-first",children:"fill-first — chạy hết account 1 mới sang account 2"}),(0,d.jsx)("option",{value:"round-robin",children:"round-robin — lu\xe2n phi\xean theo sticky limit"}),(0,d.jsx)("option",{value:"least-latency",children:"least-latency — chọn account nhanh nhất"}),(0,d.jsx)("option",{value:"p2c",children:"p2c — power-of-two-choices"})]})]}),h?(0,d.jsxs)("div",{className:"space-y-2 rounded-xl border border-border/50 bg-background/50 p-3",children:[(0,d.jsx)("div",{className:"text-xs text-text-muted",children:"Round-robin sticky params (để trống = d\xf9ng gi\xe1 trị global)"}),(0,d.jsxs)("label",{className:"block text-xs",children:[(0,d.jsx)("span",{className:"mb-1 block text-text-muted",children:"Sticky limit (số request li\xean tiếp trước khi rotate)"}),(0,d.jsx)(f.pd,{type:"number",min:1,value:b.stickyRoundRobinLimit??"",onChange:b=>aW(a.id,{stickyRoundRobinLimit:b.target.value?Number(b.target.value):void 0}),placeholder:"v\xed dụ 3",disabled:i})]}),(0,d.jsxs)("label",{className:"block text-xs",children:[(0,d.jsx)("span",{className:"mb-1 block text-text-muted",children:"Sticky scope"}),(0,d.jsxs)("select",{value:b.stickyScope||"",onChange:b=>aW(a.id,{stickyScope:b.target.value}),className:"h-9 w-full rounded-xl border border-border bg-background px-3 text-xs text-text-main outline-none focus:border-brand-500",disabled:i,children:[(0,d.jsx)("option",{value:"",children:"(inherit)"}),(0,d.jsx)("option",{value:"global",children:"global — rotate cho mọi request"}),(0,d.jsx)("option",{value:"client_ip",children:"client_ip — sticky theo IP"}),(0,d.jsx)("option",{value:"client_session",children:"client_session — sticky theo CLI session"})]})]}),(0,d.jsxs)("label",{className:"block text-xs",children:[(0,d.jsx)("span",{className:"mb-1 block text-text-muted",children:"Sticky TTL (ph\xfat)"}),(0,d.jsx)(f.pd,{type:"number",min:1,value:b.stickyTtlMinutes??"",onChange:b=>aW(a.id,{stickyTtlMinutes:b.target.value?Number(b.target.value):void 0}),placeholder:"v\xed dụ 120",disabled:i})]})]}):null,(0,d.jsxs)("div",{className:"flex flex-wrap gap-2 pt-1",children:[(0,d.jsx)(f.$n,{size:"sm",loading:i,onClick:()=>aX(a.id),children:"Save"}),(0,d.jsx)(f.$n,{size:"sm",variant:"ghost",disabled:i||e,onClick:()=>aY(a.id),children:"Reset to inherit"})]})]},a.id)})})]}),r?(0,d.jsxs)(f.Zp,{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Admin: OAuth provider access"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Default l\xe0 kh\xf4ng c\xf3 quyền. Tắt provider chỉ tạm ngưng connection v\xe0 giữ token để c\xf3 thể bật lại. N\xfat Revoke all sẽ thử revoke upstream rồi x\xf3a to\xe0n bộ connection/token local của user."})]}),(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,d.jsx)("div",{className:"text-sm font-medium",children:"Global limit — số account OAuth c\xe1 nh\xe2n / provider / user thường"}),(0,d.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"\xc1p dụng cho user kh\xf4ng c\xf3 per-user override. Admin kh\xf4ng bị chặn bởi limit n\xe0y."}),(0,d.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,d.jsx)(f.pd,{type:"number",min:1,value:ah,onChange:a=>ai(a.target.value),className:"sm:w-48"}),(0,d.jsx)(f.$n,{onClick:a$,loading:aj,disabled:aj||Number.parseInt(ah,10)===af,children:"Lưu global"}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Đang lưu: ",af]})]})]}),(0,d.jsxs)("div",{className:"grid gap-3 md:grid-cols-[minmax(0,1fr)_auto] md:items-end",children:[(0,d.jsx)(f.pd,{label:"User ID / Email",value:Z,onChange:a=>$(a.target.value),placeholder:"anh-tct hoặc anh-tct@fujinet.net"}),(0,d.jsx)(f.$n,{onClick:aZ,loading:c,icon:"save",children:"Save permissions"})]}),(0,d.jsx)("div",{className:"grid gap-3 md:grid-cols-3",children:t.map(a=>(0,d.jsx)("div",{className:"rounded-2xl border border-border bg-surface p-4",children:(0,d.jsx)(f.lM,{checked:!0===_[a.id],onChange:b=>aa(c=>({...c,[a.id]:b})),label:a.name,description:_[a.id]?"User được ph\xe9p add account":"User chưa được cấp quyền"})},a.id))}),(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,d.jsx)("div",{className:"text-sm font-medium",children:"Per-user override — account / provider"}),(0,d.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Ghi đ\xe8 global cho ",(0,d.jsx)("span",{className:"font-mono",children:i(Z)||"user đang chọn"}),". Để trống rồi Save permissions để bỏ override v\xe0 quay lại global (",af,")."]}),(0,d.jsx)("div",{className:"mt-3 max-w-xs",children:(0,d.jsx)(f.pd,{type:"number",min:1,value:ab,onChange:a=>ac(a.target.value),placeholder:`Để trống = d\xf9ng global (${af})`})})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-4",children:[(0,d.jsxs)("div",{className:"mb-3 flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Granted OAuth Access"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Danh s\xe1ch user hiện đang được cấp quyền add personal OAuth account."})]}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:aJ,loading:T,icon:"refresh",children:"Refresh list"})]}),T?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-6 text-center text-sm text-text-muted",children:"Đang tải quyền..."}):0===aM.length?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-6 text-center text-sm text-text-muted",children:"Chưa c\xf3 user n\xe0o được cấp quyền OAuth provider."}):(0,d.jsx)("div",{className:"overflow-x-auto rounded-2xl border border-border",children:(0,d.jsxs)("table",{className:"min-w-full divide-y divide-border text-sm",children:[(0,d.jsx)("thead",{className:"bg-surface/80 text-left text-xs uppercase tracking-wide text-text-muted",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"User"}),t.map(a=>(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:a.name},a.id)),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",title:"Số account OAuth tối đa cho mỗi provider m\xe0 user được add",children:"Limit / provider"}),(0,d.jsx)("th",{className:"px-4 py-3 text-right font-medium",children:"Actions"})]})}),(0,d.jsx)("tbody",{className:"divide-y divide-border bg-background",children:aM.map(a=>(0,d.jsxs)("tr",{className:"hover:bg-surface/50",children:[(0,d.jsxs)("td",{className:"px-4 py-4",children:[(0,d.jsx)("div",{className:"break-all font-mono text-text-main",children:a.userId}),i(Z)===a.userId?(0,d.jsx)("div",{className:"mt-1 text-xs text-brand-600 dark:text-brand-300",children:"Đang edit ở form ph\xeda tr\xean"}):null]}),t.map(b=>{let c=!0===a.providerState[b.id],e=a.connectionsByProvider?.[b.id]||0,h=e>0;return(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[c?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"ON"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"OFF"}),h?(0,d.jsxs)("span",{className:"inline-flex items-center gap-0.5",title:`User đ\xe3 add ${e} ${b.name} account${e>1?"s":""}`,children:[(0,d.jsx)(g.A,{src:`/providers/${b.id}.png`,alt:b.name,size:16,className:"max-h-[16px] max-w-[16px] rounded object-contain",fallbackText:b.id.slice(0,2).toUpperCase(),fallbackColor:b.color||"#64748b"}),e>1?(0,d.jsxs)("span",{className:"text-[10px] font-semibold text-text-muted",children:["\xd7",e]}):null]}):null]})},b.id)}),(0,d.jsx)("td",{className:"px-4 py-4 text-xs",children:al[a.userId]>0?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,d.jsx)(f.Ex,{variant:"warning",size:"sm",children:"Override"}),(0,d.jsx)("span",{className:"font-mono",children:al[a.userId]})]}):(0,d.jsxs)("span",{className:"text-text-muted",children:["Global \xb7 ",af]})}),(0,d.jsx)("td",{className:"px-4 py-4",children:(0,d.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>(a=>{let b=i(a);$(b);let c=V[b]||{},d={};for(let a of t)d[a.id]=!0===c[a.id];aa(d)})(a.userId),children:"Edit"}),(0,d.jsx)(f.$n,{variant:"danger",size:"sm",loading:c&&ad===a.userId,onClick:()=>ae(a.userId),children:"Revoke all & delete"})]})})]},a.userId))})]})})]})]}):null,H?(0,d.jsx)(f.aF,{isOpen:!!H,onClose:()=>I(null),title:"Add models to API key",size:"full",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.$n,{variant:"ghost",onClick:()=>I(null),disabled:R,children:"Cancel"}),(0,d.jsx)(f.$n,{onClick:aS,loading:R,disabled:!N||0===P.length,children:"Add selected models"})]}),children:(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 text-sm",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:H.name||H.id}),(0,d.jsxs)("div",{className:"mt-1 text-text-muted",children:[h(H.provider,t)," \xb7 ",a2.length," imported model(s)"]}),a3.warning?(0,d.jsx)("div",{className:"mt-2 text-xs text-amber-600 dark:text-amber-300",children:a3.warning}):null,0===a2.length?(0,d.jsx)("div",{className:"mt-2 rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:'Chưa import được model n\xe0o từ provider. Bấm "Import models" tr\xean d\xf2ng connection trước khi g\xe1n v\xe0o API key.'}):null]}),(0,d.jsxs)("label",{className:"block text-sm",children:[(0,d.jsx)("span",{className:"mb-1 block font-medium text-text-main",children:"API key"}),(0,d.jsxs)("select",{value:N,onChange:a=>O(a.target.value),className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none focus:border-brand-500",disabled:L,children:[(0,d.jsx)("option",{value:"",children:L?"Đang tải API keys...":"Chọn API key"}),aK.map(a=>(0,d.jsxs)("option",{value:a.id,children:[a.name," \xb7 ",a.ownerUser||p]},a.id))]})]}),0!==aK.length||L?null:(0,d.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-sm text-amber-700 dark:text-amber-300",children:"User n\xe0y chưa c\xf3 API key active để th\xeam model."}),(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Models"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Model được lưu v\xe0o allowedModels của API key. Request sẽ route qua personal OAuth account của owner."})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>Q(a2.map(a=>a.routeModel).filter(Boolean)),children:"Select all"}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>Q([]),children:"Clear"})]})]}),(0,d.jsx)("div",{className:"grid gap-2 md:grid-cols-2",children:a2.map(a=>(0,d.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border border-border bg-background p-3 hover:bg-surface",children:[(0,d.jsx)("input",{type:"checkbox",className:"mt-1",checked:P.includes(a.routeModel),onChange:()=>{var b;return b=a.routeModel,void Q(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])}}),(0,d.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,d.jsx)("span",{className:"block font-medium text-text-main",children:a.name||a.id}),(0,d.jsx)("span",{className:"mt-1 block break-all font-mono text-xs text-text-muted",children:a.routeModel}),a.type&&"llm"!==a.type?(0,d.jsx)("span",{className:"mt-2 inline-flex rounded-full bg-surface px-2 py-0.5 text-[11px] text-text-muted",children:a.type}):null]})]},a.routeModel))})]})}):null,an?(0,d.jsx)(f.aF,{isOpen:!!an,onClose:()=>ao(null),title:"Manage imported models",size:"full",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.$n,{variant:"ghost",onClick:()=>ao(null),children:"Close"}),(0,d.jsx)(f.$n,{variant:"outline",loading:F===an.id,onClick:()=>aP(an),icon:"refresh",children:"Re-import from provider"})]}),children:(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 text-sm",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:an.name||an.id}),(0,d.jsxs)("div",{className:"mt-1 text-text-muted",children:[h(an.provider,t)," \xb7 ",a4.length," imported model(s)"]}),(0,d.jsx)("div",{className:"mt-2 text-xs text-text-muted",children:'Test gửi 1 prompt "Say hello in five words" qua ch\xednh OAuth account của bạn, qua đ\xfang proxy của connection. X\xf3a model sẽ bỏ n\xf3 khỏi list importable; c\xe1c API key đ\xe3 gắn model n\xe0y kh\xf4ng bị thay đổi (request đến model đ\xf3 sẽ do provider ph\xeda tr\xean quyết định chấp nhận hay kh\xf4ng).'})]}),0===a4.length?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:'Chưa c\xf3 model n\xe0o được import. Bấm "Re-import from provider".'}):(0,d.jsx)("div",{className:"overflow-x-auto rounded-2xl border border-border",children:(0,d.jsxs)("table",{className:"min-w-full divide-y divide-border text-sm",children:[(0,d.jsx)("thead",{className:"bg-surface/80 text-left text-xs uppercase tracking-wide text-text-muted",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Model"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Route ID"}),(0,d.jsx)("th",{className:"px-4 py-3 font-medium",children:"Test result"}),(0,d.jsx)("th",{className:"px-4 py-3 text-right font-medium",children:"Actions"})]})}),(0,d.jsx)("tbody",{className:"divide-y divide-border bg-background",children:a4.map(a=>{let b=ap[a.routeModel],c=ar===a.routeModel,e=at===a.routeModel;return(0,d.jsxs)("tr",{className:"align-top",children:[(0,d.jsxs)("td",{className:"px-4 py-3",children:[(0,d.jsx)("div",{className:"font-medium text-text-main",children:a.name||a.id}),a.type&&"llm"!==a.type?(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:a.type}):null]}),(0,d.jsx)("td",{className:"px-4 py-3 font-mono text-xs text-text-muted break-all",children:a.routeModel}),(0,d.jsx)("td",{className:"px-4 py-3 text-xs",children:c?(0,d.jsx)("span",{className:"text-text-muted",children:"Đang test..."}):b?b.ok?(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsxs)("div",{className:"text-green-700 dark:text-green-300",children:["OK \xb7 ",b.latencyMs||0,"ms"]}),(0,d.jsx)("div",{className:"break-all text-text-muted",children:(b.text||"").slice(0,200)})]}):(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsxs)("div",{className:"text-red-700 dark:text-red-300",children:["FAIL \xb7 status ",b.status||"?"]}),(0,d.jsx)("div",{className:"break-all text-text-muted",children:(b.error||"").slice(0,200)})]}):(0,d.jsx)("span",{className:"text-text-muted",children:"—"})}),(0,d.jsx)("td",{className:"px-4 py-3",children:(0,d.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"outline",size:"sm",loading:c,disabled:e,onClick:()=>aU(an,a),children:"Say hello"}),(0,d.jsx)(f.$n,{variant:"danger",size:"sm",loading:e,disabled:c,onClick:()=>aV(an,a),children:"Delete"})]})})]},a.routeModel)})})]})})]})}):null,aB?(0,d.jsx)(f.aF,{isOpen:aB,onClose:()=>aC(!1),title:"RTK (Token Savings) l\xe0 g\xec?",size:"xl",footer:(0,d.jsx)(f.$n,{onClick:()=>aC(!1),children:"Đ\xe3 hiểu"}),children:(0,d.jsxs)("div",{className:"space-y-5 text-sm text-text-main",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-border bg-surface px-3 py-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Global RTK hiện đang:"}),(0,d.jsx)(f.Ex,{variant:aD?"success":"default",size:"sm",children:aD?"ON":"OFF"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:'— \xe1p dụng cho mọi account chọn "Theo global"'})]}),(0,d.jsx)("p",{className:"text-text-muted",children:"RTK l\xe0 bộ lọc n\xe9n output của tool (Bash, Grep, Glob, Read...) ngay trong request trước khi gửi l\xean model, gi\xfap giảm số token phải gửi m\xe0 kh\xf4ng l\xe0m mất th\xf4ng tin quan trọng — chỉ t\xe1c động tới phần tool output, kh\xf4ng đụng v\xe0o nội dung chat."}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"mb-2 font-semibold text-text-main",children:"Hoạt động ra sao với CLI tool"}),(0,d.jsx)("p",{className:"text-text-muted",children:"Mỗi khi Claude Code / Codex CLI / OpenCode... gọi tool v\xe0 nhận lại output, RTK tự nhận diện định dạng quen thuộc rồi r\xfat gọn theo đ\xfang cấu tr\xfac của n\xf3:"}),(0,d.jsxs)("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-text-muted",children:[(0,d.jsxs)("li",{children:[(0,d.jsx)("span",{className:"font-mono text-text-main",children:"git diff"})," — giữ v\xe0i d\xf2ng context quanh thay đổi, cắt phần hunk qu\xe1 d\xe0i"]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("span",{className:"font-mono text-text-main",children:"git status"})," / ",(0,d.jsx)("span",{className:"font-mono text-text-main",children:"git log"})," — gom gọn danh s\xe1ch file thay đổi, danh s\xe1ch commit"]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("span",{className:"font-mono text-text-main",children:"grep"})," / ",(0,d.jsx)("span",{className:"font-mono text-text-main",children:"find"})," — giới hạn số match hiển thị mỗi file/thư mục"]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("span",{className:"font-mono text-text-main",children:"ls -la"})," / ",(0,d.jsx)("span",{className:"font-mono text-text-main",children:"tree"})," — t\xf3m tắt theo loại file, cắt c\xe2y thư mục qu\xe1 s\xe2u"]}),(0,d.jsx)("li",{children:"Build log (npm/yarn/cargo...) — chỉ giữ d\xf2ng quan trọng (lỗi, kết quả build)"}),(0,d.jsx)("li",{children:"Output d\xe0i chung kh\xf4ng r\xf5 định dạng — fallback dedup d\xf2ng lặp hoặc smart-truncate (giữ đầu + cuối)"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"mb-2 font-semibold text-text-main",children:"Hiệu quả thực tế"}),(0,d.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",children:(0,d.jsxs)("table",{className:"min-w-full text-xs",children:[(0,d.jsx)("thead",{className:"bg-surface/80 text-left uppercase tracking-wide text-text-muted",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-3 py-2 font-medium",children:"Loại output"}),(0,d.jsx)("th",{className:"px-3 py-2 font-medium",children:"Trước"}),(0,d.jsx)("th",{className:"px-3 py-2 font-medium",children:"Sau"}),(0,d.jsx)("th",{className:"px-3 py-2 font-medium",children:"Tiết kiệm"})]})}),(0,d.jsxs)("tbody",{className:"divide-y divide-border",children:[(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{className:"px-3 py-2 font-mono",children:"git diff"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"7384B"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"3894B"}),(0,d.jsx)("td",{className:"px-3 py-2 text-green-600 dark:text-green-400",children:"47.3%"})]}),(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{className:"px-3 py-2 font-mono",children:"grep -n"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"3723B"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"1447B"}),(0,d.jsx)("td",{className:"px-3 py-2 text-green-600 dark:text-green-400",children:"61.1%"})]}),(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{className:"px-3 py-2 font-mono",children:"find"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"729B"}),(0,d.jsx)("td",{className:"px-3 py-2",children:"264B"}),(0,d.jsx)("td",{className:"px-3 py-2 text-green-600 dark:text-green-400",children:"63.8%"})]})]})]})})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"mb-2 font-semibold text-text-main",children:"Khi n\xe0o KH\xd4NG bị n\xe9n"}),(0,d.jsxs)("ul",{className:"list-disc space-y-1 pl-5 text-text-muted",children:[(0,d.jsx)("li",{children:"Chat thường kh\xf4ng gọi tool — kh\xf4ng c\xf3 g\xec để n\xe9n"}),(0,d.jsx)("li",{children:"Output nhỏ hơn 500B — kh\xf4ng đ\xe1ng n\xe9n"}),(0,d.jsxs)("li",{children:["Output b\xe1o lỗi (",(0,d.jsx)("span",{className:"font-mono text-text-main",children:"is_error"}),") — lu\xf4n giữ nguy\xean để debug"]}),(0,d.jsx)("li",{children:"Output lớn hơn 10MB — bỏ qua để tr\xe1nh tốn CPU xử l\xfd"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"mb-2 font-semibold text-text-main",children:"Global vs từng account"}),(0,d.jsxs)("p",{className:"text-text-muted",children:["Dropdown RTK ở bảng tr\xean cho ph\xe9p override ri\xeang từng account:",(0,d.jsx)("span",{className:"font-semibold text-text-main",children:" Theo global"})," (mặc định, d\xf9ng đ\xfang setting global),",(0,d.jsx)("span",{className:"font-semibold text-text-main",children:" Lu\xf4n ON"})," hoặc",(0,d.jsx)("span",{className:"font-semibold text-text-main",children:" Lu\xf4n OFF"})," — override lu\xf4n thắng global theo cả 2 chiều, n\xean c\xf3 thể để global OFF v\xe0 chỉ bật cho account d\xf9ng CLI tool, hoặc ngược lại."]})]})]})}):null,(0,d.jsx)(f.v9,{isOpen:!!B,provider:B,onAccept:()=>{C(null),B&&y(B)},onCancel:()=>{C(null)}}),a0?(0,d.jsx)(f.LF,{isOpen:!!x,provider:x.id,providerInfo:a0,connectionScope:"personal",reauthConnectionId:z?.id||"",onSuccess:aN,onClose:()=>{y(null),A(null)}}):null,D?(0,d.jsx)(f.uo,{isOpen:!!D,onClose:()=>E(null),onConfirm:aT,title:"Revoke and delete personal account",message:`Gateway sẽ thử revoke token của ${D.name||D.id} tại provider, sau đ\xf3 x\xf3a token v\xe0 connection local. ${"claude"===D.provider?"Claude chưa c\xf3 endpoint revoke tự động được c\xf4ng bố; bạn c\xf3 thể cần thu hồi thủ c\xf4ng trong t\xe0i khoản Claude.":"Nếu provider kh\xf4ng x\xe1c nhận revoke, hệ thống sẽ th\xf4ng b\xe1o để bạn thu hồi thủ c\xf4ng."}`,confirmText:"Revoke & delete",cancelText:"Cancel",variant:"danger"}):null,ad?(0,d.jsx)(f.aF,{isOpen:!!ad,onClose:()=>ae(""),title:"Thu hồi to\xe0n bộ quyền OAuth",size:"lg",busy:c,closeOnOverlay:!c,footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.$n,{variant:"ghost",onClick:()=>ae(""),disabled:c,children:"Hủy"}),(0,d.jsx)(f.$n,{variant:"danger",icon:"delete_forever",loading:c,onClick:()=>a_(ad),children:"Thu hồi v\xe0 x\xf3a to\xe0n bộ"})]}),children:(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{className:"flex items-start gap-4 rounded-2xl border border-red-500/30 bg-gradient-to-br from-red-500/15 to-orange-500/5 p-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-2xl bg-red-500 text-white shadow-lg shadow-red-500/20",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[28px]",children:"warning"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("div",{className:"text-sm font-medium text-red-700 dark:text-red-300",children:"H\xe0nh động nguy hiểm, kh\xf4ng thể ho\xe0n t\xe1c"}),(0,d.jsx)("div",{className:"mt-1 break-all text-lg font-semibold text-text-main",children:ad}),(0,d.jsxs)("p",{className:"mt-2 text-sm leading-6 text-text-muted",children:["Thu hồi to\xe0n bộ quyền OAuth provider của ",(0,d.jsx)("span",{className:"font-semibold text-text-main",children:ad}),"? OAuth account của user n\xe0y sẽ bị ",(0,d.jsx)("span",{className:"font-semibold text-red-600 dark:text-red-300",children:"X\xd3A HẲN"})," khỏi gateway."]})]})]}),(0,d.jsx)("div",{className:"grid gap-3 sm:grid-cols-3",children:[["key_off","Token OAuth","Thử revoke upstream rồi x\xf3a token local"],["deployed_code","Model đ\xe3 import","X\xf3a dữ liệu model của connection"],["vpn_key_off","API key đ\xe3 g\xe1n","Gỡ model tương ứng khỏi API key"]].map(([a,b,c])=>(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-background p-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px] text-red-500",children:a}),(0,d.jsx)("div",{className:"mt-2 text-sm font-semibold text-text-main",children:b}),(0,d.jsx)("div",{className:"mt-1 text-xs leading-5 text-text-muted",children:c})]},b))}),(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface/70 p-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,d.jsx)("span",{className:"text-sm text-text-muted",children:"Connection t\xecm thấy"}),(0,d.jsx)(f.Ex,{variant:a6>0?"warning":"default",size:"sm",children:a6})]}),a5?(0,d.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:t.map(a=>{let b=Number(a5.connectionsByProvider?.[a.id]||0);return b>0?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-border bg-background px-2.5 py-1 text-xs text-text-muted",children:[(0,d.jsx)(g.A,{src:`/providers/${a.id}.png`,alt:a.name,size:16,className:"max-h-[16px] max-w-[16px] rounded object-contain",fallbackText:a.id.slice(0,2).toUpperCase()}),a.name," \xd7",b]},a.id):null})}):null]}),(0,d.jsx)("p",{className:"text-xs leading-5 text-text-muted",children:"Nếu provider kh\xf4ng hỗ trợ revoke tự động hoặc kh\xf4ng phản hồi, gateway vẫn x\xf3a token local v\xe0 sẽ th\xf4ng b\xe1o để quản trị vi\xean thu hồi thủ c\xf4ng trong Security/Connected Apps của provider."})]})}):null]})}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17194:(a,b,c)=>{"use strict";c.d(b,{default:()=>i});var d=c(48249),e=c(67484),f=c(50412),g=c(72738),h=c(20151);function i(){let{isAdmin:a}=(0,h.s)(),[b,c]=(0,e.useState)([]),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),q=(0,e.useCallback)(async()=>{if(a){j(!0),n("");try{let a=await fetch("/api/personal-cloud-providers/visibility",{cache:"no-store"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Kh\xf4ng tải được trạng th\xe1i Show/Hide provider");c(Array.isArray(b.providers)?b.providers:[])}catch(a){n(a?.message||"Kh\xf4ng tải được trạng th\xe1i Show/Hide provider")}finally{j(!1)}}},[a]);if(!a)return null;let r=async(a,b)=>{l(a.id),n(""),p("");try{let d=await fetch("/api/personal-cloud-providers/visibility",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerId:a.id,visible:b})}),e=await d.json().catch(()=>({}));if(!d.ok)throw Error(e.error||"Kh\xf4ng cập nhật được visibility provider");c(Array.isArray(e.providers)?e.providers:[]),p(`${a.name}: ${b?"đ\xe3 Show cho user":"đ\xe3 Hide khỏi user"}.`)}catch(a){n(a?.message||"Kh\xf4ng cập nhật được visibility provider")}finally{l("")}};return(0,d.jsxs)("div",{className:"rounded-2xl border border-border bg-surface/50 p-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:"Admin: Show / Hide Personal Cloud Providers"}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:"Chỉ điều khiển provider c\xf3 xuất hiện tr\xean giao diện của user hay kh\xf4ng. Kh\xf4ng đổi quyền OAuth, kh\xf4ng deactivate connection, kh\xf4ng x\xf3a token, kh\xf4ng đổi API key/routing v\xe0 kh\xf4ng ảnh hưởng sử dụng thực tế."})]}),(0,d.jsx)(f.$n,{size:"sm",variant:"outline",onClick:q,loading:i,icon:"refresh",children:"Refresh"})]}),m?(0,d.jsx)("div",{className:"mt-3 rounded-xl border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-700 dark:text-red-300",children:m}):null,o?(0,d.jsx)("div",{className:"mt-3 rounded-xl border border-green-500/30 bg-green-500/10 px-3 py-2 text-xs text-green-700 dark:text-green-300",children:o}):null,(0,d.jsx)("div",{className:"mt-4 grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:b.map(a=>{let b=!1!==a.visible,c=k===a.id;return(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-border bg-background p-3",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)(g.A,{src:`/providers/${a.id}.png`,alt:a.name,size:30,className:"max-h-[30px] max-w-[30px] rounded object-contain",fallbackText:a.id.slice(0,2).toUpperCase(),fallbackColor:a.color||"#64748b"}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("div",{className:"truncate text-sm font-medium text-text-main",children:a.name}),(0,d.jsx)(f.Ex,{variant:b?"success":"default",size:"sm",children:b?"Shown":"Hidden"})]})]}),(0,d.jsx)(f.$n,{size:"sm",variant:b?"outline":"secondary",disabled:c,loading:c,icon:b?"visibility_off":"visibility",onClick:()=>r(a,!b),children:b?"Hide":"Show"})]},a.id)})})]})}},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19771:a=>{"use strict";a.exports=require("process")},19987:(a,b,c)=>{Promise.resolve().then(c.bind(c,17194))},21820:a=>{"use strict";a.exports=require("os")},26941:(a,b,c)=>{"use strict";c.d(b,{default:()=>l});var d=c(48249),e=c(67484),f=c(50412),g=c(72738),h=c(63634),i=c.n(h);function j(a={}){let b=a.providerSpecificData||{};return a.email||b.githubEmail||b.username||a.displayName||a.name||b.accountId||a.id}function k(a){let b=String(a||"Personal OAuth");return b.charAt(0).toUpperCase()+b.slice(1)}function l(){let[a,b]=(0,e.useState)([]),[c,h]=(0,e.useState)([]),[l,m]=(0,e.useState)(!0),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)("");(0,e.useCallback)(async()=>{m(!0),o("");try{let a=await fetch("/api/personal-cloud-providers/shares",{cache:"no-store"}),c=await a.json().catch(()=>({}));if(!a.ok)throw Error(c.error||"Failed to load sharing settings");b(Array.isArray(c.ownedConnections)?c.ownedConnections:[]),h(Array.isArray(c.sharedWithMe)?c.sharedWithMe:[])}catch(a){o(a.message||"Failed to load sharing settings")}finally{m(!1)}},[]);let x=(0,e.useMemo)(()=>a.find(a=>a.id===p)||null,[a,p]),y=(0,e.useCallback)(a=>{b(b=>b.map(b=>b.id===a.id?a:b))},[]),z=(0,e.useCallback)(async a=>{a.preventDefault();let b=r.trim().toLowerCase();if(x&&b&&!t){u(!0),w("");try{let a=await fetch("/api/personal-cloud-providers/shares",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:x.id,userId:b})}),c=await a.json().catch(()=>({}));if(!a.ok)throw Error(c.error||"Unable to share this account");c.connection&&y(c.connection),s("")}catch(a){w(a.message||"Unable to share this account")}finally{u(!1)}}},[t,x,y,r]),A=(0,e.useCallback)(async a=>{if(x&&!t){u(!0),w("");try{let b=await fetch("/api/personal-cloud-providers/shares",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:x.id,userId:a})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Unable to remove viewer");c.connection&&y(c.connection)}catch(a){w(a.message||"Unable to remove viewer")}finally{u(!1)}}},[t,x,y]),B=(0,e.useCallback)(a=>{q(a),s(""),w("")},[]),C=(0,e.useCallback)(()=>{t||(q(""),s(""),w(""))},[t]);return l?(0,d.jsxs)("section",{className:i().section,children:[(0,d.jsx)("div",{className:i().loadingLine}),(0,d.jsx)("div",{className:i().loadingLineShort})]}):(0,d.jsxs)("div",{className:i().shell,children:[(0,d.jsxs)("section",{className:i().section,children:[(0,d.jsxs)("div",{className:i().sectionHeader,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:i().eyebrow,children:"Read-only quota sharing"}),(0,d.jsx)("h2",{className:i().title,children:"Share Personal OAuth monitoring"}),(0,d.jsx)("p",{className:i().description,children:"Give another dashboard user visibility into account status and quota only. Shared users cannot edit, disable, delete, import models, or change routing."})]}),(0,d.jsxs)("div",{className:i().lockPill,children:[(0,d.jsx)("span",{className:"material-symbols-outlined",children:"visibility"}),"View only"]})]}),n?(0,d.jsx)("div",{className:i().errorBox,children:n}):null,0===a.length?(0,d.jsx)("div",{className:i().emptyState,children:"Add a Personal OAuth account above first. It will appear here and can then be shared with viewers."}):(0,d.jsx)("div",{className:i().accountGrid,children:a.map(a=>{let b=a.sharedWith?.length||0;return(0,d.jsxs)("article",{className:i().accountCard,children:[(0,d.jsxs)("div",{className:i().accountIdentity,children:[(0,d.jsx)("span",{className:i().providerIconWrap,children:(0,d.jsx)(g.A,{src:`/providers/${a.provider}.png`,alt:a.provider,size:30,className:i().providerIcon,fallbackText:String(a.provider||"?").slice(0,2).toUpperCase()})}),(0,d.jsxs)("div",{className:i().accountText,children:[(0,d.jsxs)("div",{className:i().accountTopLine,children:[(0,d.jsx)("strong",{children:j(a)}),(0,d.jsx)("span",{className:a.isActive?i().activeBadge:i().inactiveBadge,children:a.isActive?"Active":"Off"})]}),(0,d.jsxs)("div",{className:i().accountMeta,children:[k(a.provider)," \xb7 ",0===b?"Not shared":`${b} viewer${1===b?"":"s"}`]})]})]}),(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>B(a.id),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"person_add"}),"Share"]})]},a.id)})})]}),c.length>0?(0,d.jsxs)("section",{className:`${i().section} ${i().sharedSection}`,children:[(0,d.jsxs)("div",{className:i().sectionHeader,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:i().eyebrow,children:"Shared with me"}),(0,d.jsx)("h2",{className:i().title,children:"Read-only Personal OAuth accounts"}),(0,d.jsx)("p",{className:i().description,children:"These accounts are owned by other users. You can inspect their status here and quota on Personal Quota, but you cannot change anything."})]}),(0,d.jsxs)("div",{className:i().lockPill,children:[(0,d.jsx)("span",{className:"material-symbols-outlined",children:"lock"}),"Read only"]})]}),(0,d.jsx)("div",{className:i().accountGrid,children:c.map(a=>(0,d.jsxs)("article",{className:`${i().accountCard} ${i().readOnlyCard}`,children:[(0,d.jsxs)("div",{className:i().accountIdentity,children:[(0,d.jsx)("span",{className:i().providerIconWrap,children:(0,d.jsx)(g.A,{src:`/providers/${a.provider}.png`,alt:a.provider,size:30,className:i().providerIcon,fallbackText:String(a.provider||"?").slice(0,2).toUpperCase()})}),(0,d.jsxs)("div",{className:i().accountText,children:[(0,d.jsxs)("div",{className:i().accountTopLine,children:[(0,d.jsx)("strong",{children:j(a)}),(0,d.jsx)("span",{className:i().readOnlyBadge,children:"Shared \xb7 Read only"})]}),(0,d.jsxs)("div",{className:i().accountMeta,children:[k(a.provider)," \xb7 Owner: ",a.ownerUser||"Unknown"]})]})]}),(0,d.jsx)("span",{className:i().noEditHint,children:"No edit access"})]},a.id))})]}):null,x?(0,d.jsx)(f.aF,{isOpen:!!x,onClose:C,title:"Share quota monitoring",size:"lg",children:(0,d.jsxs)("div",{className:i().modalBody,children:[(0,d.jsxs)("div",{className:i().modalAccount,children:[(0,d.jsx)(g.A,{src:`/providers/${x.provider}.png`,alt:x.provider,size:34,className:i().modalProviderIcon,fallbackText:String(x.provider||"?").slice(0,2).toUpperCase()}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:i().modalAccountLabel,children:j(x)}),(0,d.jsx)("div",{className:i().modalAccountMeta,children:k(x.provider)})]})]}),(0,d.jsxs)("div",{className:i().readOnlyNotice,children:[(0,d.jsx)("span",{className:"material-symbols-outlined",children:"verified_user"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("strong",{children:"Viewer permission only"}),(0,d.jsx)("p",{children:"Shared users can view this account on Personal OAuth and Personal Quota. All write actions remain owner-only on the server."})]})]}),(0,d.jsxs)("form",{className:i().shareForm,onSubmit:z,children:[(0,d.jsx)("label",{className:i().inputLabel,htmlFor:"personal-oauth-share-user",children:"User ID or email"}),(0,d.jsxs)("div",{className:i().inputRow,children:[(0,d.jsx)("input",{id:"personal-oauth-share-user",className:i().shareInput,value:r,onChange:a=>s(a.target.value),placeholder:"name@example.com",autoComplete:"off",disabled:t}),(0,d.jsx)(f.$n,{type:"submit",disabled:!r.trim()||t,loading:t,children:"Share"})]}),(0,d.jsx)("p",{className:i().inputHelp,children:"Use the same normalized user ID/email the person uses to sign in to the dashboard."})]}),v?(0,d.jsx)("div",{className:i().errorBox,children:v}):null,(0,d.jsxs)("div",{className:i().viewerBlock,children:[(0,d.jsxs)("div",{className:i().viewerHeading,children:[(0,d.jsx)("span",{children:"People with access"}),(0,d.jsx)("span",{children:x.sharedWith?.length||0})]}),0===(x.sharedWith?.length||0)?(0,d.jsx)("div",{className:i().viewerEmpty,children:"No viewers yet."}):(0,d.jsx)("div",{className:i().viewerList,children:x.sharedWith.map(a=>(0,d.jsxs)("div",{className:i().viewerRow,children:[(0,d.jsxs)("div",{className:i().viewerIdentity,children:[(0,d.jsx)("span",{className:i().avatar,children:a.slice(0,1).toUpperCase()}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:i().viewerName,children:a}),(0,d.jsx)("div",{className:i().viewerRole,children:"Viewer \xb7 read only"})]})]}),(0,d.jsx)("button",{type:"button",className:i().removeButton,onClick:()=>A(a),disabled:t,children:"Remove"})]},a))})]})]})}):null]})}},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31067:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\personalcloudprovider\\\\PersonalCloudProviderOrderEnhancer.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\PersonalCloudProviderOrderEnhancer.js","default")},33873:a=>{"use strict";a.exports=require("path")},34631:a=>{"use strict";a.exports=require("tls")},38522:a=>{"use strict";a.exports=require("node:zlib")},38825:(a,b,c)=>{"use strict";function d(){return null}c.d(b,{default:()=>d}),c(67484)},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41204:a=>{"use strict";a.exports=require("string_decoder")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},54873:(a,b,c)=>{Promise.resolve().then(c.bind(c,38825)),Promise.resolve().then(c.bind(c,8385)),Promise.resolve().then(c.bind(c,26941))},55511:a=>{"use strict";a.exports=require("crypto")},61805:a=>{a.exports={page:"PersonalCloudProviderPage_page__WEiqp"}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63634:a=>{a.exports={shell:"PersonalCloudProviderShares_shell__US6gE",section:"PersonalCloudProviderShares_section__OHcNf",sharedSection:"PersonalCloudProviderShares_sharedSection___aHlv",sectionHeader:"PersonalCloudProviderShares_sectionHeader__vLKx5",eyebrow:"PersonalCloudProviderShares_eyebrow__ouAqZ",title:"PersonalCloudProviderShares_title__y8xC6",description:"PersonalCloudProviderShares_description__xqUNc",lockPill:"PersonalCloudProviderShares_lockPill__cRApp",readOnlyBadge:"PersonalCloudProviderShares_readOnlyBadge__vVzHd",activeBadge:"PersonalCloudProviderShares_activeBadge__1BOdA",inactiveBadge:"PersonalCloudProviderShares_inactiveBadge__3EO5q",accountGrid:"PersonalCloudProviderShares_accountGrid__CDIR9",accountCard:"PersonalCloudProviderShares_accountCard__BIwC5",readOnlyCard:"PersonalCloudProviderShares_readOnlyCard___k8Zg",accountIdentity:"PersonalCloudProviderShares_accountIdentity__wihlv",providerIconWrap:"PersonalCloudProviderShares_providerIconWrap__ahFle",providerIcon:"PersonalCloudProviderShares_providerIcon__73NZX",modalProviderIcon:"PersonalCloudProviderShares_modalProviderIcon__EIGx8",accountText:"PersonalCloudProviderShares_accountText__zeFWz",accountTopLine:"PersonalCloudProviderShares_accountTopLine__PhQY9",accountMeta:"PersonalCloudProviderShares_accountMeta__sndtV",modalAccountMeta:"PersonalCloudProviderShares_modalAccountMeta__9lzRs",inputHelp:"PersonalCloudProviderShares_inputHelp__KDqPa",viewerRole:"PersonalCloudProviderShares_viewerRole__2RT5B",noEditHint:"PersonalCloudProviderShares_noEditHint__5jcuv",emptyState:"PersonalCloudProviderShares_emptyState__7iKlL",viewerEmpty:"PersonalCloudProviderShares_viewerEmpty__I5ePR",errorBox:"PersonalCloudProviderShares_errorBox__Y7BnC",loadingLine:"PersonalCloudProviderShares_loadingLine__5dZ2T",loadingLineShort:"PersonalCloudProviderShares_loadingLineShort__CMied",pulse:"PersonalCloudProviderShares_pulse__hN35n",modalBody:"PersonalCloudProviderShares_modalBody__Yp6fA",modalAccount:"PersonalCloudProviderShares_modalAccount__8zW4q",modalAccountLabel:"PersonalCloudProviderShares_modalAccountLabel__zSz8C",readOnlyNotice:"PersonalCloudProviderShares_readOnlyNotice__O4gsg",shareForm:"PersonalCloudProviderShares_shareForm__p4mTP",inputLabel:"PersonalCloudProviderShares_inputLabel__5hRNA",inputRow:"PersonalCloudProviderShares_inputRow__5Yzd4",shareInput:"PersonalCloudProviderShares_shareInput__RfEew",viewerBlock:"PersonalCloudProviderShares_viewerBlock__OWaSu",viewerHeading:"PersonalCloudProviderShares_viewerHeading__sDj0L",viewerList:"PersonalCloudProviderShares_viewerList__gHcbG",viewerRow:"PersonalCloudProviderShares_viewerRow__OlmjU",viewerIdentity:"PersonalCloudProviderShares_viewerIdentity__HBkDt",avatar:"PersonalCloudProviderShares_avatar__acZLv",viewerName:"PersonalCloudProviderShares_viewerName__9tkp7",removeButton:"PersonalCloudProviderShares_removeButton__GpaF6"}},64939:a=>{"use strict";a.exports=import("pg")},66136:a=>{"use strict";a.exports=require("timers")},66843:(a,b,c)=>{Promise.resolve().then(c.bind(c,78696))},73024:a=>{"use strict";a.exports=require("node:fs")},73335:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\personalcloudprovider\\\\PersonalCloudProviderPageClient.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\PersonalCloudProviderPageClient.js","default")},74075:a=>{"use strict";a.exports=require("zlib")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78696:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\personalcloudprovider\\\\PersonalCloudProviderVisibilityAdmin.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\PersonalCloudProviderVisibilityAdmin.js","default")},79428:a=>{"use strict";a.exports=require("buffer")},79748:a=>{"use strict";a.exports=require("fs/promises")},80099:a=>{"use strict";a.exports=require("node:sqlite")},80785:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(5735),e=c(78696);function f({children:a}){return(0,d.jsxs)("div",{className:"space-y-6",children:[(0,d.jsx)(e.default,{}),a]})}},81787:a=>{"use strict";a.exports=require("bun:sqlite")},84249:(a,b,c)=>{Promise.resolve().then(c.bind(c,31067)),Promise.resolve().then(c.bind(c,73335)),Promise.resolve().then(c.bind(c,85643))},85643:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\personalcloudprovider\\\\PersonalCloudProviderShares.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\personalcloudprovider\\PersonalCloudProviderShares.js","default")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,2430,8316,8946,7638,5681,4404,1900,6328,8640],()=>b(b.s=1863));module.exports=c})();
@@ -1 +1 @@
1
- {"version":1,"files":["../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../../node_modules/better-sqlite3/package.json","../../../../../../node_modules/bindings/bindings.js","../../../../../../node_modules/bindings/package.json","../../../../../../node_modules/file-uri-to-path/index.js","../../../../../../node_modules/file-uri-to-path/package.json","../../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../../node_modules/next/dist/client/lib/console.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/blocking-route-messages.js","../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../../node_modules/next/dist/server/app-render/sync-io-messages.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../../node_modules/next/dist/server/node-environment.js","../../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../../node_modules/next/dist/server/require-hook.js","../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../node_modules/next/dist/shared/lib/instant-messages.js","../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/pg-cloudflare/dist/empty.js","../../../../../../node_modules/pg-cloudflare/dist/index.js","../../../../../../node_modules/pg-cloudflare/package.json","../../../../../../node_modules/pg-connection-string/index.js","../../../../../../node_modules/pg-connection-string/package.json","../../../../../../node_modules/pg-int8/index.js","../../../../../../node_modules/pg-int8/package.json","../../../../../../node_modules/pg-pool/index.js","../../../../../../node_modules/pg-pool/package.json","../../../../../../node_modules/pg-protocol/dist/buffer-reader.js","../../../../../../node_modules/pg-protocol/dist/buffer-writer.js","../../../../../../node_modules/pg-protocol/dist/index.js","../../../../../../node_modules/pg-protocol/dist/messages.js","../../../../../../node_modules/pg-protocol/dist/parser.js","../../../../../../node_modules/pg-protocol/dist/serializer.js","../../../../../../node_modules/pg-protocol/package.json","../../../../../../node_modules/pg-types/index.js","../../../../../../node_modules/pg-types/lib/arrayParser.js","../../../../../../node_modules/pg-types/lib/binaryParsers.js","../../../../../../node_modules/pg-types/lib/builtins.js","../../../../../../node_modules/pg-types/lib/textParsers.js","../../../../../../node_modules/pg-types/package.json","../../../../../../node_modules/pg/esm/index.mjs","../../../../../../node_modules/pg/lib/client.js","../../../../../../node_modules/pg/lib/connection-parameters.js","../../../../../../node_modules/pg/lib/connection.js","../../../../../../node_modules/pg/lib/crypto/cert-signatures.js","../../../../../../node_modules/pg/lib/crypto/sasl.js","../../../../../../node_modules/pg/lib/crypto/utils.js","../../../../../../node_modules/pg/lib/defaults.js","../../../../../../node_modules/pg/lib/index.js","../../../../../../node_modules/pg/lib/native/client.js","../../../../../../node_modules/pg/lib/native/index.js","../../../../../../node_modules/pg/lib/native/query.js","../../../../../../node_modules/pg/lib/query.js","../../../../../../node_modules/pg/lib/result.js","../../../../../../node_modules/pg/lib/stream.js","../../../../../../node_modules/pg/lib/type-overrides.js","../../../../../../node_modules/pg/lib/utils.js","../../../../../../node_modules/pg/package.json","../../../../../../node_modules/pgpass/lib/helper.js","../../../../../../node_modules/pgpass/lib/index.js","../../../../../../node_modules/pgpass/package.json","../../../../../../node_modules/postgres-array/index.js","../../../../../../node_modules/postgres-array/package.json","../../../../../../node_modules/postgres-bytea/index.js","../../../../../../node_modules/postgres-bytea/package.json","../../../../../../node_modules/postgres-date/index.js","../../../../../../node_modules/postgres-date/package.json","../../../../../../node_modules/postgres-interval/index.js","../../../../../../node_modules/postgres-interval/package.json","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/split2/index.js","../../../../../../node_modules/split2/package.json","../../../../../../node_modules/sql.js/dist/sql-wasm.js","../../../../../../node_modules/sql.js/package.json","../../../../../../node_modules/xtend/mutable.js","../../../../../../node_modules/xtend/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1220.js","../../../../chunks/1455.js","../../../../chunks/1817.js","../../../../chunks/1998.js","../../../../chunks/2155.js","../../../../chunks/2242.js","../../../../chunks/241.js","../../../../chunks/2430.js","../../../../chunks/2506.js","../../../../chunks/2507.js","../../../../chunks/2556.js","../../../../chunks/2566.js","../../../../chunks/2611.js","../../../../chunks/2650.js","../../../../chunks/2664.js","../../../../chunks/2731.js","../../../../chunks/2891.js","../../../../chunks/2944.js","../../../../chunks/3031.js","../../../../chunks/3104.js","../../../../chunks/318.js","../../../../chunks/3433.js","../../../../chunks/3484.js","../../../../chunks/3593.js","../../../../chunks/3696.js","../../../../chunks/3801.js","../../../../chunks/3824.js","../../../../chunks/4013.js","../../../../chunks/4017.js","../../../../chunks/402.js","../../../../chunks/4123.js","../../../../chunks/4177.js","../../../../chunks/4315.js","../../../../chunks/436.js","../../../../chunks/4404.js","../../../../chunks/4433.js","../../../../chunks/4632.js","../../../../chunks/4696.js","../../../../chunks/4739.js","../../../../chunks/4741.js","../../../../chunks/4746.js","../../../../chunks/476.js","../../../../chunks/4778.js","../../../../chunks/4780.js","../../../../chunks/4790.js","../../../../chunks/4803.js","../../../../chunks/507.js","../../../../chunks/5206.js","../../../../chunks/5210.js","../../../../chunks/5258.js","../../../../chunks/541.js","../../../../chunks/5433.js","../../../../chunks/5573.js","../../../../chunks/5592.js","../../../../chunks/564.js","../../../../chunks/5681.js","../../../../chunks/5852.js","../../../../chunks/5901.js","../../../../chunks/5915.js","../../../../chunks/595.js","../../../../chunks/6053.js","../../../../chunks/6064.js","../../../../chunks/607.js","../../../../chunks/6103.js","../../../../chunks/6108.js","../../../../chunks/6118.js","../../../../chunks/6182.js","../../../../chunks/6252.js","../../../../chunks/6328.js","../../../../chunks/6404.js","../../../../chunks/6492.js","../../../../chunks/6811.js","../../../../chunks/6844.js","../../../../chunks/689.js","../../../../chunks/6936.js","../../../../chunks/6956.js","../../../../chunks/6977.js","../../../../chunks/698.js","../../../../chunks/6992.js","../../../../chunks/7242.js","../../../../chunks/7250.js","../../../../chunks/7341.js","../../../../chunks/7464.js","../../../../chunks/7639.js","../../../../chunks/7669.js","../../../../chunks/7753.js","../../../../chunks/7774.js","../../../../chunks/7812.js","../../../../chunks/7828.js","../../../../chunks/7965.js","../../../../chunks/8023.js","../../../../chunks/8062.js","../../../../chunks/814.js","../../../../chunks/8255.js","../../../../chunks/8316.js","../../../../chunks/8347.js","../../../../chunks/8352.js","../../../../chunks/8360.js","../../../../chunks/8469.js","../../../../chunks/8491.js","../../../../chunks/8520.js","../../../../chunks/8590.js","../../../../chunks/8627.js","../../../../chunks/8640.js","../../../../chunks/8895.js","../../../../chunks/8946.js","../../../../chunks/9413.js","../../../../chunks/9483.js","../../../../chunks/9489.js","../../../../chunks/9609.js","../../../../chunks/9868.js","../../../../webpack-runtime.js","page_client-reference-manifest.js"]}
1
+ {"version":1,"files":["../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../../node_modules/better-sqlite3/lib/database.js","../../../../../../node_modules/better-sqlite3/lib/index.js","../../../../../../node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../../node_modules/better-sqlite3/lib/methods/backup.js","../../../../../../node_modules/better-sqlite3/lib/methods/function.js","../../../../../../node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../../node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../../node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../../node_modules/better-sqlite3/lib/methods/table.js","../../../../../../node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../../node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../../node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../../node_modules/better-sqlite3/lib/util.js","../../../../../../node_modules/better-sqlite3/package.json","../../../../../../node_modules/bindings/bindings.js","../../../../../../node_modules/bindings/package.json","../../../../../../node_modules/file-uri-to-path/index.js","../../../../../../node_modules/file-uri-to-path/package.json","../../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../../node_modules/next/dist/client/lib/console.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/blocking-route-messages.js","../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../../node_modules/next/dist/server/app-render/sync-io-messages.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../../node_modules/next/dist/server/node-environment.js","../../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../../node_modules/next/dist/server/require-hook.js","../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../node_modules/next/dist/shared/lib/instant-messages.js","../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/pg-cloudflare/dist/empty.js","../../../../../../node_modules/pg-cloudflare/dist/index.js","../../../../../../node_modules/pg-cloudflare/package.json","../../../../../../node_modules/pg-connection-string/index.js","../../../../../../node_modules/pg-connection-string/package.json","../../../../../../node_modules/pg-int8/index.js","../../../../../../node_modules/pg-int8/package.json","../../../../../../node_modules/pg-pool/index.js","../../../../../../node_modules/pg-pool/package.json","../../../../../../node_modules/pg-protocol/dist/buffer-reader.js","../../../../../../node_modules/pg-protocol/dist/buffer-writer.js","../../../../../../node_modules/pg-protocol/dist/index.js","../../../../../../node_modules/pg-protocol/dist/messages.js","../../../../../../node_modules/pg-protocol/dist/parser.js","../../../../../../node_modules/pg-protocol/dist/serializer.js","../../../../../../node_modules/pg-protocol/package.json","../../../../../../node_modules/pg-types/index.js","../../../../../../node_modules/pg-types/lib/arrayParser.js","../../../../../../node_modules/pg-types/lib/binaryParsers.js","../../../../../../node_modules/pg-types/lib/builtins.js","../../../../../../node_modules/pg-types/lib/textParsers.js","../../../../../../node_modules/pg-types/package.json","../../../../../../node_modules/pg/esm/index.mjs","../../../../../../node_modules/pg/lib/client.js","../../../../../../node_modules/pg/lib/connection-parameters.js","../../../../../../node_modules/pg/lib/connection.js","../../../../../../node_modules/pg/lib/crypto/cert-signatures.js","../../../../../../node_modules/pg/lib/crypto/sasl.js","../../../../../../node_modules/pg/lib/crypto/utils.js","../../../../../../node_modules/pg/lib/defaults.js","../../../../../../node_modules/pg/lib/index.js","../../../../../../node_modules/pg/lib/native/client.js","../../../../../../node_modules/pg/lib/native/index.js","../../../../../../node_modules/pg/lib/native/query.js","../../../../../../node_modules/pg/lib/query.js","../../../../../../node_modules/pg/lib/result.js","../../../../../../node_modules/pg/lib/stream.js","../../../../../../node_modules/pg/lib/type-overrides.js","../../../../../../node_modules/pg/lib/utils.js","../../../../../../node_modules/pg/package.json","../../../../../../node_modules/pgpass/lib/helper.js","../../../../../../node_modules/pgpass/lib/index.js","../../../../../../node_modules/pgpass/package.json","../../../../../../node_modules/postgres-array/index.js","../../../../../../node_modules/postgres-array/package.json","../../../../../../node_modules/postgres-bytea/index.js","../../../../../../node_modules/postgres-bytea/package.json","../../../../../../node_modules/postgres-date/index.js","../../../../../../node_modules/postgres-date/package.json","../../../../../../node_modules/postgres-interval/index.js","../../../../../../node_modules/postgres-interval/package.json","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/package.json","../../../../../../node_modules/split2/index.js","../../../../../../node_modules/split2/package.json","../../../../../../node_modules/sql.js/dist/sql-wasm.js","../../../../../../node_modules/sql.js/package.json","../../../../../../node_modules/xtend/mutable.js","../../../../../../node_modules/xtend/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1220.js","../../../../chunks/1350.js","../../../../chunks/1455.js","../../../../chunks/1817.js","../../../../chunks/1876.js","../../../../chunks/1900.js","../../../../chunks/1998.js","../../../../chunks/2155.js","../../../../chunks/2242.js","../../../../chunks/241.js","../../../../chunks/2430.js","../../../../chunks/2506.js","../../../../chunks/2556.js","../../../../chunks/2566.js","../../../../chunks/2611.js","../../../../chunks/2650.js","../../../../chunks/2664.js","../../../../chunks/2731.js","../../../../chunks/2891.js","../../../../chunks/2999.js","../../../../chunks/3031.js","../../../../chunks/3104.js","../../../../chunks/318.js","../../../../chunks/3433.js","../../../../chunks/3484.js","../../../../chunks/3593.js","../../../../chunks/3696.js","../../../../chunks/3801.js","../../../../chunks/3824.js","../../../../chunks/4013.js","../../../../chunks/4017.js","../../../../chunks/4123.js","../../../../chunks/4177.js","../../../../chunks/4315.js","../../../../chunks/436.js","../../../../chunks/4404.js","../../../../chunks/4433.js","../../../../chunks/4459.js","../../../../chunks/4632.js","../../../../chunks/4696.js","../../../../chunks/4739.js","../../../../chunks/4741.js","../../../../chunks/4755.js","../../../../chunks/476.js","../../../../chunks/4778.js","../../../../chunks/4780.js","../../../../chunks/4790.js","../../../../chunks/4803.js","../../../../chunks/507.js","../../../../chunks/5210.js","../../../../chunks/5258.js","../../../../chunks/541.js","../../../../chunks/5433.js","../../../../chunks/5573.js","../../../../chunks/5592.js","../../../../chunks/5623.js","../../../../chunks/564.js","../../../../chunks/5681.js","../../../../chunks/5852.js","../../../../chunks/5901.js","../../../../chunks/595.js","../../../../chunks/6053.js","../../../../chunks/6103.js","../../../../chunks/6108.js","../../../../chunks/6118.js","../../../../chunks/6182.js","../../../../chunks/6252.js","../../../../chunks/6328.js","../../../../chunks/6404.js","../../../../chunks/6492.js","../../../../chunks/6811.js","../../../../chunks/6844.js","../../../../chunks/689.js","../../../../chunks/6956.js","../../../../chunks/6977.js","../../../../chunks/698.js","../../../../chunks/6992.js","../../../../chunks/7242.js","../../../../chunks/7250.js","../../../../chunks/7341.js","../../../../chunks/7464.js","../../../../chunks/7638.js","../../../../chunks/7639.js","../../../../chunks/7669.js","../../../../chunks/7700.js","../../../../chunks/7753.js","../../../../chunks/7774.js","../../../../chunks/7812.js","../../../../chunks/7828.js","../../../../chunks/7895.js","../../../../chunks/7965.js","../../../../chunks/8023.js","../../../../chunks/8062.js","../../../../chunks/814.js","../../../../chunks/8141.js","../../../../chunks/8255.js","../../../../chunks/8316.js","../../../../chunks/8352.js","../../../../chunks/8360.js","../../../../chunks/8469.js","../../../../chunks/8491.js","../../../../chunks/8520.js","../../../../chunks/8590.js","../../../../chunks/8627.js","../../../../chunks/8640.js","../../../../chunks/8895.js","../../../../chunks/8946.js","../../../../chunks/9413.js","../../../../chunks/9483.js","../../../../chunks/9489.js","../../../../chunks/9609.js","../../../../chunks/9868.js","../../../../webpack-runtime.js","page_client-reference-manifest.js"]}