9router 0.3.61 → 0.3.63
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.
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +31 -28
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/routes-manifest.json +18 -0
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +2 -2
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/9remote/install/route.js +1 -0
- package/app/.next/server/app/api/9remote/install/route.js.nft.json +1 -0
- package/app/.next/server/app/api/9remote/install/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/9remote/start/route.js +1 -0
- package/app/.next/server/app/api/9remote/start/route.js.nft.json +1 -0
- package/app/.next/server/app/api/9remote/start/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/9remote/status/route.js +1 -0
- package/app/.next/server/app/api/9remote/status/route.js.nft.json +1 -0
- package/app/.next/server/app/api/9remote/status/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/init/route.js +1 -1
- package/app/.next/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/locale/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/availability/route.js +1 -1
- package/app/.next/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/test/route.js +1 -1
- package/app/.next/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/route.js +1 -1
- package/app/.next/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/client/route.js +1 -1
- package/app/.next/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/validate/route.js +1 -1
- package/app/.next/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next/server/app/api/proxy-pools/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/database/route.js +1 -1
- package/app/.next/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/route.js +1 -1
- package/app/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/chart/route.js +1 -1
- package/app/.next/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/providers/route.js +1 -1
- package/app/.next/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/stats/route.js +1 -1
- package/app/.next/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/stream/route.js +2 -2
- package/app/.next/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/version/route.js +1 -1
- package/app/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- package/app/.next/server/app/callback/page.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +4 -4
- package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next/server/app/dashboard/basic-chat.rsc +6 -6
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.html +1 -1
- package/app/.next/server/app/dashboard/combos.rsc +6 -6
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.html +1 -1
- package/app/.next/server/app/dashboard/endpoint.rsc +6 -6
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/mitm.html +1 -1
- package/app/.next/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.html +1 -1
- package/app/.next/server/app/dashboard/profile.rsc +6 -6
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.html +1 -1
- package/app/.next/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.html +1 -1
- package/app/.next/server/app/dashboard/providers.rsc +6 -6
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/quota.html +2 -2
- package/app/.next/server/app/dashboard/quota.rsc +7 -7
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.html +1 -1
- package/app/.next/server/app/dashboard/translator.rsc +6 -6
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.html +1 -1
- package/app/.next/server/app/dashboard/usage.rsc +6 -6
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.html +1 -1
- package/app/.next/server/app/dashboard.rsc +6 -6
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +4 -4
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing/page.js +2 -2
- package/app/.next/server/app/landing/page.js.nft.json +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +4 -4
- package/app/.next/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page.js +2 -2
- package/app/.next/server/app/login/page.js.nft.json +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +5 -5
- package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page.js +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +31 -28
- package/app/.next/server/chunks/1114.js +1 -1
- package/app/.next/server/chunks/1422.js +1 -0
- package/app/.next/server/chunks/2470.js +1 -0
- package/app/.next/server/chunks/318.js +4 -4
- package/app/.next/server/chunks/3832.js +1 -1
- package/app/.next/server/chunks/412.js +2 -2
- package/app/.next/server/chunks/{9967.js → 4292.js} +1 -1
- package/app/.next/server/chunks/4989.js +2 -2
- package/app/.next/server/chunks/5297.js +1 -1
- package/app/.next/server/chunks/{2417.js → 5833.js} +1 -1
- package/app/.next/server/chunks/6114.js +1 -0
- package/app/.next/server/chunks/6182.js +1 -1
- package/app/.next/server/chunks/6556.js +120 -0
- package/app/.next/server/chunks/6943.js +1 -0
- package/app/.next/server/chunks/8220.js +1 -0
- package/app/.next/server/chunks/8336.js +1 -0
- package/app/.next/server/chunks/8590.js +1 -1
- package/app/.next/server/chunks/8838.js +1 -0
- package/app/.next/server/chunks/8895.js +1 -1
- package/app/.next/server/chunks/9609.js +1 -1
- package/app/.next/server/chunks/9718.js +1 -1
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +2 -2
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/2652-a74d5e854e0bfa62.js +1 -0
- package/app/.next/static/chunks/5497-c150a301ad0c1f31.js +7 -0
- package/app/.next/static/chunks/619-6fb7f67f0cfecb7d.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-c1411f5aa929dbe5.js → page-8b3c5386f3e05b94.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-aefb848c59284f43.js → page-4ad08a3c859e80d1.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/{page-e8e6df7e069625bd.js → page-73b26e1af919cd35.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/{page-879c727a47a283b5.js → page-e260c3e8f9853bad.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-bc23cde3512ccb7d.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/{page-94dfa8334418bacd.js → page-41a94015e222ce71.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-3f60f8a18fa87161.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/{page-4406bcf51c4e84f3.js → page-9fe6937f1b7efcd0.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-5fd850013a016805.js → page-83ea2fe0ea362d1d.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/{page-39f3d9d5ef15888e.js → page-bbe242a0a8f59efd.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-22472b9954e72930.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-6cb68879f68b81cb.js → page-912cda2ee71c6641.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-7706924dda4006d0.js → page-710541edb6d10247.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/{page-99103b9913a961ac.js → page-a8324340592f5d34.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/{layout-2c7682021e49cab8.js → layout-4836a4e592f3dbaa.js} +1 -1
- package/app/.next/static/chunks/app/_global-error/page-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/9remote/install/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/9remote/start/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/9remote/status/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/auth/login/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/auth/logout/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/auth/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/combos/[id]/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/combos/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/init/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/keys/[id]/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/keys/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/locale/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/models/alias/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/models/availability/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/models/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/models/test/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/providers/client/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/providers/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/providers/test-batch/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/providers/validate/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/settings/database/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/settings/require-login/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/settings/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/shutdown/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/tags/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/translator/load/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/translator/save/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/translator/send/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/translator/translate/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/disable/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/enable/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/status/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/usage/chart/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/usage/history/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/usage/providers/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-details/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-logs/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stats/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stream/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/v1/api/chat/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/v1/embeddings/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/v1/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/api/version/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/{layout-fbd2456fb45b5725.js → layout-8e0bedab6cffaa07.js} +1 -1
- package/app/.next/static/chunks/app/login/{page-85ae4df1467b1124.js → page-0dbd97765ab69f2d.js} +1 -1
- package/app/.next/static/chunks/app/manifest.webmanifest/route-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/app/page-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/c6123951-59125299ca0d7b46.js +1 -0
- package/app/.next/static/chunks/framework-9f63a52f5ba18ac8.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-7a52a199ae1900b3.js +1 -0
- package/app/.next/static/chunks/{webpack-08300aef1a3cbe68.js → webpack-694cf8a18cf9b4cc.js} +1 -1
- package/app/.next/static/css/6e39f97c1b551330.css +1 -0
- package/app/.next/static/rCToAL41C9N4Frmtc1JXA/_buildManifest.js +1 -0
- package/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/app/node_modules/better-sqlite3/lib/database.js +90 -0
- package/app/node_modules/better-sqlite3/lib/index.js +3 -0
- package/app/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
- package/app/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
- package/app/node_modules/better-sqlite3/lib/methods/function.js +31 -0
- package/app/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
- package/app/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
- package/app/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
- package/app/node_modules/better-sqlite3/lib/methods/table.js +189 -0
- package/app/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
- package/app/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
- package/app/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
- package/app/node_modules/better-sqlite3/lib/util.js +12 -0
- package/app/node_modules/better-sqlite3/package.json +59 -0
- package/app/node_modules/bindings/bindings.js +221 -0
- package/app/node_modules/bindings/package.json +28 -0
- package/app/node_modules/caniuse-lite/data/agents.js +1 -1
- package/app/node_modules/caniuse-lite/data/browserVersions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/aac.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/apng.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-find.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audio.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/av1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/avif.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/beacon.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/bigint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/border-image.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/brotli.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/calc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/classlist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/colr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/console-time.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/const.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-all.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-has.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-if.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-table.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/customevent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/datalist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dataset.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/datauri.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/decorators.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/details.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dialog.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/download.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eme.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eot.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es5.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filereader.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flac.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fontface.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/forms.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/heif.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hevc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hidden.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/history.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ime.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/imports.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/innertext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-event.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-number.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-search.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/json.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/let.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mathml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/menu.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/meter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/midi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mp3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/notifications.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-values.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ogv.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/online-status.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/opus.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/outline.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/path2d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/picture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ping.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/portals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/progress.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/promises.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/proximity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/proxy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/push-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rellist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rem.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ruby.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/run-in.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/script-async.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sdch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/selectlist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sni.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/spdy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/srcset.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/stream.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/streams.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sxg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/template.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/temporal.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/touch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ttf.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/u2f.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/url.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/vibration.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/video.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wav.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-share.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgl.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webhid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webm.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webp.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/websockets.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webusb.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webvr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webxr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/will-change.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/woff.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/woff2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/word-break.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/zstd.js +1 -1
- package/app/node_modules/caniuse-lite/package.json +1 -1
- package/app/node_modules/file-uri-to-path/index.js +66 -0
- package/app/node_modules/file-uri-to-path/package.json +32 -0
- package/app/node_modules/semver/classes/comparator.js +143 -0
- package/app/node_modules/semver/classes/range.js +557 -0
- package/app/node_modules/semver/classes/semver.js +333 -0
- package/app/node_modules/semver/functions/cmp.js +54 -0
- package/app/node_modules/semver/functions/coerce.js +62 -0
- package/app/node_modules/semver/functions/compare.js +7 -0
- package/app/node_modules/semver/functions/eq.js +5 -0
- package/app/node_modules/semver/functions/gt.js +5 -0
- package/app/node_modules/semver/functions/gte.js +5 -0
- package/app/node_modules/semver/functions/lt.js +5 -0
- package/app/node_modules/semver/functions/lte.js +5 -0
- package/app/node_modules/semver/functions/neq.js +5 -0
- package/app/node_modules/semver/functions/parse.js +18 -0
- package/app/node_modules/semver/functions/satisfies.js +12 -0
- package/app/node_modules/semver/internal/constants.js +37 -0
- package/app/node_modules/semver/internal/debug.js +11 -0
- package/app/node_modules/semver/internal/identifiers.js +29 -0
- package/app/node_modules/semver/internal/lrucache.js +42 -0
- package/app/node_modules/semver/internal/parse-options.js +17 -0
- package/app/node_modules/semver/internal/re.js +223 -0
- package/app/node_modules/semver/package.json +78 -0
- package/app/package.json +2 -1
- package/app/src/mitm/server.js +1 -1
- package/package.json +1 -1
- package/app/.next/server/chunks/1130.js +0 -1
- package/app/.next/server/chunks/1424.js +0 -1
- package/app/.next/server/chunks/4689.js +0 -1
- package/app/.next/server/chunks/4755.js +0 -1
- package/app/.next/server/chunks/5270.js +0 -1
- package/app/.next/server/chunks/5296.js +0 -1
- package/app/.next/server/chunks/6968.js +0 -1
- package/app/.next/server/chunks/7774.js +0 -120
- package/app/.next/static/c8H1uovTkuFnndxv7M84u/_buildManifest.js +0 -1
- package/app/.next/static/chunks/123-e6a804cec2637ee2.js +0 -1
- package/app/.next/static/chunks/1a258343-4af2572c60ed5a11.js +0 -1
- package/app/.next/static/chunks/2652-47d84ce9c4da24cd.js +0 -1
- package/app/.next/static/chunks/5497-215f5349a4d82f80.js +0 -7
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-9ef1484793ac73e9.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-4f42abcc35d685ec.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-35854cc9a1988b57.js +0 -1
- package/app/.next/static/chunks/app/_global-error/page-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/auth/login/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/auth/logout/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/auth/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/combos/[id]/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/combos/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/init/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/keys/[id]/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/keys/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/locale/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/models/alias/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/models/availability/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/models/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/models/test/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/providers/client/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/providers/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/providers/test-batch/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/providers/validate/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/settings/database/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/settings/require-login/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/settings/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/shutdown/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/tags/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/translator/load/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/translator/save/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/translator/send/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/translator/translate/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/disable/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/enable/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/status/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/usage/chart/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/usage/history/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/usage/providers/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-details/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-logs/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stats/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stream/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/v1/api/chat/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/v1/embeddings/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/v1/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/api/version/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/manifest.webmanifest/route-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/app/page-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/framework-0675a4b5b92df616.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-1985dbc3e9eafaaf.js +0 -1
- package/app/.next/static/css/17353c7f810d5b21.css +0 -1
- package/app/node_modules/typescript/lib/typescript.js +0 -200276
- package/app/node_modules/typescript/package.json +0 -120
- /package/app/.next/static/{c8H1uovTkuFnndxv7M84u → rCToAL41C9N4Frmtc1JXA}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{87128:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var a=r(95155),s=r(12115),i=r(35497),l=r(28777),n=r(52679);let o="basic-chat.sessions",d="basic-chat.activeSessionId",c="basic-chat.activeProviderId",m="basic-chat.draft";function u(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function h(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(h).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function p(e=""){let t=h(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function x(e){return await new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(String(a.result||"")),a.onerror=()=>r(a.error||Error("Failed to read file")),a.readAsDataURL(e)})}function f(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function g(){let[e,t]=(0,s.useState)([]),[r,g]=(0,s.useState)(!0),[w,v]=(0,s.useState)(""),[b,N]=(0,s.useState)([]),[y,j]=(0,s.useState)(""),[S,I]=(0,s.useState)(""),[A,k]=(0,s.useState)(""),[C,D]=(0,s.useState)(""),[$,O]=(0,s.useState)([]),[_,M]=(0,s.useState)(!1),[E,T]=(0,s.useState)(""),[U,R]=(0,s.useState)(""),[z,q]=(0,s.useState)(!1),[P,J]=(0,s.useState)(!1),[K,B]=(0,s.useState)(!1),L=(0,s.useRef)(null),F=(0,s.useRef)(null),W=(0,s.useRef)(!1),H=(0,s.useRef)(null),Y=(0,s.useRef)(null);(0,s.useEffect)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(o),[]);N(Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]),j(globalThis.localStorage.getItem(d)||""),I(globalThis.localStorage.getItem(c)||""),D(globalThis.localStorage.getItem(m)||"")}catch{}finally{q(!0)}},[]),(0,s.useEffect)(()=>{let e=!1;return async function(){g(!0),v("");try{let r=await fetch("/api/providers",{cache:"no-store"}),a=await r.json().catch(()=>({})),s=Array.isArray(a.connections)?a.connections.filter(e=>e?.isActive!==!1):[];if(0===s.length){e||(t([]),v("Chưa c\xf3 provider n\xe0o được connect."));return}let i=new Map;for(let e of s){let t=e.provider||e.id,r=f(e),a=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;i.has(t)||i.set(t,{providerId:t,providerName:r,providerType:a,connections:[],models:[]});let s=i.get(t);s.providerName=s.providerName||r,s.providerType=s.providerType||a,s.connections.push(e);let o=(0,l.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:f(e),source:"static"}:null).filter(Boolean);s.models.push(...o)}for(let e of(await Promise.all(s.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let a=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let a="string"==typeof e?e:e?.name||e?.displayName||r,s=r;return((0,n.mq)(t.provider)||(0,n.gb)(t.provider))&&!r.includes("/")&&(s=`${t.provider}/${r}`),{id:s,requestModel:s,name:a,providerId:t.provider,providerName:f(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:a}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=i.get(t);r&&r.models.push(...e.models)}let o=Array.from(i.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(o),0===o.length&&v("Đ\xe3 c\xf3 provider connect nhưng chưa lấy được model n\xe0o."))}catch(r){e||(v(h(r?.message)||"Kh\xf4ng thể tải danh s\xe1ch provider/model."),t([]))}finally{e||g(!1)}}(),()=>{e=!0}},[]),(0,s.useEffect)(()=>{let e=e=>{H.current&&!H.current.contains(e.target)&&J(!1),Y.current&&!Y.current.contains(e.target)&&B(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let G=(0,s.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),Q=(0,s.useMemo)(()=>e.find(e=>e.providerId===S)||e[0]||null,[e,S]),V=(0,s.useMemo)(()=>{if(A&&G.has(A))return G.get(A);if(y){let e=b.find(e=>e.id===y);if(e?.modelId&&G.has(e.modelId))return G.get(e.modelId)}return Q?.models?.[0]||null},[A,G,Q,b,y]),X=(0,s.useMemo)(()=>b.find(e=>e.id===y)||null,[b,y]),Z=X?.messages||[],ee=(0,s.useMemo)(()=>[...b].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[b]),et=!_&&!!V&&(C.trim().length>0||$.length>0);(0,s.useEffect)(()=>{if(z)try{globalThis.localStorage.setItem(o,JSON.stringify(b)),globalThis.localStorage.setItem(d,y),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,C)}catch{}},[z,b,y,S,C]),(0,s.useEffect)(()=>{if(!z||r||W.current||0===e.length)return;let t=e.find(e=>e.providerId===S)||e[0],a=A&&G.has(A)?G.get(A):t.models[0];if(b.length>0){let e=b.find(e=>e.id===y)||b[0],r=e?.modelId&&G.has(e.modelId)?G.get(e.modelId):a;W.current=!0,j(e.id),I(r?.providerId||t.providerId),k(r?.id||a.id);return}let s={id:u(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:a.id,modelName:a.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};W.current=!0,N([s]),j(s.id),I(t.providerId),k(a.id)},[z,r,e,G,b,y,S,A]);let er=(e,t)=>{N(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},ea=e=>e?{id:u(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,es=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let a=await Promise.all(r.map(async e=>({id:u(),name:e.name,type:e.type,size:e.size,dataUrl:await x(e)})));O(e=>[...e,...a]),e.target.value=""},ei=async()=>{let e=V||Q?.models?.[0]||null;if(!e)return;let t=C.trim();if(!t&&0===$.length)return;let r=y,a=b.find(e=>e.id===r);if(!a){if(!(a=ea(e)))return;r=a.id,N(e=>[a,...e]),j(r)}let s={id:u(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=u(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...a.messages||[],s,l];N(a=>a.map(a=>a.id===r?{...a,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===a.title?p(t):a.title}:a)),D(""),O([]),M(!0),T(i),R(""),F.current?.abort(),F.current=new AbortController;let o=n.filter(e=>"assistant"!==e.role||e.id!==i).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=h(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let a=[];for(let e of(t&&a.push({type:"text",text:t}),r))e?.dataUrl&&a.push({type:"image_url",image_url:{url:e.dataUrl}});return a.length>0?a:t}(e):e.content}));try{var d;let a,s=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:F.current.signal});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(h(e.error||e.message||`Request failed (${s.status})`))}let l=s.body?.getReader();if(!l){let e=await s.json().catch(()=>({})),t=h(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await l.read();if(t)break;let a=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=a.pop()||"",a)){let t=e.trim();if(!t.startsWith("data:"))continue;let a=t.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=JSON.parse(a),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(h).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,R(m),er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,a=p(t),er(d,e=>({...e,title:"New chat"===e.title?a:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=h(e?.message||e);er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),v(t||"Kh\xf4ng thể gửi tin nhắn.")}}finally{M(!1),T(""),R(""),F.current=null}},el=V?`${V.name}`:"Select model",en=V?V.requestModel:"Choose from connected providers";return(0,a.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-[#212121] text-white overflow-hidden",children:(0,a.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,a.jsxs)("div",{ref:H,className:"relative",children:[(0,a.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-left transition hover:bg-white/8",children:(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-white",children:el}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-white/70",children:"expand_more"})]}),(0,a.jsx)("p",{className:"truncate text-xs text-white/55",children:en})]})}),P?(0,a.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-white/10 bg-[#262626] shadow-2xl shadow-black/50",children:[(0,a.jsxs)("div",{className:"border-b border-white/10 px-4 py-3",children:[(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Models"}),(0,a.jsx)("p",{className:"text-sm text-white/75",children:"Chỉ lấy từ provider đ\xe3 connect"})]}),(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,a.jsxs)("div",{className:"mb-2 rounded-[16px] border border-white/10 bg-black/20 p-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-white",children:e.providerName}),(0,a.jsx)(i.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,a.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===A;return(0,a.jsx)("button",{type:"button",onClick:()=>(e=>{let t=G.get(e);if(!t)return;let r=b.find(e=>e.id===y);if(r&&r.messages.length>0){let e=ea(t);if(!e)return;N(t=>[e,...t]),j(e.id)}else if(r)N(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),j(r.id);else{let e=ea(t);if(!e)return;N(t=>[e,...t]),j(e.id)}I(t.providerId),k(t.id),J(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.name}),(0,a.jsx)("p",{className:"truncate text-[11px] text-white/45",children:e.requestModel})]}),t?(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-blue-300",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>B(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,a.jsx)(i.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!y)return;let e=b.filter(e=>e.id!==y),t=e[0]||null;N(e),t?(j(t.id),I(t.providerId),k(t.modelId)):(j(""),I(""),k(""))},disabled:!y||0===b.length,children:"Clear"})]})]}),K?(0,a.jsxs)("div",{ref:Y,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,a.jsx)("div",{className:"px-3 py-2",children:(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Recent chats"})}),(0,a.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===ee.length?(0,a.jsx)("div",{className:"rounded-[16px] border border-dashed border-white/10 bg-white/5 p-4 text-sm text-white/55",children:"Chưa c\xf3 cuộc tr\xf2 chuyện n\xe0o."}):ee.map(e=>{let t=e.id===y,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,a.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=b.find(e=>e.id===t))&&(j(t),I(r.providerId||S),k(r.modelId||A),B(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.title}),(0,a.jsx)("p",{className:"mt-1 truncate text-xs text-white/50",children:h(r?.content)||"Empty chat"})]}),(0,a.jsx)("span",{className:"text-[10px] text-white/40 shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let a=Math.round(r/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,w?(0,a.jsx)("div",{className:"mt-4 rounded-[18px] border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-rose-100",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,a.jsx)("p",{className:"text-sm leading-6",children:w})]})}):null,(0,a.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===Z.length?(0,a.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,a.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,a.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-white/10 bg-white/5 text-white/80",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold text-white",children:"Start a conversation"}),(0,a.jsx)("p",{className:"text-sm leading-6 text-white/60",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,a.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:Z.map(e=>{let t="user"===e.role,r="assistant"===e.role,s=r&&e.id===E&&"streaming"===e.status,i=h(e.content)||(r?U:"");return(0,a.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,a.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-[#2f2f2f] px-5 py-3.5 text-white":"text-white/90"}`,children:[(0,a.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,a.jsx)("span",{className:"text-xs font-semibold",children:t?"You":V?.name||"Assistant"})}),e.attachments?.length?(0,a.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,a.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-white/10 bg-black/20",children:(0,a.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover"})},e.id))}):null,(0,a.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[i,r&&s&&!U?(0,a.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,a.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,a.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-2",children:[(0,a.jsx)("span",{className:"text-xs text-white/80 max-w-[12rem] truncate",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void O(e=>e.filter(e=>e.id!==t))},className:"text-white/55 hover:text-white","aria-label":"Remove attachment",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,a.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,a.jsxs)("div",{className:"rounded-[26px] bg-[#2f2f2f] px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-white/5",children:[(0,a.jsx)("textarea",{value:C,onChange:e=>D(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),et&&ei())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-white outline-none placeholder:text-white/40 custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>L.current?.click(),disabled:!V||r,className:"p-2 text-white/50 hover:text-white transition rounded-full hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,a.jsx)("input",{ref:L,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:es}),(0,a.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:V?V.name:"No model"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[_?(0,a.jsx)("button",{type:"button",onClick:()=>{F.current?.abort()},className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,a.jsx)("button",{onClick:ei,disabled:!et,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${et?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,a.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-white/30",children:"Model list is filtered from connected providers."})]})]})})}}},e=>{e.O(0,[2574,3862,123,2652,5497,8441,3794,7358],()=>e(e.s=87128)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{87128:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var a=r(95155),s=r(12115),i=r(35497),l=r(28777),n=r(52679);let o="basic-chat.sessions",d="basic-chat.activeSessionId",c="basic-chat.activeProviderId",m="basic-chat.draft";function u(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function h(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(h).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function p(e=""){let t=h(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function x(e){return await new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(String(a.result||"")),a.onerror=()=>r(a.error||Error("Failed to read file")),a.readAsDataURL(e)})}function f(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function g(){let[e,t]=(0,s.useState)([]),[r,g]=(0,s.useState)(!0),[w,v]=(0,s.useState)(""),[b,N]=(0,s.useState)([]),[y,j]=(0,s.useState)(""),[S,I]=(0,s.useState)(""),[A,k]=(0,s.useState)(""),[C,D]=(0,s.useState)(""),[$,O]=(0,s.useState)([]),[_,M]=(0,s.useState)(!1),[E,T]=(0,s.useState)(""),[U,R]=(0,s.useState)(""),[z,q]=(0,s.useState)(!1),[P,J]=(0,s.useState)(!1),[K,B]=(0,s.useState)(!1),L=(0,s.useRef)(null),F=(0,s.useRef)(null),W=(0,s.useRef)(!1),H=(0,s.useRef)(null),Y=(0,s.useRef)(null);(0,s.useEffect)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(o),[]);N(Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]),j(globalThis.localStorage.getItem(d)||""),I(globalThis.localStorage.getItem(c)||""),D(globalThis.localStorage.getItem(m)||"")}catch{}finally{q(!0)}},[]),(0,s.useEffect)(()=>{let e=!1;return async function(){g(!0),v("");try{let r=await fetch("/api/providers",{cache:"no-store"}),a=await r.json().catch(()=>({})),s=Array.isArray(a.connections)?a.connections.filter(e=>e?.isActive!==!1):[];if(0===s.length){e||(t([]),v("Chưa c\xf3 provider n\xe0o được connect."));return}let i=new Map;for(let e of s){let t=e.provider||e.id,r=f(e),a=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;i.has(t)||i.set(t,{providerId:t,providerName:r,providerType:a,connections:[],models:[]});let s=i.get(t);s.providerName=s.providerName||r,s.providerType=s.providerType||a,s.connections.push(e);let o=(0,l.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:f(e),source:"static"}:null).filter(Boolean);s.models.push(...o)}for(let e of(await Promise.all(s.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let a=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let a="string"==typeof e?e:e?.name||e?.displayName||r,s=r;return((0,n.mq)(t.provider)||(0,n.gb)(t.provider))&&!r.includes("/")&&(s=`${t.provider}/${r}`),{id:s,requestModel:s,name:a,providerId:t.provider,providerName:f(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:a}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=i.get(t);r&&r.models.push(...e.models)}let o=Array.from(i.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(o),0===o.length&&v("Đ\xe3 c\xf3 provider connect nhưng chưa lấy được model n\xe0o."))}catch(r){e||(v(h(r?.message)||"Kh\xf4ng thể tải danh s\xe1ch provider/model."),t([]))}finally{e||g(!1)}}(),()=>{e=!0}},[]),(0,s.useEffect)(()=>{let e=e=>{H.current&&!H.current.contains(e.target)&&J(!1),Y.current&&!Y.current.contains(e.target)&&B(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let G=(0,s.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),Q=(0,s.useMemo)(()=>e.find(e=>e.providerId===S)||e[0]||null,[e,S]),V=(0,s.useMemo)(()=>{if(A&&G.has(A))return G.get(A);if(y){let e=b.find(e=>e.id===y);if(e?.modelId&&G.has(e.modelId))return G.get(e.modelId)}return Q?.models?.[0]||null},[A,G,Q,b,y]),X=(0,s.useMemo)(()=>b.find(e=>e.id===y)||null,[b,y]),Z=X?.messages||[],ee=(0,s.useMemo)(()=>[...b].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[b]),et=!_&&!!V&&(C.trim().length>0||$.length>0);(0,s.useEffect)(()=>{if(z)try{globalThis.localStorage.setItem(o,JSON.stringify(b)),globalThis.localStorage.setItem(d,y),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,C)}catch{}},[z,b,y,S,C]),(0,s.useEffect)(()=>{if(!z||r||W.current||0===e.length)return;let t=e.find(e=>e.providerId===S)||e[0],a=A&&G.has(A)?G.get(A):t.models[0];if(b.length>0){let e=b.find(e=>e.id===y)||b[0],r=e?.modelId&&G.has(e.modelId)?G.get(e.modelId):a;W.current=!0,j(e.id),I(r?.providerId||t.providerId),k(r?.id||a.id);return}let s={id:u(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:a.id,modelName:a.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};W.current=!0,N([s]),j(s.id),I(t.providerId),k(a.id)},[z,r,e,G,b,y,S,A]);let er=(e,t)=>{N(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},ea=e=>e?{id:u(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,es=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let a=await Promise.all(r.map(async e=>({id:u(),name:e.name,type:e.type,size:e.size,dataUrl:await x(e)})));O(e=>[...e,...a]),e.target.value=""},ei=async()=>{let e=V||Q?.models?.[0]||null;if(!e)return;let t=C.trim();if(!t&&0===$.length)return;let r=y,a=b.find(e=>e.id===r);if(!a){if(!(a=ea(e)))return;r=a.id,N(e=>[a,...e]),j(r)}let s={id:u(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=u(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...a.messages||[],s,l];N(a=>a.map(a=>a.id===r?{...a,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===a.title?p(t):a.title}:a)),D(""),O([]),M(!0),T(i),R(""),F.current?.abort(),F.current=new AbortController;let o=n.filter(e=>"assistant"!==e.role||e.id!==i).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=h(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let a=[];for(let e of(t&&a.push({type:"text",text:t}),r))e?.dataUrl&&a.push({type:"image_url",image_url:{url:e.dataUrl}});return a.length>0?a:t}(e):e.content}));try{var d;let a,s=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:F.current.signal});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(h(e.error||e.message||`Request failed (${s.status})`))}let l=s.body?.getReader();if(!l){let e=await s.json().catch(()=>({})),t=h(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await l.read();if(t)break;let a=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=a.pop()||"",a)){let t=e.trim();if(!t.startsWith("data:"))continue;let a=t.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=JSON.parse(a),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(h).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,R(m),er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,a=p(t),er(d,e=>({...e,title:"New chat"===e.title?a:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=h(e?.message||e);er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),v(t||"Kh\xf4ng thể gửi tin nhắn.")}}finally{M(!1),T(""),R(""),F.current=null}},el=V?`${V.name}`:"Select model",en=V?V.requestModel:"Choose from connected providers";return(0,a.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-[#212121] text-white overflow-hidden",children:(0,a.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,a.jsxs)("div",{ref:H,className:"relative",children:[(0,a.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-left transition hover:bg-white/8",children:(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-white",children:el}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-white/70",children:"expand_more"})]}),(0,a.jsx)("p",{className:"truncate text-xs text-white/55",children:en})]})}),P?(0,a.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-white/10 bg-[#262626] shadow-2xl shadow-black/50",children:[(0,a.jsxs)("div",{className:"border-b border-white/10 px-4 py-3",children:[(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Models"}),(0,a.jsx)("p",{className:"text-sm text-white/75",children:"Chỉ lấy từ provider đ\xe3 connect"})]}),(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,a.jsxs)("div",{className:"mb-2 rounded-[16px] border border-white/10 bg-black/20 p-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-white",children:e.providerName}),(0,a.jsx)(i.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,a.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===A;return(0,a.jsx)("button",{type:"button",onClick:()=>(e=>{let t=G.get(e);if(!t)return;let r=b.find(e=>e.id===y);if(r&&r.messages.length>0){let e=ea(t);if(!e)return;N(t=>[e,...t]),j(e.id)}else if(r)N(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),j(r.id);else{let e=ea(t);if(!e)return;N(t=>[e,...t]),j(e.id)}I(t.providerId),k(t.id),J(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.name}),(0,a.jsx)("p",{className:"truncate text-[11px] text-white/45",children:e.requestModel})]}),t?(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-blue-300",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>B(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,a.jsx)(i.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!y)return;let e=b.filter(e=>e.id!==y),t=e[0]||null;N(e),t?(j(t.id),I(t.providerId),k(t.modelId)):(j(""),I(""),k(""))},disabled:!y||0===b.length,children:"Clear"})]})]}),K?(0,a.jsxs)("div",{ref:Y,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,a.jsx)("div",{className:"px-3 py-2",children:(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Recent chats"})}),(0,a.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===ee.length?(0,a.jsx)("div",{className:"rounded-[16px] border border-dashed border-white/10 bg-white/5 p-4 text-sm text-white/55",children:"Chưa c\xf3 cuộc tr\xf2 chuyện n\xe0o."}):ee.map(e=>{let t=e.id===y,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,a.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=b.find(e=>e.id===t))&&(j(t),I(r.providerId||S),k(r.modelId||A),B(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.title}),(0,a.jsx)("p",{className:"mt-1 truncate text-xs text-white/50",children:h(r?.content)||"Empty chat"})]}),(0,a.jsx)("span",{className:"text-[10px] text-white/40 shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let a=Math.round(r/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,w?(0,a.jsx)("div",{className:"mt-4 rounded-[18px] border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-rose-100",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,a.jsx)("p",{className:"text-sm leading-6",children:w})]})}):null,(0,a.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===Z.length?(0,a.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,a.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,a.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-white/10 bg-white/5 text-white/80",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold text-white",children:"Start a conversation"}),(0,a.jsx)("p",{className:"text-sm leading-6 text-white/60",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,a.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:Z.map(e=>{let t="user"===e.role,r="assistant"===e.role,s=r&&e.id===E&&"streaming"===e.status,i=h(e.content)||(r?U:"");return(0,a.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,a.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-[#2f2f2f] px-5 py-3.5 text-white":"text-white/90"}`,children:[(0,a.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,a.jsx)("span",{className:"text-xs font-semibold",children:t?"You":V?.name||"Assistant"})}),e.attachments?.length?(0,a.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,a.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-white/10 bg-black/20",children:(0,a.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover"})},e.id))}):null,(0,a.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[i,r&&s&&!U?(0,a.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,a.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,a.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-2",children:[(0,a.jsx)("span",{className:"text-xs text-white/80 max-w-[12rem] truncate",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void O(e=>e.filter(e=>e.id!==t))},className:"text-white/55 hover:text-white","aria-label":"Remove attachment",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,a.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,a.jsxs)("div",{className:"rounded-[26px] bg-[#2f2f2f] px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-white/5",children:[(0,a.jsx)("textarea",{value:C,onChange:e=>D(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),et&&ei())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-white outline-none placeholder:text-white/40 custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>L.current?.click(),disabled:!V||r,className:"p-2 text-white/50 hover:text-white transition rounded-full hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,a.jsx)("input",{ref:L,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:es}),(0,a.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:V?V.name:"No model"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[_?(0,a.jsx)("button",{type:"button",onClick:()=>{F.current?.abort()},className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,a.jsx)("button",{onClick:ei,disabled:!et,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${et?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,a.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-white/30",children:"Model list is filtered from connected providers."})]})]})})}}},e=>{e.O(0,[5370,4335,619,2652,5497,8441,3794,7358],()=>e(e.s=87128)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{22016:(e,t,a)=>{Promise.resolve().then(a.bind(a,75228))},75228:(e,t,a)=>{"use strict";a.d(t,{default:()=>u});var s=a(95155),l=a(12115),i=a(35497),o=a(3534),r=a(28777),
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{22016:(e,t,a)=>{Promise.resolve().then(a.bind(a,75228))},75228:(e,t,a)=>{"use strict";a.d(t,{default:()=>u});var s=a(95155),l=a(12115),i=a(35497),o=a(3534),r=a(28777),c=a(97397);let n=a(41463).env.NEXT_PUBLIC_CLOUD_URL,d={claude:"/api/cli-tools/claude-settings",codex:"/api/cli-tools/codex-settings",opencode:"/api/cli-tools/opencode-settings",droid:"/api/cli-tools/droid-settings",openclaw:"/api/cli-tools/openclaw-settings"};function u({machineId:e}){let t,a,u,[p,v]=(0,l.useState)([]),[h,x]=(0,l.useState)(!0),[f,g]=(0,l.useState)(null),[j,w]=(0,l.useState)({}),[m,b]=(0,l.useState)(!1),[y,E]=(0,l.useState)(!1),[P,S]=(0,l.useState)(""),[k,N]=(0,l.useState)([]),[_,C]=(0,l.useState)({});(0,l.useEffect)(()=>{M(),A(),I(),O()},[]);let O=async()=>{try{let e=await Promise.all(Object.entries(d).map(async([e,t])=>{try{let a=await fetch(t),s=await a.json();return[e,s]}catch{return[e,null]}}));C(Object.fromEntries(e))}catch(e){console.log("Error fetching tool statuses:",e)}},A=async()=>{try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status")]);if(e.ok){let t=await e.json();b(t.cloudEnabled||!1)}if(t.ok){let e=await t.json();E(e.enabled||!1),S(e.publicUrl||"")}}catch(e){console.log("Error loading settings:",e)}},I=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let t=await e.json();N(t.keys||[])}}catch(e){console.log("Error fetching API keys:",e)}},M=async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&v(t.connections||[])}catch(e){console.log("Error fetching connections:",e)}finally{x(!1)}},U=()=>p.filter(e=>!1!==e.isActive),L=(0,l.useCallback)((e,t,a)=>{w(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);if(h)return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(i.Qv,{}),(0,s.jsx)(i.Qv,{}),(0,s.jsx)(i.Qv,{})]});let $=(t=U(),a=[],u=new Set,t.forEach(e=>{let t=r.Xg[e.provider]||e.provider;(0,r.KC)(e.provider).forEach(s=>{let l=`${t}/${s.id}`;u.has(l)||(u.add(l),a.push({value:l,label:`${t}/${s.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:s.id}))})}),a).length>0,Q=Object.entries(o.dM);return(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[!$&&(0,s.jsx)(i.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"No active providers"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,s.jsx)("div",{className:"flex flex-col gap-4",children:Q.map(([e,t])=>((e,t)=>{let a={tool:t,isExpanded:f===e,onToggle:()=>g(f===e?null:e),baseUrl:y&&P?P:m&&n?n:window.location.origin,apiKeys:k};switch(e){case"claude":return(0,s.jsx)(c.Tk,{...a,activeProviders:U(),modelMappings:j[e]||{},onModelMappingChange:(t,a)=>L(e,t,a),hasActiveProviders:$,cloudEnabled:m,initialStatus:_.claude},e);case"codex":return(0,s.jsx)(c.Ah,{...a,activeProviders:U(),cloudEnabled:m,initialStatus:_.codex},e);case"opencode":return(0,s.jsx)(c.qO,{...a,activeProviders:U(),cloudEnabled:m,initialStatus:_.opencode},e);case"droid":return(0,s.jsx)(c.ZM,{...a,activeProviders:U(),hasActiveProviders:$,cloudEnabled:m,initialStatus:_.droid},e);case"openclaw":return(0,s.jsx)(c.yZ,{...a,activeProviders:U(),hasActiveProviders:$,cloudEnabled:m,initialStatus:_.openclaw},e);default:return(0,s.jsx)(c.a7,{toolId:e,...a,activeProviders:U(),cloudEnabled:m,tunnelEnabled:y},e)}})(e,t))})]})}}},e=>{e.O(0,[5370,4335,619,5772,2652,5497,9242,8441,3794,7358],()=>e(e.s=22016)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{47295:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var a=s(95155),l=s(12115),o=s(35497),r=s(11059);s(52679);let n=/^[a-zA-Z0-9_.\-]+$/;function i(){let[e,t]=(0,l.useState)([]),[s,n]=(0,l.useState)(!0),[i,c]=(0,l.useState)(!1),[x,h]=(0,l.useState)(null),[p,u]=(0,l.useState)([]),[b,f]=(0,l.useState)({}),{copied:g,copy:j}=(0,r.C)();(0,l.useEffect)(()=>{y()},[]);let y=async()=>{try{let[e,s,a]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings")]),l=await e.json(),o=await s.json(),r=a.ok?await a.json():{};e.ok&&t(l.combos||[]),s.ok&&u(o.connections||[]),f(r.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},v=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await y(),c(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},N=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await y(),h(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},k=async s=>{if(confirm("Delete this combo?"))try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&t(e.filter(e=>e.id!==s))}catch(e){console.log("Error deleting combo:",e)}},w=async(e,t)=>{try{let s={...b};t?s[e]={fallbackStrategy:"round-robin"}:delete s[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})}),f(s)}catch(e){console.log("Error updating combo strategy:",e)}};return s?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(o.Qv,{}),(0,a.jsx)(o.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold",children:"Combos"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Create model combos with fallback support"})]}),(0,a.jsx)(o.$n,{icon:"add",onClick:()=>c(!0),children:"Create Combo"})]}),0===e.length?(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,a.jsx)(o.$n,{icon:"add",onClick:()=>c(!0),children:"Create Combo"})]})}):(0,a.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>(0,a.jsx)(d,{combo:e,copied:g,onCopy:j,onEdit:()=>h(e),onDelete:()=>k(e.id),roundRobinEnabled:b[e.name]?.fallbackStrategy==="round-robin",onToggleRoundRobin:t=>w(e.name,t)},e.id))}),(0,a.jsx)(m,{isOpen:i,onClose:()=>c(!1),onSave:v,activeProviders:p},"create"),(0,a.jsx)(m,{isOpen:!!x,combo:x,onClose:()=>h(null),onSave:e=>N(x.id,e),activeProviders:p},x?.id||"new")]})}function d({combo:e,copied:t,onCopy:s,onEdit:l,onDelete:r,roundRobinEnabled:n,onToggleRoundRobin:i}){return(0,a.jsx)(o.Zp,{padding:"sm",className:"group",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("code",{className:"text-sm font-medium font-mono truncate",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-0.5 flex-wrap",children:[0===e.models.length?(0,a.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,t)=>(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1.5 py-0.5 rounded text-text-muted",children:e},t)),e.models.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(o.lM,{size:"sm",checked:n,onChange:i})]}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsxs)("button",{onClick:t=>{t.stopPropagation(),s(e.name,`combo-${e.id}`)},className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors",title:"Copy combo name",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:t===`combo-${e.id}`?"check":"content_copy"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,a.jsxs)("button",{onClick:l,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors",title:"Edit",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:r,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500 transition-colors",title:"Delete",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]})})}function c({index:e,model:t,isFirst:s,isLast:o,onEdit:r,onMoveUp:n,onMoveDown:i,onRemove:d}){let[c,m]=(0,l.useState)(!1),[x,h]=(0,l.useState)(t),p=()=>{let e=x.trim();e&&e!==t?r(e):h(t),m(!1)};return(0,a.jsxs)("div",{className:"group flex items-center gap-1.5 px-2 py-1 rounded-md bg-black/[0.02] dark:bg-white/[0.02] hover:bg-black/[0.04] dark:hover:bg-white/[0.04] transition-colors",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:e+1}),c?(0,a.jsx)("input",{autoFocus:!0,value:x,onChange:e=>h(e.target.value),onBlur:p,onKeyDown:e=>{"Enter"===e.key&&p(),"Escape"===e.key&&(h(t),m(!1))},className:"flex-1 min-w-0 px-1.5 py-0.5 text-xs font-mono bg-white dark:bg-black/20 border border-primary/40 rounded outline-none text-text-main"}):(0,a.jsx)("div",{className:"flex-1 min-w-0 px-1.5 py-0.5 text-xs font-mono text-text-main truncate cursor-text hover:bg-black/5 dark:hover:bg-white/5 rounded",onClick:()=>m(!0),title:"Click to edit",children:t}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:n,disabled:s,className:`p-0.5 rounded ${s?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:i,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,a.jsx)("button",{onClick:d,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function m({isOpen:e,combo:t,onClose:s,onSave:r,activeProviders:i}){let[d,m]=(0,l.useState)(t?.name||""),[x,h]=(0,l.useState)(t?.models||[]),[p,u]=(0,l.useState)(!1),[b,f]=(0,l.useState)(!1),[g,j]=(0,l.useState)(""),[y,v]=(0,l.useState)({}),N=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();v(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,l.useEffect)(()=>{e&&N()},[e]);let k=e=>e.trim()?n.test(e)?(j(""),!0):(j("Only letters, numbers, -, _ and . allowed"),!1):(j("Name is required"),!1),w=async()=>{k(d)&&(f(!0),await r({name:d.trim(),models:x}),f(!1))},C=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.aF,{isOpen:e,onClose:s,title:C?"Edit Combo":"Create Combo",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:d,onChange:e=>{let t=e.target.value;m(t),t?k(t):j("")},placeholder:"my-combo",error:g}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===x.length?(0,a.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,a.jsx)("div",{className:"flex flex-col gap-1 max-h-[200px] overflow-y-auto",children:x.map((e,t)=>(0,a.jsx)(c,{index:t,model:e,isFirst:0===t,isLast:t===x.length-1,onEdit:e=>{let s=[...x];s[t]=e,h(s)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...x];[t[e-1],t[e]]=[t[e],t[e-1]],h(t)})(t),onMoveDown:()=>(e=>{if(e===x.length-1)return;let t=[...x];[t[e],t[e+1]]=[t[e+1],t[e]],h(t)})(t),onRemove:()=>{h(x.filter((e,s)=>s!==t))}},t))}),(0,a.jsxs)("button",{onClick:()=>u(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-text-muted hover:text-primary hover:border-primary/30 transition-colors flex items-center justify-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(o.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(o.$n,{onClick:w,fullWidth:!0,size:"sm",disabled:!d.trim()||!!g||b,children:b?"Saving...":C?"Save":"Create"})]})]})}),(0,a.jsx)(o.rq,{isOpen:p,onClose:()=>u(!1),onSelect:e=>{x.includes(e.value)||h([...x,e.value])},activeProviders:i,modelAliases:y,title:"Add Model to Combo"})]})}},73822:(e,t,s)=>{Promise.resolve().then(s.bind(s,47295))}},e=>{e.O(0,[2574,3862,123,2652,5497,8441,3794,7358],()=>e(e.s=73822)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{47295:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var a=s(95155),l=s(12115),o=s(35497),r=s(11059);s(52679);let n=/^[a-zA-Z0-9_.\-]+$/;function i(){let[e,t]=(0,l.useState)([]),[s,n]=(0,l.useState)(!0),[i,c]=(0,l.useState)(!1),[x,h]=(0,l.useState)(null),[p,u]=(0,l.useState)([]),[b,f]=(0,l.useState)({}),{copied:g,copy:j}=(0,r.C)();(0,l.useEffect)(()=>{y()},[]);let y=async()=>{try{let[e,s,a]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings")]),l=await e.json(),o=await s.json(),r=a.ok?await a.json():{};e.ok&&t(l.combos||[]),s.ok&&u(o.connections||[]),f(r.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},v=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await y(),c(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},N=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await y(),h(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},k=async s=>{if(confirm("Delete this combo?"))try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&t(e.filter(e=>e.id!==s))}catch(e){console.log("Error deleting combo:",e)}},w=async(e,t)=>{try{let s={...b};t?s[e]={fallbackStrategy:"round-robin"}:delete s[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})}),f(s)}catch(e){console.log("Error updating combo strategy:",e)}};return s?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(o.Qv,{}),(0,a.jsx)(o.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold",children:"Combos"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Create model combos with fallback support"})]}),(0,a.jsx)(o.$n,{icon:"add",onClick:()=>c(!0),children:"Create Combo"})]}),0===e.length?(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,a.jsx)(o.$n,{icon:"add",onClick:()=>c(!0),children:"Create Combo"})]})}):(0,a.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>(0,a.jsx)(d,{combo:e,copied:g,onCopy:j,onEdit:()=>h(e),onDelete:()=>k(e.id),roundRobinEnabled:b[e.name]?.fallbackStrategy==="round-robin",onToggleRoundRobin:t=>w(e.name,t)},e.id))}),(0,a.jsx)(m,{isOpen:i,onClose:()=>c(!1),onSave:v,activeProviders:p},"create"),(0,a.jsx)(m,{isOpen:!!x,combo:x,onClose:()=>h(null),onSave:e=>N(x.id,e),activeProviders:p},x?.id||"new")]})}function d({combo:e,copied:t,onCopy:s,onEdit:l,onDelete:r,roundRobinEnabled:n,onToggleRoundRobin:i}){return(0,a.jsx)(o.Zp,{padding:"sm",className:"group",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("code",{className:"text-sm font-medium font-mono truncate",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-0.5 flex-wrap",children:[0===e.models.length?(0,a.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,t)=>(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1.5 py-0.5 rounded text-text-muted",children:e},t)),e.models.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(o.lM,{size:"sm",checked:n,onChange:i})]}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsxs)("button",{onClick:t=>{t.stopPropagation(),s(e.name,`combo-${e.id}`)},className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors",title:"Copy combo name",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:t===`combo-${e.id}`?"check":"content_copy"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,a.jsxs)("button",{onClick:l,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors",title:"Edit",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:r,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500 transition-colors",title:"Delete",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]})})}function c({index:e,model:t,isFirst:s,isLast:o,onEdit:r,onMoveUp:n,onMoveDown:i,onRemove:d}){let[c,m]=(0,l.useState)(!1),[x,h]=(0,l.useState)(t),p=()=>{let e=x.trim();e&&e!==t?r(e):h(t),m(!1)};return(0,a.jsxs)("div",{className:"group flex items-center gap-1.5 px-2 py-1 rounded-md bg-black/[0.02] dark:bg-white/[0.02] hover:bg-black/[0.04] dark:hover:bg-white/[0.04] transition-colors",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:e+1}),c?(0,a.jsx)("input",{autoFocus:!0,value:x,onChange:e=>h(e.target.value),onBlur:p,onKeyDown:e=>{"Enter"===e.key&&p(),"Escape"===e.key&&(h(t),m(!1))},className:"flex-1 min-w-0 px-1.5 py-0.5 text-xs font-mono bg-white dark:bg-black/20 border border-primary/40 rounded outline-none text-text-main"}):(0,a.jsx)("div",{className:"flex-1 min-w-0 px-1.5 py-0.5 text-xs font-mono text-text-main truncate cursor-text hover:bg-black/5 dark:hover:bg-white/5 rounded",onClick:()=>m(!0),title:"Click to edit",children:t}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:n,disabled:s,className:`p-0.5 rounded ${s?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:i,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,a.jsx)("button",{onClick:d,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function m({isOpen:e,combo:t,onClose:s,onSave:r,activeProviders:i}){let[d,m]=(0,l.useState)(t?.name||""),[x,h]=(0,l.useState)(t?.models||[]),[p,u]=(0,l.useState)(!1),[b,f]=(0,l.useState)(!1),[g,j]=(0,l.useState)(""),[y,v]=(0,l.useState)({}),N=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();v(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,l.useEffect)(()=>{e&&N()},[e]);let k=e=>e.trim()?n.test(e)?(j(""),!0):(j("Only letters, numbers, -, _ and . allowed"),!1):(j("Name is required"),!1),w=async()=>{k(d)&&(f(!0),await r({name:d.trim(),models:x}),f(!1))},C=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.aF,{isOpen:e,onClose:s,title:C?"Edit Combo":"Create Combo",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:d,onChange:e=>{let t=e.target.value;m(t),t?k(t):j("")},placeholder:"my-combo",error:g}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===x.length?(0,a.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,a.jsx)("div",{className:"flex flex-col gap-1 max-h-[200px] overflow-y-auto",children:x.map((e,t)=>(0,a.jsx)(c,{index:t,model:e,isFirst:0===t,isLast:t===x.length-1,onEdit:e=>{let s=[...x];s[t]=e,h(s)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...x];[t[e-1],t[e]]=[t[e],t[e-1]],h(t)})(t),onMoveDown:()=>(e=>{if(e===x.length-1)return;let t=[...x];[t[e],t[e+1]]=[t[e+1],t[e]],h(t)})(t),onRemove:()=>{h(x.filter((e,s)=>s!==t))}},t))}),(0,a.jsxs)("button",{onClick:()=>u(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-text-muted hover:text-primary hover:border-primary/30 transition-colors flex items-center justify-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(o.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(o.$n,{onClick:w,fullWidth:!0,size:"sm",disabled:!d.trim()||!!g||b,children:b?"Saving...":C?"Save":"Create"})]})]})}),(0,a.jsx)(o.rq,{isOpen:p,onClose:()=>u(!1),onSelect:e=>{x.includes(e.value)||h([...x,e.value])},activeProviders:i,modelAliases:y,title:"Add Model to Combo"})]})}},73822:(e,t,s)=>{Promise.resolve().then(s.bind(s,47295))}},e=>{e.O(0,[5370,4335,619,2652,5497,8441,3794,7358],()=>e(e.s=73822)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{44493:(e,t,l)=>{"use strict";l.d(t,{default:()=>o});var s=l(95155),n=l(12115),r=l(35497),a=l(90620);let c={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function o(){let[e,t]=(0,n.useState)([]),[l,o]=(0,n.useState)(!1),i=(0,n.useRef)(null),u=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};return(0,n.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>o(!0),e.onmessage=e=>{let l=JSON.parse(e.data);"init"===l.type?t(l.logs.slice(-a.UY.maxLines)):"line"===l.type?t(e=>{let t=[...e,l.line];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"clear"===l.type&&t([])},e.onerror=()=>o(!1),()=>e.close()},[]),(0,n.useEffect)(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),(0,s.jsx)("div",{className:"",children:(0,s.jsxs)(r.Zp,{children:[(0,s.jsx)("div",{className:"flex items-center justify-end px-4 pt-3 pb-2",children:(0,s.jsx)(r.$n,{size:"sm",variant:"outline",icon:"delete",onClick:u,children:"Clear"})}),(0,s.jsx)("div",{ref:i,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto",children:0===e.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No console logs yet."}):(0,s.jsx)("div",{className:"space-y-0.5",children:e.map((e,t)=>{let l,n;return(0,s.jsx)("div",{children:(n=c[(l=e.match(/\[(\w+)\]/g))?l[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,s.jsx)("span",{className:n,children:e}))},t)})})})]})})}},89129:(e,t,l)=>{Promise.resolve().then(l.bind(l,44493))}},e=>{e.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{44493:(e,t,l)=>{"use strict";l.d(t,{default:()=>o});var s=l(95155),n=l(12115),r=l(35497),a=l(90620);let c={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function o(){let[e,t]=(0,n.useState)([]),[l,o]=(0,n.useState)(!1),i=(0,n.useRef)(null),u=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};return(0,n.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>o(!0),e.onmessage=e=>{let l=JSON.parse(e.data);"init"===l.type?t(l.logs.slice(-a.UY.maxLines)):"line"===l.type?t(e=>{let t=[...e,l.line];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"clear"===l.type&&t([])},e.onerror=()=>o(!1),()=>e.close()},[]),(0,n.useEffect)(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),(0,s.jsx)("div",{className:"",children:(0,s.jsxs)(r.Zp,{children:[(0,s.jsx)("div",{className:"flex items-center justify-end px-4 pt-3 pb-2",children:(0,s.jsx)(r.$n,{size:"sm",variant:"outline",icon:"delete",onClick:u,children:"Clear"})}),(0,s.jsx)("div",{ref:i,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto",children:0===e.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No console logs yet."}):(0,s.jsx)("div",{className:"space-y-0.5",children:e.map((e,t)=>{let l,n;return(0,s.jsx)("div",{children:(n=c[(l=e.match(/\[(\w+)\]/g))?l[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,s.jsx)("span",{className:n,children:e}))},t)})})})]})})}},89129:(e,t,l)=>{Promise.resolve().then(l.bind(l,44493))}},e=>{e.O(0,[5370,4335,619,2652,5497,8441,3794,7358],()=>e(e.s=89129)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[5370,4335,619,2652,5497,1393,8441,3794,7358],()=>_(_.s=51393)),_N_E=_.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),n=t(12115),i=t(3534),l=t(28777),c=t(52679),o=t(97397);function d(){let[e,s]=(0,n.useState)([]),[t,d]=(0,n.useState)([]),[r,u]=(0,n.useState)({}),[h,f]=(0,n.useState)(!1),[p,v]=(0,n.useState)(null),[w,g]=(0,n.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,n.useEffect)(()=>{y(),S(),k(),x()},[]);let y=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},S=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},k=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},x=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();f(s.cloudEnabled||!1)}}catch{}},j=()=>e.filter(e=>!1!==e.isActive),E=Object.entries(i.wn);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(o.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:g}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:E.map(([e,s])=>(0,a.jsx)(o.kn,{tool:s,isExpanded:p===e,onToggle:()=>v(p===e?null:e),serverRunning:w.running,dnsActive:w.dnsStatus?.[e]||!1,hasCachedPassword:w.hasCachedPassword||!1,apiKeys:t,activeProviders:j(),hasActiveProviders:j().some(e=>(0,l.KC)(e.provider).length>0||(0,c.mq)(e.provider)||(0,c.gb)(e.provider)),modelAliases:r,cloudEnabled:h,onDnsChange:e=>g(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},41621:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),n=t(12115),i=t(3534),l=t(28777),c=t(52679),o=t(97397);function d(){let[e,s]=(0,n.useState)([]),[t,d]=(0,n.useState)([]),[r,u]=(0,n.useState)({}),[h,f]=(0,n.useState)(!1),[p,v]=(0,n.useState)(null),[w,g]=(0,n.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,n.useEffect)(()=>{y(),S(),k(),x()},[]);let y=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},S=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},k=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},x=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();f(s.cloudEnabled||!1)}}catch{}},j=()=>e.filter(e=>!1!==e.isActive),E=Object.entries(i.wn);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(o.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:g}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:E.map(([e,s])=>(0,a.jsx)(o.kn,{tool:s,isExpanded:p===e,onToggle:()=>v(p===e?null:e),serverRunning:w.running,dnsActive:w.dnsStatus?.[e]||!1,hasCachedPassword:w.hasCachedPassword||!1,apiKeys:t,activeProviders:j(),hasActiveProviders:j().some(e=>(0,l.KC)(e.provider).length>0||(0,c.mq)(e.provider)||(0,c.gb)(e.provider)),modelAliases:r,cloudEnabled:h,onDnsChange:e=>g(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},41621:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[5370,4335,619,5772,2652,5497,9242,8441,3794,7358],()=>e(e.s=41621)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[5370,4335,619,2652,5497,1393,8441,3794,7358],()=>_(_.s=51393)),_N_E=_.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var a=s(95155),r=s(12115),o=s(35497),n=s(1620),i=s(31474),l=s(90620);function d(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[d,c]=(0,r.useState)({fallbackStrategy:"fill-first"}),[m,x]=(0,r.useState)(!0),[p,u]=(0,r.useState)({current:"",new:"",confirm:""}),[h,b]=(0,r.useState)({type:"",message:""}),[y,g]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[N,v]=(0,r.useState)({type:"",message:""}),w=(0,r.useRef)(null),[P,k]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[C,S]=(0,r.useState)({type:"",message:""}),[O,E]=(0,r.useState)(!1),[R,T]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{c(e),k({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),x(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),x(!1)})},[]);let L=async e=>{if(e.preventDefault(),!0===d.outboundProxyEnabled){E(!0),S({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:P.outboundProxyUrl,outboundNoProxy:P.outboundNoProxy})}),t=await e.json();e.ok?(c(e=>({...e,...t})),S({type:"success",message:"Proxy settings applied"})):S({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){S({type:"error",message:"An error occurred"})}finally{E(!1)}}},F=async()=>{if(!0!==d.outboundProxyEnabled)return;let e=(P.outboundProxyUrl||"").trim();if(!e)return void S({type:"error",message:"Please enter a Proxy URL to test"});T(!0),S({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?S({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):S({type:"error",message:s?.error||"Proxy test failed"})}catch(e){S({type:"error",message:"An error occurred"})}finally{T(!1)}},U=async e=>{E(!0),S({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(c(e=>({...e,...s})),k(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),S({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):S({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){S({type:"error",message:"An error occurred"})}finally{E(!1)}},A=async e=>{if(e.preventDefault(),p.new!==p.confirm)return void b({type:"error",message:"Passwords do not match"});g(!0),b({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:p.current,newPassword:p.new})}),t=await e.json();e.ok?(b({type:"success",message:"Password updated successfully"}),u({current:"",new:"",confirm:""})):b({type:"error",message:t.error||"Failed to update password"})}catch(e){b({type:"error",message:"An error occurred"})}finally{g(!1)}},q=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&c(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},J=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&c(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},$=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&c(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},D=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&c(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},H=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({observabilityEnabled:e})})).ok&&c(t=>({...t,observabilityEnabled:e}))}catch(e){console.error("Failed to update observabilityEnabled:",e)}},M=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();c(t)}catch(e){console.error("Failed to reload settings:",e)}},_=async()=>{j(!0),v({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t,null,2),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),o=document.createElement("a"),n=new Date().toISOString().replace(/[.:]/g,"-");o.href=r,o.download=`9router-backup-${n}.json`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r),v({type:"success",message:"Database backup downloaded"})}catch(e){v({type:"error",message:e.message||"Failed to export database"})}finally{j(!1)}},Z=async e=>{let t=e.target.files?.[0];if(t){j(!0),v({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await M(),v({type:"success",message:"Database imported successfully"})}catch(e){v({type:"error",message:e.message||"Invalid backup file"})}finally{w.current&&(w.current.value=""),j(!1)}}},I=!0===d.observabilityEnabled;return(0,a.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,i.cn)("flex items-center gap-1.5 px-3 py-1.5 rounded-md font-medium transition-all",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-bg border border-border",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Database Location"}),(0,a.jsx)("p",{className:"text-sm text-text-muted font-mono",children:"~/.9router/db.json"})]})}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:_,loading:f,children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>w.current?.click(),disabled:f,children:"Import Backup"}),(0,a.jsx)("input",{ref:w,type:"file",accept:"application/json,.json",className:"hidden",onChange:Z})]}),N.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===N.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:N.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require login"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===d.requireLogin,onChange:()=>D(!d.requireLogin),disabled:m})]}),!0===d.requireLogin&&(0,a.jsxs)("form",{onSubmit:A,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[d.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:p.current,onChange:e=>u({...p,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:p.new,onChange:e=>u({...p,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:p.confirm,onChange:e=>u({...p,confirm:e.target.value}),required:!0})]})]}),h.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===h.type?"text-red-500":"text-green-500"}`,children:h.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:y,children:d.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===d.fallbackStrategy,onChange:()=>q("round-robin"===d.fallbackStrategy?"fill-first":"round-robin"),disabled:m})]}),"round-robin"===d.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:d.stickyRoundRobinLimit||3,onChange:e=>$(e.target.value),disabled:m,className:"w-20 text-center"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===d.comboStrategy,onChange:()=>J("round-robin"===d.comboStrategy?"fallback":"round-robin"),disabled:m})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:"round-robin"===d.fallbackStrategy?`Currently distributing requests across all available accounts with ${d.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First)."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===d.outboundProxyEnabled,onChange:()=>U(!0!==d.outboundProxyEnabled),disabled:m||O})]}),!0===d.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:L,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:P.outboundProxyUrl,onChange:e=>k(t=>({...t,outboundProxyUrl:e.target.value})),disabled:m||O}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:P.outboundNoProxy,onChange:e=>k(t=>({...t,outboundNoProxy:e.target.value})),disabled:m||O}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:R,disabled:m||O,onClick:F,children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:O,children:"Apply"})]})]}),C.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===C.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:C.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:I,onChange:H,disabled:m})]})]}),(0,a.jsxs)("div",{className:"text-center text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[l.vQ.name," v",l.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]})})}},76086:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[2574,3862,123,2652,5497,8441,3794,7358],()=>e(e.s=76086)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var a=s(95155),r=s(12115),o=s(35497),n=s(1620),i=s(31474),l=s(90620);function d(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[d,c]=(0,r.useState)({fallbackStrategy:"fill-first"}),[m,x]=(0,r.useState)(!0),[p,u]=(0,r.useState)({current:"",new:"",confirm:""}),[h,b]=(0,r.useState)({type:"",message:""}),[y,g]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[N,v]=(0,r.useState)({type:"",message:""}),w=(0,r.useRef)(null),[P,k]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[C,S]=(0,r.useState)({type:"",message:""}),[O,E]=(0,r.useState)(!1),[R,T]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{c(e),k({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),x(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),x(!1)})},[]);let L=async e=>{if(e.preventDefault(),!0===d.outboundProxyEnabled){E(!0),S({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:P.outboundProxyUrl,outboundNoProxy:P.outboundNoProxy})}),t=await e.json();e.ok?(c(e=>({...e,...t})),S({type:"success",message:"Proxy settings applied"})):S({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){S({type:"error",message:"An error occurred"})}finally{E(!1)}}},F=async()=>{if(!0!==d.outboundProxyEnabled)return;let e=(P.outboundProxyUrl||"").trim();if(!e)return void S({type:"error",message:"Please enter a Proxy URL to test"});T(!0),S({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?S({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):S({type:"error",message:s?.error||"Proxy test failed"})}catch(e){S({type:"error",message:"An error occurred"})}finally{T(!1)}},U=async e=>{E(!0),S({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(c(e=>({...e,...s})),k(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),S({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):S({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){S({type:"error",message:"An error occurred"})}finally{E(!1)}},A=async e=>{if(e.preventDefault(),p.new!==p.confirm)return void b({type:"error",message:"Passwords do not match"});g(!0),b({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:p.current,newPassword:p.new})}),t=await e.json();e.ok?(b({type:"success",message:"Password updated successfully"}),u({current:"",new:"",confirm:""})):b({type:"error",message:t.error||"Failed to update password"})}catch(e){b({type:"error",message:"An error occurred"})}finally{g(!1)}},q=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&c(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},J=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&c(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},$=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&c(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},D=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&c(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},H=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({observabilityEnabled:e})})).ok&&c(t=>({...t,observabilityEnabled:e}))}catch(e){console.error("Failed to update observabilityEnabled:",e)}},M=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();c(t)}catch(e){console.error("Failed to reload settings:",e)}},_=async()=>{j(!0),v({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t,null,2),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),o=document.createElement("a"),n=new Date().toISOString().replace(/[.:]/g,"-");o.href=r,o.download=`9router-backup-${n}.json`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r),v({type:"success",message:"Database backup downloaded"})}catch(e){v({type:"error",message:e.message||"Failed to export database"})}finally{j(!1)}},Z=async e=>{let t=e.target.files?.[0];if(t){j(!0),v({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await M(),v({type:"success",message:"Database imported successfully"})}catch(e){v({type:"error",message:e.message||"Invalid backup file"})}finally{w.current&&(w.current.value=""),j(!1)}}},I=!0===d.observabilityEnabled;return(0,a.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,i.cn)("flex items-center gap-1.5 px-3 py-1.5 rounded-md font-medium transition-all",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-bg border border-border",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Database Location"}),(0,a.jsx)("p",{className:"text-sm text-text-muted font-mono",children:"~/.9router/db.json"})]})}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:_,loading:f,children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>w.current?.click(),disabled:f,children:"Import Backup"}),(0,a.jsx)("input",{ref:w,type:"file",accept:"application/json,.json",className:"hidden",onChange:Z})]}),N.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===N.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:N.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require login"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===d.requireLogin,onChange:()=>D(!d.requireLogin),disabled:m})]}),!0===d.requireLogin&&(0,a.jsxs)("form",{onSubmit:A,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[d.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:p.current,onChange:e=>u({...p,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:p.new,onChange:e=>u({...p,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:p.confirm,onChange:e=>u({...p,confirm:e.target.value}),required:!0})]})]}),h.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===h.type?"text-red-500":"text-green-500"}`,children:h.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:y,children:d.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===d.fallbackStrategy,onChange:()=>q("round-robin"===d.fallbackStrategy?"fill-first":"round-robin"),disabled:m})]}),"round-robin"===d.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:d.stickyRoundRobinLimit||3,onChange:e=>$(e.target.value),disabled:m,className:"w-20 text-center"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===d.comboStrategy,onChange:()=>J("round-robin"===d.comboStrategy?"fallback":"round-robin"),disabled:m})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:"round-robin"===d.fallbackStrategy?`Currently distributing requests across all available accounts with ${d.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First)."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===d.outboundProxyEnabled,onChange:()=>U(!0!==d.outboundProxyEnabled),disabled:m||O})]}),!0===d.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:L,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:P.outboundProxyUrl,onChange:e=>k(t=>({...t,outboundProxyUrl:e.target.value})),disabled:m||O}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:P.outboundNoProxy,onChange:e=>k(t=>({...t,outboundNoProxy:e.target.value})),disabled:m||O}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:R,disabled:m||O,onClick:F,children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:O,children:"Apply"})]})]}),C.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===C.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:C.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:I,onChange:H,disabled:m})]})]}),(0,a.jsxs)("div",{className:"text-center text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[l.vQ.name," v",l.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]})})}},76086:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[5370,4335,619,2652,5497,8441,3794,7358],()=>e(e.s=76086)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{52397:(e,t,i)=>{Promise.resolve().then(i.bind(i,97162))},97162:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>h});var s=i(95155),a=i(12115),l=i(14051),r=i.n(l),o=i(73321),n=i(98500),d=i.n(n),c=i(5772),p=i(35497),m=i(52679),x=i(28777),u=i(11059);function h(){let e=(0,o.useParams)(),t=(0,o.useRouter)(),i=e.id,[l,r]=(0,a.useState)([]),[n,h]=(0,a.useState)(!0),[g,b]=(0,a.useState)(null),[S,A]=(0,a.useState)([]),[$,P]=(0,a.useState)(!1),[T,O]=(0,a.useState)(!1),[E,R]=(0,a.useState)(!1),[I,_]=(0,a.useState)(!1),[D,q]=(0,a.useState)(!1),[U,K]=(0,a.useState)(!1),[M,L]=(0,a.useState)(null),[z,J]=(0,a.useState)({}),[F,W]=(0,a.useState)(!1),[V,B]=(0,a.useState)({}),[Z,G]=(0,a.useState)(""),[Q,H]=(0,a.useState)(null),[X,Y]=(0,a.useState)(!1),[ee,et]=(0,a.useState)([]),[ei,es]=(0,a.useState)("__none__"),[ea,el]=(0,a.useState)(!1),[er,eo]=(0,a.useState)(null),[en,ed]=(0,a.useState)(""),{copied:ec,copy:ep}=(0,u.C)(),em=g?{id:g.id,name:g.name||("anthropic-compatible"===g.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===g.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===g.type?"AC":"OC",apiType:g.apiType,baseUrl:g.baseUrl,type:g.type}:m.zN[i]||m.fg[i]||m.IS[i],ex=!!m.zN[i]||!!m.IS[i],eu=(0,x.KC)(i),eh=(0,m.wG)(i),ey=(0,m.mq)(i),ef=(0,m.gb)(i),eg=ey||ef,ev=eg?i:eh,eb=eg?g?.prefix||i:eh,ej=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&J(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),eN=(0,a.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await e.json(),o=await t.json(),n=await s.json(),d=a.ok?await a.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===i);r(e)}s.ok&&A(n.proxyPools||[]);let c=(d.providerStrategies||{})[i]||{};if(eo(c.fallbackStrategy||null),ed(null!=c.stickyRoundRobinLimit?String(c.stickyRoundRobinLimit):"1"),t.ok){let e=(o.nodes||[]).find(e=>e.id===i)||null;if(!e&&eg)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===i)||null))break}b(e)}}catch(e){console.log("Error fetching connections:",e)}finally{h(!1)}},[i,eg]),ek=async e=>{try{let t=await fetch(`/api/provider-nodes/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(b(s.node),await eN(),q(!1))}catch(e){console.log("Error updating provider node:",e)}},eC=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},l={};e&&(l.fallbackStrategy=e),"round-robin"===e&&""!==t&&(l.stickyRoundRobinLimit=Number(t)||3);let r={...a};0===Object.keys(l).length?delete r[i]:r[i]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:r})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,a.useEffect)(()=>{eN(),ej()},[eN,ej]);let ew=async(e,t,i=eh)=>{let s=`${i}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await ej();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},eS=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ej()}catch(e){console.log("Error deleting alias:",e)}},eA=async e=>{if(confirm("Delete this connection?"))try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(l.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}},e$=()=>{eN(),P(!1)},eP=async e=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:i,...e})})).ok&&(await eN(),R(!1))}catch(e){console.log("Error saving connection:",e)}},eT=async e=>{try{(await fetch(`/api/providers/${M.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eN(),_(!1))}catch(e){console.log("Error updating connection:",e)}},eO=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(i=>i.map(i=>i.id===e?{...i,isActive:t}:i))}catch(e){console.log("Error updating connection status:",e)}},eE=async(e,t)=>{let i=[...l];[i[e],i[t]]=[i[t],i[e]],r(i);try{await Promise.all([fetch(`/api/providers/${i[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${i[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await eN()}},eR=l.filter(e=>ee.includes(e.id));l.length>0&&(ee.length,l.length),(0,a.useEffect)(()=>{et(e=>e.filter(e=>l.some(t=>t.id===e)))},[l]);let eI=(()=>{if(0===eR.length)return"";let e=new Set(eR.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let i=S.find(e=>e.id===t);return`All selected currently bound to ${i?.name||t}`}return"Selected connections have mixed proxy bindings"})(),e_=()=>{ea||K(!1)},eD=async()=>{if(0===ee.length)return;let e="__none__"===ei?null:ei;el(!0);try{let t=[];for(let i of ee)try{let s=await fetch(`/api/providers/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:e})});t.push(s.ok)}catch(e){console.log("Error applying bulk proxy pool for",i,e),t.push(!1)}let i=t.filter(e=>!e).length;i>0&&alert(`Updated with ${i} failed request(s).`),await eN(),et([]),es("__none__"),K(!1)}catch(e){console.log("Error applying bulk proxy pool:",e)}finally{el(!1)}},eq=(0,s.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:l.map((e,t)=>(0,s.jsx)("div",{className:"flex items-stretch",children:(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(j,{connection:e,proxyPools:S,isOAuth:ex,isFirst:0===t,isLast:t===l.length-1,onMoveUp:()=>eE(t,t-1),onMoveDown:()=>eE(t,t+1),onToggleActive:t=>eO(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(i=>i.map(i=>i.id===e.id?{...i,providerSpecificData:{...i.providerSpecificData,proxyPoolId:t||null}}:i))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{L(e),_(!0)},onDelete:()=>eA(e.id)})})},e.id))}),eU=[{value:"__none__",label:"None"},...S.map(e=>({value:e.id,label:e.name}))],eK=0===ee.length?"Select one or more connections, then click Proxy Action.":eI,eM=ee.length>0&&!ea,eL=(0,s.jsx)(p.aF,{isOpen:U,onClose:e_,title:`Proxy Action (${ee.length} selected)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.l6,{label:"Proxy Pool",value:ei,onChange:e=>es(e.target.value),options:eU,placeholder:"None"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:eK}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Selecting None will unbind selected connections from proxy pool."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:eD,fullWidth:!0,disabled:!eM,children:ea?"Applying...":"Apply"}),(0,s.jsx)(p.$n,{onClick:e_,variant:"ghost",fullWidth:!0,disabled:ea,children:"Cancel"})]})]})}),ez=async e=>{if(!Q){H(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${ev}/${e}`})}),i=await t.json();B(t=>({...t,[e]:i.ok?"ok":"error"})),G(i.ok?"":i.error||"Model not reachable")}catch{B(t=>({...t,[e]:"error"})),G("Network error")}finally{H(null)}}};return n?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(p.Qv,{}),(0,s.jsx)(p.Qv,{})]}):em?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:"rounded-lg flex items-center justify-center",style:{backgroundColor:`${em.color}15`},children:F?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:em.color},children:em.textIcon||em.id.slice(0,2).toUpperCase()}):(0,s.jsx)(c.default,{src:ey&&em.apiType?"responses"===em.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ef?"/providers/anthropic-m.png":`/providers/${em.id}.png`,alt:em.name,width:48,height:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",sizes:"48px",onError:()=>W(!0)})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:em.name}),(0,s.jsxs)("p",{className:"text-text-muted",children:[l.length," connection",1===l.length?"":"s"]})]})]})]}),eg&&g&&(0,s.jsxs)(p.Zp,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:ef?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:[ef?"Messages API":"responses"===g.apiType?"Responses API":"Chat Completions"," \xb7 ",(g.baseUrl||"").replace(/\/$/,""),"/",ef?"messages":"responses"===g.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:()=>R(!0),disabled:l.length>0,children:"Add"}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>q(!0),children:"Edit"}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{if(confirm(`Delete this ${ef?"Anthropic":"OpenAI"} Compatible node?`))try{(await fetch(`/api/provider-nodes/${i}`,{method:"DELETE"})).ok&&t.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}},children:"Delete"})]})]}),l.length>0&&(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Only one connection is allowed per compatible node. Add another node if you need more connections."})]}),(0,s.jsxs)(p.Zp,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,s.jsx)(p.lM,{checked:"round-robin"===er,onChange:e=>{let t=e?"round-robin":null,i=e?en||"1":en;e&&!en&&ed("1"),eo(t),eC(t,i)}}),"round-robin"===er&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:en,onChange:e=>{var t;ed(t=e.target.value),eC("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===l.length?(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:ex?"lock":"key"})}),(0,s.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No connections yet"}),(0,s.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Add your first connection to get started"}),!eg&&(0,s.jsxs)("div",{className:"flex gap-2 justify-center",children:["iflow"===i&&(0,s.jsx)(p.$n,{icon:"cookie",variant:"secondary",onClick:()=>O(!0),children:"Cookie Auth"}),(0,s.jsx)(p.$n,{icon:"add",onClick:()=>ex?P(!0):R(!0),children:"iflow"===i?"OAuth":"Add Connection"})]})]}):(0,s.jsxs)(s.Fragment,{children:[eq,!eg&&(0,s.jsxs)("div",{className:"flex gap-2 mt-4",children:["iflow"===i&&(0,s.jsx)(p.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>O(!0),title:"Add connection using browser cookie",children:"Cookie"}),(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:()=>ex?P(!0):R(!0),children:"Add"})]})]})]}),(0,s.jsxs)(p.Zp,{children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,s.jsx)("h2",{className:"text-lg font-semibold",children:em.passthroughModels?"Model Aliases":"Available Models"})}),!!Z&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:Z}),(()=>{if(eg)return(0,s.jsx)(v,{providerStorageAlias:ev,providerDisplayAlias:eb,modelAliases:z,copied:ec,onCopy:ep,onSetAlias:ew,onDeleteAlias:eS,connections:l,isAnthropic:ef});if(em.passthroughModels)return(0,s.jsx)(f,{providerAlias:eh,modelAliases:z,copied:ec,onCopy:ep,onSetAlias:ew,onDeleteAlias:eS});let e=Object.entries(z).filter(([e,t])=>{let i=`${ev}/`;if(!t.startsWith(i))return!1;let s=t.slice(i.length);return!eu.some(e=>e.id===s)&&e===s}).map(([e,t])=>({id:t.slice(`${ev}/`.length),alias:e,fullModel:t}));return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[eu.map(e=>{let t=`${ev}/${e.id}`,a=`${i}/${e.id}`,r=Object.entries(z).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(y,{model:e,fullModel:`${eb}/${e.id}`,alias:r,copied:ec,onCopy:ep,onSetAlias:t=>ew(e.id,t,ev),onDeleteAlias:()=>eS(r),testStatus:V[e.id],onTest:l.length>0?()=>ez(e.id):void 0,isTesting:Q===e.id},e.id)}),e.map(e=>(0,s.jsx)(y,{model:{id:e.id},fullModel:`${eb}/${e.id}`,alias:e.alias,copied:ec,onCopy:ep,onSetAlias:()=>{},onDeleteAlias:()=>eS(e.alias),testStatus:V[e.id],onTest:l.length>0?()=>ez(e.id):void 0,isTesting:Q===e.id,isCustom:!0},e.id)),(0,s.jsxs)("button",{onClick:()=>Y(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})})()]}),eL,"kiro"===i?(0,s.jsx)(p.Mh,{isOpen:$,providerInfo:em,onSuccess:e$,onClose:()=>P(!1)}):"cursor"===i?(0,s.jsx)(p.G9,{isOpen:$,onSuccess:e$,onClose:()=>P(!1)}):(0,s.jsx)(p.LF,{isOpen:$,provider:i,providerInfo:em,onSuccess:e$,onClose:()=>P(!1)}),"iflow"===i&&(0,s.jsx)(p.vE,{isOpen:T,onSuccess:()=>{eN(),O(!1)},onClose:()=>O(!1)}),(0,s.jsx)(N,{isOpen:E,provider:i,providerName:em.name,isCompatible:eg,isAnthropic:ef,proxyPools:S,onSave:eP,onClose:()=>R(!1)}),(0,s.jsx)(k,{isOpen:I,connection:M,proxyPools:S,onSave:eT,onClose:()=>_(!1)}),eg&&(0,s.jsx)(C,{isOpen:D,node:g,onSave:ek,onClose:()=>q(!1),isAnthropic:ef}),!eg&&!em?.passthroughModels&&(0,s.jsx)(w,{isOpen:X,providerAlias:ev,providerDisplayAlias:eb,onSave:async e=>{await ew(e,e,ev),Y(!1)},onClose:()=>Y(!1)})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(d(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}function y({model:e,fullModel:t,alias:i,copied:a,onCopy:l,testStatus:r,isCustom:o,onDeleteAlias:n,onTest:d,isTesting:c}){let p="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",style:p?{color:p}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),d&&(0,s.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,title:"Test model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,s.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:"Copy model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})}),o&&(0,s.jsx)("button",{onClick:n,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function f({providerAlias:e,modelAliases:t,copied:i,onCopy:l,onSetAlias:r,onDeleteAlias:o}){let[n,d]=(0,a.useState)(""),[c,m]=(0,a.useState)(!1),x=Object.entries(t).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,i])=>({modelId:i.replace(`${e}/`,""),fullModel:i,alias:t})),u=async()=>{let e;if(!n.trim()||c)return;let i=n.trim(),s=(e=i.split("/"))[e.length-1];if(t[s])return void alert(`Alias "${s}" already exists. Please use a different model or edit existing alias.`);m(!0);try{await r(i,s),d("")}catch(e){console.log("Error adding model:",e)}finally{m(!1)}};return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"OpenRouter supports any model. Add models and create aliases for quick access."}),(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("label",{htmlFor:"new-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID (from OpenRouter)"}),(0,s.jsx)("input",{id:"new-model-input",type:"text",value:n,onChange:e=>d(e.target.value),onKeyDown:e=>"Enter"===e.key&&u(),placeholder:"anthropic/claude-3-opus",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:u,disabled:!n.trim()||c,children:c?"Adding...":"Add"})]}),x.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:x.map(({modelId:e,fullModel:t,alias:a})=>(0,s.jsx)(g,{modelId:e,fullModel:t,copied:i,onCopy:l,onDeleteAlias:()=>o(a)},t))})]})}function g({modelId:e,fullModel:t,copied:i,onCopy:a,onDeleteAlias:l,onTest:r,testStatus:o,isTesting:n}){let d="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,s.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsx)("button",{onClick:()=>a(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:"Copy model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e}`?"check":"content_copy"})}),r&&(0,s.jsx)("button",{onClick:r,disabled:n,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",title:"Test model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:n?{animation:"spin 1s linear infinite"}:void 0,children:n?"progress_activity":"science"})})]})]}),(0,s.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function v({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:i,copied:l,onCopy:r,onSetAlias:o,onDeleteAlias:n,connections:d,isAnthropic:c}){let[m,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(!1),[y,f]=(0,a.useState)(!1),[v,b]=(0,a.useState)(null),[j,N]=(0,a.useState)({}),k=async t=>{if(!v){b(t);try{let i=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),s=await i.json();N(e=>({...e,[t]:s.ok?"ok":"error"}))}catch{N(e=>({...e,[t]:"error"}))}finally{b(null)}}},C=Object.entries(i).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,i])=>({modelId:i.replace(`${e}/`,""),fullModel:i,alias:t})),w=s=>{let a,l=`${e}/${s}`;if(Object.values(i).includes(l))return null;let r=(a=s.split("/"))[a.length-1];if(!i[r])return r;let o=`${t}-${r}`;return i[o]?null:o},S=async()=>{if(!m.trim()||u)return;let t=m.trim(),i=w(t);if(!i)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await o(t,i,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},A=async()=>{if(y)return;let t=d.find(e=>!1!==e.isActive);if(t){f(!0);try{let i=await fetch(`/api/providers/${t.id}/models`),s=await i.json();if(!i.ok)return void alert(s.error||"Failed to import models");let a=s.models||[];if(0===a.length)return void alert("No models returned from /models.");let l=0;for(let t of a){let i=t.id||t.name||t.model;if(!i)continue;let s=w(i);s&&(await o(i,s,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{f(!1)}}},$=d.some(e=>!1!==e.isActive);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",c?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{id:"new-compatible-model-input",type:"text",value:m,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&S(),placeholder:c?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:S,disabled:!m.trim()||u,children:u?"Adding...":"Add"}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"download",onClick:A,disabled:!$||y,children:y?"Importing...":"Import from /models"})]}),!$&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:i,alias:a})=>(0,s.jsx)(g,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>n(a),onTest:d.length>0?()=>k(e):void 0,testStatus:j[e],isTesting:v===e},i))})]})}function b({until:e}){let[t,i]=(0,a.useState)("");return((0,a.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void i("");let s=Math.floor(t/1e3);if(s<60)i(`${s}s`);else if(s<3600)i(`${Math.floor(s/60)}m ${s%60}s`);else{let e=Math.floor(s/3600),t=Math.floor(s%3600/60);i(`${e}h ${t}m`)}};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function j({connection:e,proxyPools:t,isOAuth:i,isFirst:l,isLast:r,onMoveUp:o,onMoveDown:n,onToggleActive:d,onUpdateProxy:c,onEdit:m,onDelete:x}){let[u,h]=(0,a.useState)(!1),[y,f]=(0,a.useState)(!1),g=(0,a.useRef)(null),v=new Map((t||[]).map(e=>[e.id,e])),j=e.providerSpecificData?.proxyPoolId||null,N=j?v.get(j):null,k=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!j||k,w=N?`Pool: ${N.name}`:j?`Pool: ${j} (inactive/missing)`:k?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",S="";if(N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);S=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{S=t}}let A=N?.noProxy||e.providerSpecificData?.connectionNoProxy||"",$="default";N?.isActive===!0?$="success":(j||k)&&($="error"),(0,a.useEffect)(()=>{if(!u)return;let e=e=>{g.current&&!g.current.contains(e.target)&&h(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[u]);let P=async e=>{f(!0);try{await c("__none__"===e?null:e)}finally{f(!1),h(!1)}},T=i?e.name||e.email||e.displayName||"OAuth Account":e.name,[O,E]=(0,a.useState)(!1),R=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,a.useEffect)(()=>{let t=()=>{E(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let i=R?setInterval(t,1e3):null;return()=>{i&&clearInterval(i)}},[R]);let I="unavailable"!==e.testStatus||O?e.testStatus:"active";return(0,s.jsxs)("div",{className:`group flex items-center justify-between p-3 rounded-lg hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("button",{onClick:o,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.jsx)("button",{onClick:n,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:i?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:T}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)(p.Ex,{variant:!1===e.isActive?"default":"active"===I||"success"===I?"success":"error"===I||"expired"===I||"unavailable"===I?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":I||"Unknown"}),C&&(0,s.jsx)(p.Ex,{variant:$,size:"sm",children:"Proxy"}),O&&!1!==e.isActive&&(0,s.jsx)(b,{until:R}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]})]}),C&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:w,children:w}),S&&(0,s.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:S}),A&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:A,children:["no_proxy: ",A]})]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("div",{className:"flex gap-1",children:[(t||[]).length>0&&(0,s.jsxs)("div",{className:"relative",ref:g,children:[(0,s.jsxs)("button",{onClick:()=>h(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),u&&(0,s.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,s.jsx)("button",{onClick:()=>P("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!j?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,s.jsx)("button",{onClick:()=>P(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${j===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,s.jsxs)("button",{onClick:m,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:x,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,s.jsx)(p.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}function N({isOpen:e,provider:t,providerName:i,isCompatible:l,isAnthropic:r,proxyPools:o,onSave:n,onClose:d}){let c="__none__",[m,x]=(0,a.useState)({name:"",apiKey:"",priority:1,proxyPoolId:c}),[u,h]=(0,a.useState)(!1),[y,f]=(0,a.useState)(null),[g,v]=(0,a.useState)(!1),b=async()=>{h(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:m.apiKey})}),i=await e.json();f(i.valid?"success":"failed")}catch{f("failed")}finally{h(!1)}},j=async()=>{if(t&&m.apiKey){v(!0);try{let e=!1;try{h(!0),f(null);let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:m.apiKey})});e=!!(await i.json()).valid,f(e?"success":"failed")}catch{f("failed")}finally{h(!1)}await n({name:m.name,apiKey:m.apiKey,priority:m.priority,proxyPoolId:m.proxyPoolId===c?null:m.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:void 0})}finally{v(!1)}}};return t?(0,s.jsx)(p.aF,{isOpen:e,title:`Add ${i||t} API Key`,onClose:d,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.pd,{label:"Name",value:m.name,onChange:e=>x({...m,name:e.target.value}),placeholder:"Production Key"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.pd,{label:"API Key",type:"password",value:m.apiKey,onChange:e=>x({...m,apiKey:e.target.value}),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:b,disabled:!m.apiKey||u||g,variant:"secondary",children:u?"Checking...":"Check"})})]}),y&&(0,s.jsx)(p.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),l&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:r?`Validation checks ${i||"Anthropic Compatible"} by verifying the API key.`:`Validation checks ${i||"OpenAI Compatible"} via /models on your base URL.`}),(0,s.jsx)(p.pd,{label:"Priority",type:"number",value:m.priority,onChange:e=>x({...m,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsx)(p.l6,{label:"Proxy Pool",value:m.proxyPoolId,onChange:e=>x({...m,proxyPoolId:e.target.value}),options:[{value:c,label:"None"},...(o||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(o||[]).length&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:j,fullWidth:!0,disabled:!m.name||!m.apiKey||g,children:g?"Saving...":"Save"}),(0,s.jsx)(p.$n,{onClick:d,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function k({isOpen:e,connection:t,proxyPools:i,onSave:l,onClose:r}){let[o,n]=(0,a.useState)({name:"",priority:1,apiKey:""}),[d,c]=(0,a.useState)(!1),[x,u]=(0,a.useState)(null),[h,y]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),[v,b]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t&&(n({name:t.name||"",priority:t.priority||1,apiKey:""}),u(null),g(null))},[t]);let j=async()=>{if(t?.provider){c(!0),u(null);try{let e=await fetch(`/api/providers/${t.id}/test`,{method:"POST"}),i=await e.json();u(i.valid?"success":"failed")}catch{u("failed")}finally{c(!1)}}},N=async()=>{if(t?.provider&&o.apiKey){y(!0),g(null);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:o.apiKey})}),i=await e.json();g(i.valid?"success":"failed")}catch{g("failed")}finally{y(!1)}}},k=async()=>{b(!0);try{let e={name:o.name,priority:o.priority};if(!C&&o.apiKey){e.apiKey=o.apiKey;let i="success"===f;if(!i)try{y(!0),g(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:o.apiKey})});i=!!(await e.json()).valid,g(i?"success":"failed")}catch{g("failed")}finally{y(!1)}i&&(e.testStatus="active",e.lastError=null,e.lastErrorAt=null)}await l(e)}finally{b(!1)}};if(!t)return null;let C="oauth"===t.authType,w=(0,m.mq)(t.provider)||(0,m.gb)(t.provider);return(0,s.jsx)(p.aF,{isOpen:e,title:"Edit Connection",onClose:r,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.pd,{label:"Name",value:o.name,onChange:e=>n({...o,name:e.target.value}),placeholder:C?"Account name":"Production Key"}),C&&t.email&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-3 rounded-lg",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted mb-1",children:"Email"}),(0,s.jsx)("p",{className:"font-medium",children:t.email})]}),(0,s.jsx)(p.pd,{label:"Priority",type:"number",value:o.priority,onChange:e=>n({...o,priority:Number.parseInt(e.target.value)||1})}),!C&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.pd,{label:"API Key",type:"password",value:o.apiKey,onChange:e=>n({...o,apiKey:e.target.value}),placeholder:"Enter new API key",hint:"Leave blank to keep the current API key.",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:N,disabled:!o.apiKey||h||v,variant:"secondary",children:h?"Checking...":"Check"})})]}),f&&(0,s.jsx)(p.Ex,{variant:"success"===f?"success":"error",children:"success"===f?"Valid":"Invalid"})]}),!w&&(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(p.$n,{onClick:j,variant:"secondary",disabled:d,children:d?"Testing...":"Test Connection"}),x&&(0,s.jsx)(p.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Failed"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:k,fullWidth:!0,disabled:v,children:v?"Saving...":"Save"}),(0,s.jsx)(p.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function C({isOpen:e,node:t,onSave:i,onClose:l,isAnthropic:r}){let[o,n]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,c]=(0,a.useState)(!1),[m,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(""),[y,f]=(0,a.useState)(!1),[g,v]=(0,a.useState)(null);(0,a.useEffect)(()=>{t&&n({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let b=async()=>{if(o.name.trim()&&o.prefix.trim()&&o.baseUrl.trim()){c(!0);try{let e={name:o.name,prefix:o.prefix,baseUrl:o.baseUrl};r||(e.apiType=o.apiType),await i(e)}finally{c(!1)}}},j=async()=>{f(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:o.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();v(t.valid?"success":"failed")}catch{v("failed")}finally{f(!1)}};return t?(0,s.jsx)(p.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.pd,{label:"Name",value:o.name,onChange:e=>n({...o,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,s.jsx)(p.pd,{label:"Prefix",value:o.prefix,onChange:e=>n({...o,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,s.jsx)(p.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:o.apiType,onChange:e=>n({...o,apiType:e.target.value})}),(0,s.jsx)(p.pd,{label:"Base URL",value:o.baseUrl,onChange:e=>n({...o,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>x(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:j,disabled:!m||y||!o.baseUrl.trim(),variant:"secondary",children:y?"Checking...":"Check"})})]}),(0,s.jsx)(p.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),g&&(0,s.jsx)(p.Ex,{variant:"success"===g?"success":"error",children:"success"===g?"Valid":"Invalid"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:b,fullWidth:!0,disabled:!o.name.trim()||!o.prefix.trim()||!o.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,s.jsx)(p.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function w({isOpen:e,providerAlias:t,providerDisplayAlias:i,onSave:l,onClose:r}){let[o,n]=(0,a.useState)(""),[d,c]=(0,a.useState)(null),[m,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&(n(""),c(null),x(""))},[e]);let y=async()=>{if(o.trim()){c("testing"),x("");try{let e=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${o.trim()}`})}),i=await e.json();c(i.ok?"ok":"error"),x(i.error||"")}catch(e){c("error"),x(e.message)}}},f=async()=>{if(o.trim()&&!u){h(!0);try{await l(o.trim())}finally{h(!1)}}};return(0,s.jsx)(p.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:o,onChange:e=>{n(e.target.value),c(null),x("")},onKeyDown:e=>{"Enter"===e.key&&y()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,s.jsx)(p.$n,{variant:"secondary",icon:"science",loading:"testing"===d,onClick:y,disabled:!o.trim()||"testing"===d,children:"testing"===d?"Testing...":"Test"})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,s.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:o.trim()||"model-id"})]})]}),"ok"===d&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===d&&(0,s.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,s.jsx)("span",{children:m||"Model not reachable"})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(p.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(p.$n,{onClick:f,fullWidth:!0,size:"sm",disabled:!o.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}y.propTypes={model:r().shape({id:r().string.isRequired}).isRequired,fullModel:r().string.isRequired,alias:r().string,copied:r().string,onCopy:r().func.isRequired,testStatus:r().oneOf(["ok","error"]),isCustom:r().bool,onDeleteAlias:r().func,onTest:r().func,isTesting:r().bool},f.propTypes={providerAlias:r().string.isRequired,modelAliases:r().object.isRequired,copied:r().string,onCopy:r().func.isRequired,onSetAlias:r().func.isRequired,onDeleteAlias:r().func.isRequired},g.propTypes={modelId:r().string.isRequired,fullModel:r().string.isRequired,copied:r().string,onCopy:r().func.isRequired,onDeleteAlias:r().func.isRequired,onTest:r().func,testStatus:r().oneOf(["ok","error"]),isTesting:r().bool},v.propTypes={providerStorageAlias:r().string.isRequired,providerDisplayAlias:r().string.isRequired,modelAliases:r().object.isRequired,copied:r().string,onCopy:r().func.isRequired,onSetAlias:r().func.isRequired,onDeleteAlias:r().func.isRequired,connections:r().arrayOf(r().shape({id:r().string,isActive:r().bool})).isRequired,isAnthropic:r().bool},b.propTypes={until:r().string.isRequired},j.propTypes={connection:r().shape({id:r().string,name:r().string,email:r().string,displayName:r().string,modelLockUntil:r().string,testStatus:r().string,isActive:r().bool,lastError:r().string,priority:r().number,globalPriority:r().number}).isRequired,proxyPools:r().arrayOf(r().shape({id:r().string,name:r().string,proxyUrl:r().string,noProxy:r().string,isActive:r().bool})),isOAuth:r().bool.isRequired,isFirst:r().bool.isRequired,isLast:r().bool.isRequired,onMoveUp:r().func.isRequired,onMoveDown:r().func.isRequired,onToggleActive:r().func.isRequired,onUpdateProxy:r().func,onEdit:r().func.isRequired,onDelete:r().func.isRequired},N.propTypes={isOpen:r().bool.isRequired,provider:r().string,providerName:r().string,isCompatible:r().bool,isAnthropic:r().bool,proxyPools:r().arrayOf(r().shape({id:r().string,name:r().string})),onSave:r().func.isRequired,onClose:r().func.isRequired},k.propTypes={isOpen:r().bool.isRequired,connection:r().shape({id:r().string,name:r().string,email:r().string,priority:r().number,authType:r().string,provider:r().string,providerSpecificData:r().object}),proxyPools:r().arrayOf(r().shape({id:r().string,name:r().string})),onSave:r().func.isRequired,onClose:r().func.isRequired},C.propTypes={isOpen:r().bool.isRequired,node:r().shape({id:r().string,name:r().string,prefix:r().string,apiType:r().string,baseUrl:r().string}),onSave:r().func.isRequired,onClose:r().func.isRequired,isAnthropic:r().bool},w.propTypes={isOpen:r().bool.isRequired,providerAlias:r().string.isRequired,providerDisplayAlias:r().string.isRequired,onSave:r().func.isRequired,onClose:r().func.isRequired}}},e=>{e.O(0,[2574,3862,123,5772,2652,5497,8441,3794,7358],()=>e(e.s=52397)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{52397:(e,t,i)=>{Promise.resolve().then(i.bind(i,97162))},97162:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>h});var s=i(95155),a=i(12115),l=i(14051),r=i.n(l),o=i(73321),n=i(98500),d=i.n(n),c=i(5772),p=i(35497),m=i(52679),x=i(28777),u=i(11059);function h(){let e=(0,o.useParams)(),t=(0,o.useRouter)(),i=e.id,[l,r]=(0,a.useState)([]),[n,h]=(0,a.useState)(!0),[g,b]=(0,a.useState)(null),[S,A]=(0,a.useState)([]),[$,P]=(0,a.useState)(!1),[T,O]=(0,a.useState)(!1),[E,R]=(0,a.useState)(!1),[I,_]=(0,a.useState)(!1),[D,q]=(0,a.useState)(!1),[U,K]=(0,a.useState)(!1),[M,L]=(0,a.useState)(null),[z,J]=(0,a.useState)({}),[F,W]=(0,a.useState)(!1),[V,B]=(0,a.useState)({}),[Z,G]=(0,a.useState)(""),[Q,H]=(0,a.useState)(null),[X,Y]=(0,a.useState)(!1),[ee,et]=(0,a.useState)([]),[ei,es]=(0,a.useState)("__none__"),[ea,el]=(0,a.useState)(!1),[er,eo]=(0,a.useState)(null),[en,ed]=(0,a.useState)(""),{copied:ec,copy:ep}=(0,u.C)(),em=g?{id:g.id,name:g.name||("anthropic-compatible"===g.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===g.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===g.type?"AC":"OC",apiType:g.apiType,baseUrl:g.baseUrl,type:g.type}:m.zN[i]||m.fg[i]||m.IS[i],ex=!!m.zN[i]||!!m.IS[i],eu=(0,x.KC)(i),eh=(0,m.wG)(i),ey=(0,m.mq)(i),ef=(0,m.gb)(i),eg=ey||ef,ev=eg?i:eh,eb=eg?g?.prefix||i:eh,ej=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&J(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),eN=(0,a.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await e.json(),o=await t.json(),n=await s.json(),d=a.ok?await a.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===i);r(e)}s.ok&&A(n.proxyPools||[]);let c=(d.providerStrategies||{})[i]||{};if(eo(c.fallbackStrategy||null),ed(null!=c.stickyRoundRobinLimit?String(c.stickyRoundRobinLimit):"1"),t.ok){let e=(o.nodes||[]).find(e=>e.id===i)||null;if(!e&&eg)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===i)||null))break}b(e)}}catch(e){console.log("Error fetching connections:",e)}finally{h(!1)}},[i,eg]),ek=async e=>{try{let t=await fetch(`/api/provider-nodes/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(b(s.node),await eN(),q(!1))}catch(e){console.log("Error updating provider node:",e)}},eC=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},l={};e&&(l.fallbackStrategy=e),"round-robin"===e&&""!==t&&(l.stickyRoundRobinLimit=Number(t)||3);let r={...a};0===Object.keys(l).length?delete r[i]:r[i]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:r})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,a.useEffect)(()=>{eN(),ej()},[eN,ej]);let ew=async(e,t,i=eh)=>{let s=`${i}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await ej();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},eS=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ej()}catch(e){console.log("Error deleting alias:",e)}},eA=async e=>{if(confirm("Delete this connection?"))try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(l.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}},e$=()=>{eN(),P(!1)},eP=async e=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:i,...e})})).ok&&(await eN(),R(!1))}catch(e){console.log("Error saving connection:",e)}},eT=async e=>{try{(await fetch(`/api/providers/${M.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eN(),_(!1))}catch(e){console.log("Error updating connection:",e)}},eO=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(i=>i.map(i=>i.id===e?{...i,isActive:t}:i))}catch(e){console.log("Error updating connection status:",e)}},eE=async(e,t)=>{let i=[...l];[i[e],i[t]]=[i[t],i[e]],r(i);try{await Promise.all([fetch(`/api/providers/${i[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${i[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await eN()}},eR=l.filter(e=>ee.includes(e.id));l.length>0&&(ee.length,l.length),(0,a.useEffect)(()=>{et(e=>e.filter(e=>l.some(t=>t.id===e)))},[l]);let eI=(()=>{if(0===eR.length)return"";let e=new Set(eR.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let i=S.find(e=>e.id===t);return`All selected currently bound to ${i?.name||t}`}return"Selected connections have mixed proxy bindings"})(),e_=()=>{ea||K(!1)},eD=async()=>{if(0===ee.length)return;let e="__none__"===ei?null:ei;el(!0);try{let t=[];for(let i of ee)try{let s=await fetch(`/api/providers/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:e})});t.push(s.ok)}catch(e){console.log("Error applying bulk proxy pool for",i,e),t.push(!1)}let i=t.filter(e=>!e).length;i>0&&alert(`Updated with ${i} failed request(s).`),await eN(),et([]),es("__none__"),K(!1)}catch(e){console.log("Error applying bulk proxy pool:",e)}finally{el(!1)}},eq=(0,s.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:l.map((e,t)=>(0,s.jsx)("div",{className:"flex items-stretch",children:(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(j,{connection:e,proxyPools:S,isOAuth:ex,isFirst:0===t,isLast:t===l.length-1,onMoveUp:()=>eE(t,t-1),onMoveDown:()=>eE(t,t+1),onToggleActive:t=>eO(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(i=>i.map(i=>i.id===e.id?{...i,providerSpecificData:{...i.providerSpecificData,proxyPoolId:t||null}}:i))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{L(e),_(!0)},onDelete:()=>eA(e.id)})})},e.id))}),eU=[{value:"__none__",label:"None"},...S.map(e=>({value:e.id,label:e.name}))],eK=0===ee.length?"Select one or more connections, then click Proxy Action.":eI,eM=ee.length>0&&!ea,eL=(0,s.jsx)(p.aF,{isOpen:U,onClose:e_,title:`Proxy Action (${ee.length} selected)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.l6,{label:"Proxy Pool",value:ei,onChange:e=>es(e.target.value),options:eU,placeholder:"None"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:eK}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Selecting None will unbind selected connections from proxy pool."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:eD,fullWidth:!0,disabled:!eM,children:ea?"Applying...":"Apply"}),(0,s.jsx)(p.$n,{onClick:e_,variant:"ghost",fullWidth:!0,disabled:ea,children:"Cancel"})]})]})}),ez=async e=>{if(!Q){H(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${ev}/${e}`})}),i=await t.json();B(t=>({...t,[e]:i.ok?"ok":"error"})),G(i.ok?"":i.error||"Model not reachable")}catch{B(t=>({...t,[e]:"error"})),G("Network error")}finally{H(null)}}};return n?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(p.Qv,{}),(0,s.jsx)(p.Qv,{})]}):em?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:"rounded-lg flex items-center justify-center",style:{backgroundColor:`${em.color}15`},children:F?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:em.color},children:em.textIcon||em.id.slice(0,2).toUpperCase()}):(0,s.jsx)(c.default,{src:ey&&em.apiType?"responses"===em.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ef?"/providers/anthropic-m.png":`/providers/${em.id}.png`,alt:em.name,width:48,height:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",sizes:"48px",onError:()=>W(!0)})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:em.name}),(0,s.jsxs)("p",{className:"text-text-muted",children:[l.length," connection",1===l.length?"":"s"]})]})]})]}),eg&&g&&(0,s.jsxs)(p.Zp,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:ef?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:[ef?"Messages API":"responses"===g.apiType?"Responses API":"Chat Completions"," \xb7 ",(g.baseUrl||"").replace(/\/$/,""),"/",ef?"messages":"responses"===g.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:()=>R(!0),disabled:l.length>0,children:"Add"}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>q(!0),children:"Edit"}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{if(confirm(`Delete this ${ef?"Anthropic":"OpenAI"} Compatible node?`))try{(await fetch(`/api/provider-nodes/${i}`,{method:"DELETE"})).ok&&t.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}},children:"Delete"})]})]}),l.length>0&&(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Only one connection is allowed per compatible node. Add another node if you need more connections."})]}),(0,s.jsxs)(p.Zp,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,s.jsx)(p.lM,{checked:"round-robin"===er,onChange:e=>{let t=e?"round-robin":null,i=e?en||"1":en;e&&!en&&ed("1"),eo(t),eC(t,i)}}),"round-robin"===er&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:en,onChange:e=>{var t;ed(t=e.target.value),eC("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===l.length?(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:ex?"lock":"key"})}),(0,s.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No connections yet"}),(0,s.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Add your first connection to get started"}),!eg&&(0,s.jsxs)("div",{className:"flex gap-2 justify-center",children:["iflow"===i&&(0,s.jsx)(p.$n,{icon:"cookie",variant:"secondary",onClick:()=>O(!0),children:"Cookie Auth"}),(0,s.jsx)(p.$n,{icon:"add",onClick:()=>ex?P(!0):R(!0),children:"iflow"===i?"OAuth":"Add Connection"})]})]}):(0,s.jsxs)(s.Fragment,{children:[eq,!eg&&(0,s.jsxs)("div",{className:"flex gap-2 mt-4",children:["iflow"===i&&(0,s.jsx)(p.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>O(!0),title:"Add connection using browser cookie",children:"Cookie"}),(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:()=>ex?P(!0):R(!0),children:"Add"})]})]})]}),(0,s.jsxs)(p.Zp,{children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,s.jsx)("h2",{className:"text-lg font-semibold",children:em.passthroughModels?"Model Aliases":"Available Models"})}),!!Z&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:Z}),(()=>{if(eg)return(0,s.jsx)(v,{providerStorageAlias:ev,providerDisplayAlias:eb,modelAliases:z,copied:ec,onCopy:ep,onSetAlias:ew,onDeleteAlias:eS,connections:l,isAnthropic:ef});if(em.passthroughModels)return(0,s.jsx)(f,{providerAlias:eh,modelAliases:z,copied:ec,onCopy:ep,onSetAlias:ew,onDeleteAlias:eS});let e=Object.entries(z).filter(([e,t])=>{let i=`${ev}/`;if(!t.startsWith(i))return!1;let s=t.slice(i.length);return!eu.some(e=>e.id===s)&&e===s}).map(([e,t])=>({id:t.slice(`${ev}/`.length),alias:e,fullModel:t}));return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[eu.map(e=>{let t=`${ev}/${e.id}`,a=`${i}/${e.id}`,r=Object.entries(z).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(y,{model:e,fullModel:`${eb}/${e.id}`,alias:r,copied:ec,onCopy:ep,onSetAlias:t=>ew(e.id,t,ev),onDeleteAlias:()=>eS(r),testStatus:V[e.id],onTest:l.length>0?()=>ez(e.id):void 0,isTesting:Q===e.id},e.id)}),e.map(e=>(0,s.jsx)(y,{model:{id:e.id},fullModel:`${eb}/${e.id}`,alias:e.alias,copied:ec,onCopy:ep,onSetAlias:()=>{},onDeleteAlias:()=>eS(e.alias),testStatus:V[e.id],onTest:l.length>0?()=>ez(e.id):void 0,isTesting:Q===e.id,isCustom:!0},e.id)),(0,s.jsxs)("button",{onClick:()=>Y(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})})()]}),eL,"kiro"===i?(0,s.jsx)(p.Mh,{isOpen:$,providerInfo:em,onSuccess:e$,onClose:()=>P(!1)}):"cursor"===i?(0,s.jsx)(p.G9,{isOpen:$,onSuccess:e$,onClose:()=>P(!1)}):(0,s.jsx)(p.LF,{isOpen:$,provider:i,providerInfo:em,onSuccess:e$,onClose:()=>P(!1)}),"iflow"===i&&(0,s.jsx)(p.vE,{isOpen:T,onSuccess:()=>{eN(),O(!1)},onClose:()=>O(!1)}),(0,s.jsx)(N,{isOpen:E,provider:i,providerName:em.name,isCompatible:eg,isAnthropic:ef,proxyPools:S,onSave:eP,onClose:()=>R(!1)}),(0,s.jsx)(k,{isOpen:I,connection:M,proxyPools:S,onSave:eT,onClose:()=>_(!1)}),eg&&(0,s.jsx)(C,{isOpen:D,node:g,onSave:ek,onClose:()=>q(!1),isAnthropic:ef}),!eg&&!em?.passthroughModels&&(0,s.jsx)(w,{isOpen:X,providerAlias:ev,providerDisplayAlias:eb,onSave:async e=>{await ew(e,e,ev),Y(!1)},onClose:()=>Y(!1)})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(d(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}function y({model:e,fullModel:t,alias:i,copied:a,onCopy:l,testStatus:r,isCustom:o,onDeleteAlias:n,onTest:d,isTesting:c}){let p="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",style:p?{color:p}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),d&&(0,s.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,title:"Test model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,s.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:"Copy model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})}),o&&(0,s.jsx)("button",{onClick:n,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function f({providerAlias:e,modelAliases:t,copied:i,onCopy:l,onSetAlias:r,onDeleteAlias:o}){let[n,d]=(0,a.useState)(""),[c,m]=(0,a.useState)(!1),x=Object.entries(t).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,i])=>({modelId:i.replace(`${e}/`,""),fullModel:i,alias:t})),u=async()=>{let e;if(!n.trim()||c)return;let i=n.trim(),s=(e=i.split("/"))[e.length-1];if(t[s])return void alert(`Alias "${s}" already exists. Please use a different model or edit existing alias.`);m(!0);try{await r(i,s),d("")}catch(e){console.log("Error adding model:",e)}finally{m(!1)}};return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"OpenRouter supports any model. Add models and create aliases for quick access."}),(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("label",{htmlFor:"new-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID (from OpenRouter)"}),(0,s.jsx)("input",{id:"new-model-input",type:"text",value:n,onChange:e=>d(e.target.value),onKeyDown:e=>"Enter"===e.key&&u(),placeholder:"anthropic/claude-3-opus",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:u,disabled:!n.trim()||c,children:c?"Adding...":"Add"})]}),x.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:x.map(({modelId:e,fullModel:t,alias:a})=>(0,s.jsx)(g,{modelId:e,fullModel:t,copied:i,onCopy:l,onDeleteAlias:()=>o(a)},t))})]})}function g({modelId:e,fullModel:t,copied:i,onCopy:a,onDeleteAlias:l,onTest:r,testStatus:o,isTesting:n}){let d="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,s.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsx)("button",{onClick:()=>a(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:"Copy model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e}`?"check":"content_copy"})}),r&&(0,s.jsx)("button",{onClick:r,disabled:n,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",title:"Test model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:n?{animation:"spin 1s linear infinite"}:void 0,children:n?"progress_activity":"science"})})]})]}),(0,s.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function v({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:i,copied:l,onCopy:r,onSetAlias:o,onDeleteAlias:n,connections:d,isAnthropic:c}){let[m,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(!1),[y,f]=(0,a.useState)(!1),[v,b]=(0,a.useState)(null),[j,N]=(0,a.useState)({}),k=async t=>{if(!v){b(t);try{let i=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),s=await i.json();N(e=>({...e,[t]:s.ok?"ok":"error"}))}catch{N(e=>({...e,[t]:"error"}))}finally{b(null)}}},C=Object.entries(i).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,i])=>({modelId:i.replace(`${e}/`,""),fullModel:i,alias:t})),w=s=>{let a,l=`${e}/${s}`;if(Object.values(i).includes(l))return null;let r=(a=s.split("/"))[a.length-1];if(!i[r])return r;let o=`${t}-${r}`;return i[o]?null:o},S=async()=>{if(!m.trim()||u)return;let t=m.trim(),i=w(t);if(!i)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await o(t,i,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},A=async()=>{if(y)return;let t=d.find(e=>!1!==e.isActive);if(t){f(!0);try{let i=await fetch(`/api/providers/${t.id}/models`),s=await i.json();if(!i.ok)return void alert(s.error||"Failed to import models");let a=s.models||[];if(0===a.length)return void alert("No models returned from /models.");let l=0;for(let t of a){let i=t.id||t.name||t.model;if(!i)continue;let s=w(i);s&&(await o(i,s,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{f(!1)}}},$=d.some(e=>!1!==e.isActive);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",c?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{id:"new-compatible-model-input",type:"text",value:m,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&S(),placeholder:c?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:S,disabled:!m.trim()||u,children:u?"Adding...":"Add"}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"download",onClick:A,disabled:!$||y,children:y?"Importing...":"Import from /models"})]}),!$&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:i,alias:a})=>(0,s.jsx)(g,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>n(a),onTest:d.length>0?()=>k(e):void 0,testStatus:j[e],isTesting:v===e},i))})]})}function b({until:e}){let[t,i]=(0,a.useState)("");return((0,a.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void i("");let s=Math.floor(t/1e3);if(s<60)i(`${s}s`);else if(s<3600)i(`${Math.floor(s/60)}m ${s%60}s`);else{let e=Math.floor(s/3600),t=Math.floor(s%3600/60);i(`${e}h ${t}m`)}};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function j({connection:e,proxyPools:t,isOAuth:i,isFirst:l,isLast:r,onMoveUp:o,onMoveDown:n,onToggleActive:d,onUpdateProxy:c,onEdit:m,onDelete:x}){let[u,h]=(0,a.useState)(!1),[y,f]=(0,a.useState)(!1),g=(0,a.useRef)(null),v=new Map((t||[]).map(e=>[e.id,e])),j=e.providerSpecificData?.proxyPoolId||null,N=j?v.get(j):null,k=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!j||k,w=N?`Pool: ${N.name}`:j?`Pool: ${j} (inactive/missing)`:k?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",S="";if(N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);S=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{S=t}}let A=N?.noProxy||e.providerSpecificData?.connectionNoProxy||"",$="default";N?.isActive===!0?$="success":(j||k)&&($="error"),(0,a.useEffect)(()=>{if(!u)return;let e=e=>{g.current&&!g.current.contains(e.target)&&h(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[u]);let P=async e=>{f(!0);try{await c("__none__"===e?null:e)}finally{f(!1),h(!1)}},T=i?e.name||e.email||e.displayName||"OAuth Account":e.name,[O,E]=(0,a.useState)(!1),R=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,a.useEffect)(()=>{let t=()=>{E(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let i=R?setInterval(t,1e3):null;return()=>{i&&clearInterval(i)}},[R]);let I="unavailable"!==e.testStatus||O?e.testStatus:"active";return(0,s.jsxs)("div",{className:`group flex items-center justify-between p-3 rounded-lg hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("button",{onClick:o,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.jsx)("button",{onClick:n,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:i?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:T}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)(p.Ex,{variant:!1===e.isActive?"default":"active"===I||"success"===I?"success":"error"===I||"expired"===I||"unavailable"===I?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":I||"Unknown"}),C&&(0,s.jsx)(p.Ex,{variant:$,size:"sm",children:"Proxy"}),O&&!1!==e.isActive&&(0,s.jsx)(b,{until:R}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]})]}),C&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:w,children:w}),S&&(0,s.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:S}),A&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:A,children:["no_proxy: ",A]})]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("div",{className:"flex gap-1",children:[(t||[]).length>0&&(0,s.jsxs)("div",{className:"relative",ref:g,children:[(0,s.jsxs)("button",{onClick:()=>h(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),u&&(0,s.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,s.jsx)("button",{onClick:()=>P("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!j?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,s.jsx)("button",{onClick:()=>P(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${j===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,s.jsxs)("button",{onClick:m,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:x,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,s.jsx)(p.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}function N({isOpen:e,provider:t,providerName:i,isCompatible:l,isAnthropic:r,proxyPools:o,onSave:n,onClose:d}){let c="__none__",[m,x]=(0,a.useState)({name:"",apiKey:"",priority:1,proxyPoolId:c}),[u,h]=(0,a.useState)(!1),[y,f]=(0,a.useState)(null),[g,v]=(0,a.useState)(!1),b=async()=>{h(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:m.apiKey})}),i=await e.json();f(i.valid?"success":"failed")}catch{f("failed")}finally{h(!1)}},j=async()=>{if(t&&m.apiKey){v(!0);try{let e=!1;try{h(!0),f(null);let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:m.apiKey})});e=!!(await i.json()).valid,f(e?"success":"failed")}catch{f("failed")}finally{h(!1)}await n({name:m.name,apiKey:m.apiKey,priority:m.priority,proxyPoolId:m.proxyPoolId===c?null:m.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:void 0})}finally{v(!1)}}};return t?(0,s.jsx)(p.aF,{isOpen:e,title:`Add ${i||t} API Key`,onClose:d,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.pd,{label:"Name",value:m.name,onChange:e=>x({...m,name:e.target.value}),placeholder:"Production Key"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.pd,{label:"API Key",type:"password",value:m.apiKey,onChange:e=>x({...m,apiKey:e.target.value}),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:b,disabled:!m.apiKey||u||g,variant:"secondary",children:u?"Checking...":"Check"})})]}),y&&(0,s.jsx)(p.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),l&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:r?`Validation checks ${i||"Anthropic Compatible"} by verifying the API key.`:`Validation checks ${i||"OpenAI Compatible"} via /models on your base URL.`}),(0,s.jsx)(p.pd,{label:"Priority",type:"number",value:m.priority,onChange:e=>x({...m,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsx)(p.l6,{label:"Proxy Pool",value:m.proxyPoolId,onChange:e=>x({...m,proxyPoolId:e.target.value}),options:[{value:c,label:"None"},...(o||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(o||[]).length&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:j,fullWidth:!0,disabled:!m.name||!m.apiKey||g,children:g?"Saving...":"Save"}),(0,s.jsx)(p.$n,{onClick:d,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function k({isOpen:e,connection:t,proxyPools:i,onSave:l,onClose:r}){let[o,n]=(0,a.useState)({name:"",priority:1,apiKey:""}),[d,c]=(0,a.useState)(!1),[x,u]=(0,a.useState)(null),[h,y]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),[v,b]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t&&(n({name:t.name||"",priority:t.priority||1,apiKey:""}),u(null),g(null))},[t]);let j=async()=>{if(t?.provider){c(!0),u(null);try{let e=await fetch(`/api/providers/${t.id}/test`,{method:"POST"}),i=await e.json();u(i.valid?"success":"failed")}catch{u("failed")}finally{c(!1)}}},N=async()=>{if(t?.provider&&o.apiKey){y(!0),g(null);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:o.apiKey})}),i=await e.json();g(i.valid?"success":"failed")}catch{g("failed")}finally{y(!1)}}},k=async()=>{b(!0);try{let e={name:o.name,priority:o.priority};if(!C&&o.apiKey){e.apiKey=o.apiKey;let i="success"===f;if(!i)try{y(!0),g(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:o.apiKey})});i=!!(await e.json()).valid,g(i?"success":"failed")}catch{g("failed")}finally{y(!1)}i&&(e.testStatus="active",e.lastError=null,e.lastErrorAt=null)}await l(e)}finally{b(!1)}};if(!t)return null;let C="oauth"===t.authType,w=(0,m.mq)(t.provider)||(0,m.gb)(t.provider);return(0,s.jsx)(p.aF,{isOpen:e,title:"Edit Connection",onClose:r,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.pd,{label:"Name",value:o.name,onChange:e=>n({...o,name:e.target.value}),placeholder:C?"Account name":"Production Key"}),C&&t.email&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-3 rounded-lg",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted mb-1",children:"Email"}),(0,s.jsx)("p",{className:"font-medium",children:t.email})]}),(0,s.jsx)(p.pd,{label:"Priority",type:"number",value:o.priority,onChange:e=>n({...o,priority:Number.parseInt(e.target.value)||1})}),!C&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.pd,{label:"API Key",type:"password",value:o.apiKey,onChange:e=>n({...o,apiKey:e.target.value}),placeholder:"Enter new API key",hint:"Leave blank to keep the current API key.",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:N,disabled:!o.apiKey||h||v,variant:"secondary",children:h?"Checking...":"Check"})})]}),f&&(0,s.jsx)(p.Ex,{variant:"success"===f?"success":"error",children:"success"===f?"Valid":"Invalid"})]}),!w&&(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(p.$n,{onClick:j,variant:"secondary",disabled:d,children:d?"Testing...":"Test Connection"}),x&&(0,s.jsx)(p.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Failed"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:k,fullWidth:!0,disabled:v,children:v?"Saving...":"Save"}),(0,s.jsx)(p.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function C({isOpen:e,node:t,onSave:i,onClose:l,isAnthropic:r}){let[o,n]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,c]=(0,a.useState)(!1),[m,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(""),[y,f]=(0,a.useState)(!1),[g,v]=(0,a.useState)(null);(0,a.useEffect)(()=>{t&&n({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let b=async()=>{if(o.name.trim()&&o.prefix.trim()&&o.baseUrl.trim()){c(!0);try{let e={name:o.name,prefix:o.prefix,baseUrl:o.baseUrl};r||(e.apiType=o.apiType),await i(e)}finally{c(!1)}}},j=async()=>{f(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:o.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();v(t.valid?"success":"failed")}catch{v("failed")}finally{f(!1)}};return t?(0,s.jsx)(p.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.pd,{label:"Name",value:o.name,onChange:e=>n({...o,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,s.jsx)(p.pd,{label:"Prefix",value:o.prefix,onChange:e=>n({...o,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,s.jsx)(p.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:o.apiType,onChange:e=>n({...o,apiType:e.target.value})}),(0,s.jsx)(p.pd,{label:"Base URL",value:o.baseUrl,onChange:e=>n({...o,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>x(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:j,disabled:!m||y||!o.baseUrl.trim(),variant:"secondary",children:y?"Checking...":"Check"})})]}),(0,s.jsx)(p.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),g&&(0,s.jsx)(p.Ex,{variant:"success"===g?"success":"error",children:"success"===g?"Valid":"Invalid"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:b,fullWidth:!0,disabled:!o.name.trim()||!o.prefix.trim()||!o.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,s.jsx)(p.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function w({isOpen:e,providerAlias:t,providerDisplayAlias:i,onSave:l,onClose:r}){let[o,n]=(0,a.useState)(""),[d,c]=(0,a.useState)(null),[m,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&(n(""),c(null),x(""))},[e]);let y=async()=>{if(o.trim()){c("testing"),x("");try{let e=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${o.trim()}`})}),i=await e.json();c(i.ok?"ok":"error"),x(i.error||"")}catch(e){c("error"),x(e.message)}}},f=async()=>{if(o.trim()&&!u){h(!0);try{await l(o.trim())}finally{h(!1)}}};return(0,s.jsx)(p.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:o,onChange:e=>{n(e.target.value),c(null),x("")},onKeyDown:e=>{"Enter"===e.key&&y()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,s.jsx)(p.$n,{variant:"secondary",icon:"science",loading:"testing"===d,onClick:y,disabled:!o.trim()||"testing"===d,children:"testing"===d?"Testing...":"Test"})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,s.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:o.trim()||"model-id"})]})]}),"ok"===d&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===d&&(0,s.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,s.jsx)("span",{children:m||"Model not reachable"})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(p.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(p.$n,{onClick:f,fullWidth:!0,size:"sm",disabled:!o.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}y.propTypes={model:r().shape({id:r().string.isRequired}).isRequired,fullModel:r().string.isRequired,alias:r().string,copied:r().string,onCopy:r().func.isRequired,testStatus:r().oneOf(["ok","error"]),isCustom:r().bool,onDeleteAlias:r().func,onTest:r().func,isTesting:r().bool},f.propTypes={providerAlias:r().string.isRequired,modelAliases:r().object.isRequired,copied:r().string,onCopy:r().func.isRequired,onSetAlias:r().func.isRequired,onDeleteAlias:r().func.isRequired},g.propTypes={modelId:r().string.isRequired,fullModel:r().string.isRequired,copied:r().string,onCopy:r().func.isRequired,onDeleteAlias:r().func.isRequired,onTest:r().func,testStatus:r().oneOf(["ok","error"]),isTesting:r().bool},v.propTypes={providerStorageAlias:r().string.isRequired,providerDisplayAlias:r().string.isRequired,modelAliases:r().object.isRequired,copied:r().string,onCopy:r().func.isRequired,onSetAlias:r().func.isRequired,onDeleteAlias:r().func.isRequired,connections:r().arrayOf(r().shape({id:r().string,isActive:r().bool})).isRequired,isAnthropic:r().bool},b.propTypes={until:r().string.isRequired},j.propTypes={connection:r().shape({id:r().string,name:r().string,email:r().string,displayName:r().string,modelLockUntil:r().string,testStatus:r().string,isActive:r().bool,lastError:r().string,priority:r().number,globalPriority:r().number}).isRequired,proxyPools:r().arrayOf(r().shape({id:r().string,name:r().string,proxyUrl:r().string,noProxy:r().string,isActive:r().bool})),isOAuth:r().bool.isRequired,isFirst:r().bool.isRequired,isLast:r().bool.isRequired,onMoveUp:r().func.isRequired,onMoveDown:r().func.isRequired,onToggleActive:r().func.isRequired,onUpdateProxy:r().func,onEdit:r().func.isRequired,onDelete:r().func.isRequired},N.propTypes={isOpen:r().bool.isRequired,provider:r().string,providerName:r().string,isCompatible:r().bool,isAnthropic:r().bool,proxyPools:r().arrayOf(r().shape({id:r().string,name:r().string})),onSave:r().func.isRequired,onClose:r().func.isRequired},k.propTypes={isOpen:r().bool.isRequired,connection:r().shape({id:r().string,name:r().string,email:r().string,priority:r().number,authType:r().string,provider:r().string,providerSpecificData:r().object}),proxyPools:r().arrayOf(r().shape({id:r().string,name:r().string})),onSave:r().func.isRequired,onClose:r().func.isRequired},C.propTypes={isOpen:r().bool.isRequired,node:r().shape({id:r().string,name:r().string,prefix:r().string,apiType:r().string,baseUrl:r().string}),onSave:r().func.isRequired,onClose:r().func.isRequired,isAnthropic:r().bool},w.propTypes={isOpen:r().bool.isRequired,providerAlias:r().string.isRequired,providerDisplayAlias:r().string.isRequired,onSave:r().func.isRequired,onClose:r().func.isRequired}}},e=>{e.O(0,[5370,4335,619,5772,2652,5497,8441,3794,7358],()=>e(e.s=52397)),_N_E=e.O()}]);
|