@rsalmn/extremerouter 0.8.1 → 0.8.2
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-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +2 -1
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/routes-manifest.json +6 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +4 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
- package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/breaker/route.js +1 -0
- package/app/.next-cli-build/server/app/api/breaker/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/breaker/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
- package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +4 -4
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +2 -2
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +6 -6
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +2 -2
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +2 -2
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +7 -7
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +2 -2
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +2 -1
- package/app/.next-cli-build/server/chunks/1051.js +1 -1
- package/app/.next-cli-build/server/chunks/{2342.js → 1194.js} +6 -6
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/1719.js +1 -1
- package/app/.next-cli-build/server/chunks/212.js +1 -1
- package/app/.next-cli-build/server/chunks/2231.js +1 -1
- package/app/.next-cli-build/server/chunks/2701.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/422.js +9 -0
- package/app/.next-cli-build/server/chunks/4502.js +1 -1
- package/app/.next-cli-build/server/chunks/5330.js +1 -1
- package/app/.next-cli-build/server/chunks/541.js +1 -0
- package/app/.next-cli-build/server/chunks/5612.js +1 -1
- package/app/.next-cli-build/server/chunks/5615.js +1 -1
- package/app/.next-cli-build/server/chunks/5628.js +1 -1
- package/app/.next-cli-build/server/chunks/5699.js +1 -1
- package/app/.next-cli-build/server/chunks/5961.js +1 -1
- package/app/.next-cli-build/server/chunks/6070.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6316.js +2 -2
- package/app/.next-cli-build/server/chunks/6686.js +1 -0
- package/app/.next-cli-build/server/chunks/7187.js +1 -1
- package/app/.next-cli-build/server/chunks/7872.js +1 -1
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8271.js +1 -1
- package/app/.next-cli-build/server/chunks/874.js +9 -0
- package/app/.next-cli-build/server/chunks/8895.js +1 -1
- package/app/.next-cli-build/server/chunks/9422.js +2 -2
- package/app/.next-cli-build/server/chunks/9630.js +1 -1
- package/app/.next-cli-build/server/chunks/9703.js +5 -5
- package/app/.next-cli-build/server/chunks/9903.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +4 -4
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/S-pbWChrUiCkwFyfx4Su3/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/{1321-675f131c5a80b166.js → 1321-aa0d45362a7ebc08.js} +1 -1
- package/app/.next-cli-build/static/chunks/5497-b321fb89cc6d6e14.js +7 -0
- package/app/.next-cli-build/static/chunks/8105-204edc780a329497.js +1 -0
- package/app/.next-cli-build/static/chunks/{682-03720d6613bcbd0f.js → 9622-fcd7c93a94eaa38f.js} +6 -6
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-cd77e53dbcd46b6c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-8b043b8296199edb.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-61b6cf127f421af9.js → page-dbf52954681b093c.js} +3 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-ec1dc4e44702257d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-a67cd1c5f77da355.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-dc8e49b1fe778d9c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-2e82495d63f499e9.js +10 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-9a44fa1600f3ff42.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-2592739cbb862828.js → page-2f3b8761d7b32ec0.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-5433f8ac60dd59f0.js → page-bd421513fd2dc28a.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/breaker/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cache/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-ab464cb25617d9dd.js +1 -0
- package/app/.next-cli-build/static/css/68d66160ca549ddc.css +1 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.8.0-to-0.8.1-0.8.1-20260802-152517/data.sqlite +0 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
- package/app/node_modules/@emnapi/runtime/dist/emnapi.cjs.js +1381 -0
- package/app/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.js +1 -0
- package/app/node_modules/@emnapi/runtime/index.js +5 -0
- package/app/node_modules/@emnapi/runtime/package.json +48 -0
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/container.js +106 -51
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/css-syntax-error.js +47 -14
- package/app/node_modules/postcss/lib/fromJSON.js +107 -0
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/input.js +67 -33
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/lazy-result.js +127 -51
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/list.js +1 -0
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/map-generator.js +26 -9
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/no-work-result.js +57 -55
- package/app/node_modules/postcss/lib/node.js +494 -0
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/parser.js +46 -38
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/previous-map.js +34 -12
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/processor.js +7 -7
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/result.js +5 -5
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/root.js +16 -1
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/stringifier.js +140 -32
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/tokenize.js +6 -2
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/warning.js +10 -0
- package/app/node_modules/{next/node_modules/postcss → postcss}/package.json +48 -48
- package/app/package.json +6 -1
- package/app/public/providers/1min-api.svg +15 -0
- package/app/public/providers/1min.svg +15 -0
- package/app/public/providers/cline.svg +17 -0
- package/app/public/providers/clinepass.svg +20 -0
- package/app/public/providers/codestral.svg +16 -0
- package/app/public/providers/databricks.svg +21 -0
- package/app/public/providers/deepinfra.svg +18 -0
- package/app/public/providers/grok-web.svg +14 -0
- package/app/public/providers/marathon.svg +18 -0
- package/app/public/providers/qwen2api.svg +16 -0
- package/app/public/providers/unimodel.svg +26 -0
- package/app/public/providers/venice.svg +15 -0
- package/app/public/providers/vercel-ai-gateway.svg +13 -0
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/23.js +0 -9
- package/app/.next-cli-build/server/chunks/4362.js +0 -9
- package/app/.next-cli-build/server/chunks/5050.js +0 -1
- package/app/.next-cli-build/static/ZpBU8xc4kSeLftltRrIa6/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-2e59e6171ac782ae.js +0 -7
- package/app/.next-cli-build/static/chunks/8105-42ffe16677c2f8f8.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-d722ccf5e0fec340.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-afc62a0533448ca0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-d077213deca8c217.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-99540bfed3193080.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-0a50de81e7b688fc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-eca89af2e4f561e3.js +0 -10
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-bc16a0312f0a7915.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cache/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-dfe796be45352c7b.js +0 -1
- package/app/.next-cli-build/static/css/58f8f5fb2d2ac134.css +0 -1
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.7-to-0.7.8-0.7.8-20260727-004850/data.sqlite +0 -0
- package/app/node_modules/next/node_modules/postcss/lib/fromJSON.js +0 -54
- package/app/node_modules/next/node_modules/postcss/lib/node.js +0 -381
- package/app/.next-cli-build/static/{ZpBU8xc4kSeLftltRrIa6 → S-pbWChrUiCkwFyfx4Su3}/_ssgManifest.js +0 -0
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/at-rule.js +0 -0
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/comment.js +0 -0
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/declaration.js +4 -4
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/document.js +0 -0
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/parse.js +1 -1
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/postcss.js +12 -12
- package/app/node_modules/{next/node_modules/postcss → postcss}/lib/rule.js +6 -6
- /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/stringify.js +0 -0
- /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/symbols.js +0 -0
- /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/terminal-highlight.js +0 -0
- /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/warn-once.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{79595:(e,t,a)=>{Promise.resolve().then(a.bind(a,85309))},85309:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(95155),l=a(12115),r=a(98500),i=a.n(r),o=a(35497),n=a(3534),c=a(28777),d=a(8773);let u=a(41463).env.NEXT_PUBLIC_CLOUD_URL;function x({toolId:e,machineId:t}){let a=n.dM[e],[r,v]=(0,l.useState)([]),[m,h]=(0,l.useState)(!0),[p,b]=(0,l.useState)({}),[f,j]=(0,l.useState)(!1),[E,P]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[_,y]=(0,l.useState)(""),[S,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(t.ok){let e=await t.json();v(e.connections||[])}if(a.ok){let e=await a.json();j(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),k(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),y(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();A(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&h(!1)}})(),()=>{e=!1}},[]);let C=()=>r.filter(e=>!1!==e.isActive),U=(0,l.useCallback)((e,t,a)=>{b(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return a?(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),m?(0,s.jsx)(o.Qv,{}):(()=>{let t,l,r,i=(t=C(),l=[],r=new Set,t.forEach(e=>{let t=c.Xg[e.provider]||e.provider;(0,c.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,o={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:E&&w?w:f&&u?u:window.location.origin,apiKeys:S,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_};switch(e){case"claude":return(0,s.jsx)(d.Tk,{...o,activeProviders:C(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>U(e,t,a),hasActiveProviders:i,cloudEnabled:f});case"codex":return(0,s.jsx)(d.Ah,{...o,activeProviders:C(),cloudEnabled:f});case"opencode":return(0,s.jsx)(d.qO,{...o,activeProviders:C(),cloudEnabled:f});case"cowork":return(0,s.jsx)(d.Q6,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f,cloudUrl:u,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_});case"droid":return(0,s.jsx)(d.ZM,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"openclaw":return(0,s.jsx)(d.yZ,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"hermes":return(0,s.jsx)(d.RF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"copilot":return(0,s.jsx)(d.h1,{...o,activeProviders:C(),cloudEnabled:f});case"cline":return(0,s.jsx)(d.aG,{...o,activeProviders:C(),cloudEnabled:f});case"kilo":return(0,s.jsx)(d.c9,{...o,activeProviders:C(),cloudEnabled:f});case"deepseek-tui":return(0,s.jsx)(d.lF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"jcode":return(0,s.jsx)(d.mW,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});default:return(0,s.jsx)(d.a7,{toolId:e,...o,activeProviders:C(),cloudEnabled:f,tunnelEnabled:E})}})()]}):(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[27,5772,8105,1321,705,5497,682,8441,3794,7358],()=>e(e.s=79595)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{33899:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))},53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var t=l(95155),a=l(12115),r=l(35497),i=l(3534),n=l(8773),c=l(98500),o=l.n(c),d=l(5772);function x({toolId:e,tool:s,status:l}){let a=l?l.installed?l.hasExtremeRouter?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,t.jsx)(o(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.cls}`,children:a.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,a.useState)(!0),[c,o]=(0,a.useState)({});if((0,a.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&o(await s.json())}catch(e){console.log("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{})]});let d=Object.entries(i.dM),g=Object.entries(i.wn);return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,t.jsx)(r.zY,{title:"CLI Tools",description:"Configure developer tools to use ExtremeRouter",icon:"terminal"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3",children:d.map(([e,s])=>(0,t.jsx)(x,{toolId:e,tool:s,status:c[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3",children:g.map(([e,s])=>(0,t.jsx)(n.gY,{tool:s},e))})]})]})}}},e=>{e.O(0,[27,5772,8105,1321,705,5497,682,8441,3794,7358],()=>e(e.s=33899)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-d077213deca8c217.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8192],{31474:(e,t,s)=>{"use strict";function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>r})},37466:(e,t,s)=>{"use strict";s.d(t,{default:()=>o});var r=s(95155),n=s(12115),a=s(56061),i=s(99312),l=s(31474),c=s(88105);function d(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function o(){let[e,t]=(0,n.useState)([]),[s,o]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=new EventSource("/api/health/stream");return e.onopen=()=>o(!0),e.onerror=()=>o(!1),e.onmessage=e=>{try{let s=JSON.parse(e.data);"snapshot"===s.type&&Array.isArray(s.providers)?t(s.providers):s.provider&&t(e=>{let t=e.findIndex(e=>e.provider===s.provider);if(t>=0){let r=[...e];return r[t]=s,r}return[...e,s]})}catch{}},()=>e.close()},[]),(0,r.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:(0,l.cn)("size-2 rounded-full",s?"bg-success animate-pulse":"bg-danger")}),s?"Live":"Reconnecting…"]}),e.length>0&&(0,r.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-success"})," Healthy"]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-warning"})," Degraded"]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-danger"})," Unhealthy"]})]})]}),0===e.length?(0,r.jsx)(i.default,{icon:"monitor_heart",title:"No health data yet",description:"Provider health metrics will appear here once requests flow through the gateway. Send a request to any provider to start collecting samples."}):(0,r.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>{var t;let s,n=function(e,t){if(0===t)return{label:"Unknown",variant:"default",color:"text-text-subtle",bar:"bg-text-subtle"};let s=e??0;return s>=.95?{label:"Healthy",variant:"success",color:"text-success",bar:"bg-success"}:s>=.8?{label:"Degraded",variant:"warning",color:"text-warning",bar:"bg-warning"}:{label:"Unhealthy",variant:"error",color:"text-danger",bar:"bg-danger"}}(e.successRate,e.total),i=null!=e.successRate?Math.round(100*e.successRate):null;return(0,r.jsxs)("div",{className:"rounded-panel border border-border-subtle bg-panel p-4 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,r.jsx)("h3",{className:"truncate font-mono text-sm font-semibold text-text-main",children:(t=e.provider,s=c.Q2[t],s?.name?s.name:t.replace(/-/g," ").replace(/\b\w/g,e=>e.toUpperCase()))}),(0,r.jsx)(a.default,{variant:n.variant,dot:!0,size:"sm",children:n.label})]}),null!=i&&(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs text-text-muted",children:[(0,r.jsx)("span",{children:"Success rate"}),(0,r.jsxs)("span",{className:(0,l.cn)("font-mono font-semibold",n.color),children:[i,"%"]})]}),(0,r.jsx)("div",{className:"h-1.5 overflow-hidden rounded-full bg-surface-2",children:(0,r.jsx)("div",{className:(0,l.cn)("h-full rounded-full transition-all",n.bar),style:{width:`${i}%`}})})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[(0,r.jsxs)("div",{className:"rounded-md bg-surface-2 p-2",children:[(0,r.jsx)("div",{className:"text-text-subtle",children:"Requests"}),(0,r.jsx)("div",{className:"font-mono font-semibold text-text-main",children:e.total})]}),(0,r.jsxs)("div",{className:"rounded-md bg-surface-2 p-2",children:[(0,r.jsx)("div",{className:"text-text-subtle",children:"Failures"}),(0,r.jsx)("div",{className:(0,l.cn)("font-mono font-semibold",e.failures>0?"text-danger":"text-text-main"),children:e.failures})]}),(0,r.jsxs)("div",{className:"rounded-md bg-surface-2 p-2",children:[(0,r.jsx)("div",{className:"text-text-subtle",children:"Avg latency"}),(0,r.jsx)("div",{className:"font-mono font-semibold text-text-main",children:d(e.avgLatencyMs)})]}),(0,r.jsxs)("div",{className:"rounded-md bg-surface-2 p-2",children:[(0,r.jsx)("div",{className:"text-text-subtle",children:"p95 latency"}),(0,r.jsx)("div",{className:"font-mono font-semibold text-text-main",children:d(e.p95LatencyMs)})]})]}),e.lastError&&(0,r.jsxs)("div",{className:"mt-3 flex items-center gap-1.5 text-xs text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px] text-danger",children:"error"}),"Last error: ",(0,r.jsx)("span",{className:"font-mono",children:e.lastError})," \xb7 ",function(e){if(!e)return"—";let t=Date.now()-e;return t<5e3?"just now":t<6e4?`${Math.floor(t/1e3)}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:new Date(e).toLocaleTimeString()}(e.lastErrorAt)]})]},e.provider)})})]})}},54642:e=>{var t;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="//"),(t={}).endianness=function(){return"LE"},t.hostname=function(){return"u">typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"u">typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"},e.exports=t},54960:(e,t,s)=>{"use strict";s.d(t,{default:()=>a});var r=s(95155),n=s(31474);function a({title:e,description:t,icon:s,iconNode:i,actions:l,breadcrumbs:c,className:d}){return(0,r.jsxs)("div",{className:(0,n.cn)("mb-6",d),children:[c?.length>0&&(0,r.jsx)("nav",{className:"mb-2 flex items-center gap-1.5 text-xs text-text-muted",children:c.map((e,t)=>(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[t>0&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px] opacity-60",children:"chevron_right"}),e.href?(0,r.jsx)("a",{href:e.href,className:"transition-colors hover:text-primary",children:e.label}):(0,r.jsx)("span",{className:"font-medium text-text-main",children:e.label})]},t))}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i?(0,r.jsx)("div",{className:"mt-0.5 shrink-0",children:i}):s&&(0,r.jsx)("div",{className:"mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h1",{className:"truncate text-xl font-semibold tracking-tight text-text-main",children:e}),t&&(0,r.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:t})]})]}),l&&(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:l})]})]})}},56061:(e,t,s)=>{"use strict";s.d(t,{default:()=>c});var r=s(95155),n=s(31474);let a={default:"bg-surface-2 text-text-muted ring-1 ring-border-subtle",primary:"bg-primary/12 text-primary ring-1 ring-primary/20",success:"bg-success/12 text-success ring-1 ring-success/20",warning:"bg-warning/12 text-warning ring-1 ring-warning/20",error:"bg-danger/12 text-danger ring-1 ring-danger/20",info:"bg-info/12 text-info ring-1 ring-info/20",cyan:"bg-cyan/12 text-cyan ring-1 ring-cyan/20"},i={default:"bg-text-subtle",primary:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-danger",info:"bg-info",cyan:"bg-cyan"},l={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function c({children:e,variant:t="default",size:s="md",dot:d=!1,icon:o,className:m}){return(0,r.jsxs)("span",{className:(0,n.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold leading-none",a[t],l[s],m),children:[d&&(0,r.jsx)("span",{className:(0,n.cn)("size-1.5 rounded-full",i[t])}),o&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:o}),e]})}},67579:(e,t,s)=>{Promise.resolve().then(s.bind(s,37466)),Promise.resolve().then(s.bind(s,54960))},92542:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),n=s(31474);let a={primary:"bg-primary hover:bg-primary-hover text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset,0_10px_30px_-18px_rgba(139,92,246,0.75)] disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-primary/45",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-danger hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-success hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},i={sm:"h-7 px-3 text-xs rounded-brand",md:"h-9 px-4 text-sm rounded-brand",lg:"h-10 px-5 text-sm rounded-brand"};function l({children:e,variant:t="primary",size:s="md",icon:c,iconRight:d,disabled:o=!1,loading:m=!1,fullWidth:x=!1,className:u,...f}){return(0,r.jsxs)("button",{className:(0,n.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg",a[t],i[s],x&&"w-full",u),disabled:o||m,...f,children:[m?(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[16px]",children:"progress_activity"}):c?(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:c}):null,e,d&&!m&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:d})]})}},99312:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var r=s(95155),n=s(31474),a=s(92542);function i({icon:e="inbox",title:t="No items found",description:s="There's nothing here yet.",action:l,actionText:c,onAction:d,className:o}){return(0,r.jsxs)("div",{className:(0,n.cn)("flex flex-col items-center justify-center rounded-panel border border-dashed border-border p-12 text-center",o),children:[(0,r.jsx)("div",{className:"mb-4 flex size-12 items-center justify-center rounded-full bg-surface-2 text-text-muted ring-1 ring-border-subtle",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:e})}),(0,r.jsx)("h3",{className:"mb-1.5 text-sm font-semibold text-text-main",children:t}),(0,r.jsx)("p",{className:"mb-6 max-w-sm text-xs text-text-muted",children:s}),l||c&&d&&(0,r.jsx)(a.default,{variant:"outline",size:"sm",onClick:d,children:c})]})}}},e=>{e.O(0,[8105,8441,3794,7358],()=>e(e.s=67579)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-99540bfed3193080.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{19924:(e,t,s)=>{Promise.resolve().then(s.bind(s,23879))},23879:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(95155),i=s(12115),n=s(3534),r=s(28777),o=s(88105),l=s(8773),c=s(54960);function d(){let[e,t]=(0,i.useState)([]),[s,d]=(0,i.useState)([]),[u,h]=(0,i.useState)({}),[p,f]=(0,i.useState)(!1),[g,w]=(0,i.useState)(null),[x,y]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{v(),m(),S(),b()},[]);let v=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let s=await e.json();t(s.connections||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let t=await e.json();d(t.keys||[])}}catch{}},S=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();h(t.aliases||{})}}catch{}},b=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let t=await e.json();f(t.cloudEnabled||!1)}}catch{}},j=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsx)(c.default,{title:"MITM Proxy",description:"Intercept selected IDE traffic through the gateway",icon:"security"}),(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-panel border border-warning/30 bg-warning/10 px-3 py-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mt-0.5 shrink-0 text-[16px] text-warning",children:"warning"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-warning",children:"MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(l.tA,{apiKeys:s,cloudEnabled:p,onStatusChange:y}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,t])=>(0,a.jsx)(l.kn,{tool:t,isExpanded:g===e,onToggle:()=>w(g===e?null:e),serverRunning:x.running,dnsActive:x.dnsStatus?.[e]||!1,hasCachedPassword:x.hasCachedPassword||!1,needsSudoPassword:!1!==x.needsSudoPassword,isWin:!0===x.isWin,apiKeys:s,activeProviders:j(),hasActiveProviders:j().some(e=>(0,r.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:u,cloudEnabled:p,onDnsChange:e=>y(t=>({...t,dnsStatus:e.dnsStatus??t.dnsStatus}))},e))})]})}}},e=>{e.O(0,[27,5772,8105,1321,705,5497,682,8441,3794,7358],()=>e(e.s=19924)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1287],{51191:(e,t,s)=>{Promise.resolve().then(s.bind(s,65784))},65784:(e,t,s)=>{"use strict";s.d(t,{default:()=>O});var r=s(95155),a=s(12115),n=s(35497),l=s(14051),o=s.n(l),i=s(57250),c=s(8247),d=s(28777);function m({value:e,onChange:t,models:s,compact:l=!1,modelAliases:o={},activeProviders:u=[]}){let[x,p]=(0,a.useState)(!1),g="string"==typeof e?e:null==e?"":String(e),f=(()=>{if(!g)return null;let e=s?.find(e=>e.id===g);return e?.provider||g.split("/")[0]})(),h=(()=>{if(!g)return"Select a model...";if(o?.[g])return o[g];if(f){let e=(0,d.u0)(f,g);if(e&&e!==g)return e}return g})();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",onClick:()=>p(!0),className:l?"flex h-8 items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2 text-xs text-text-main hover:border-primary/40":"flex h-9 w-full items-center gap-2 rounded-lg border border-border-subtle bg-surface-2 px-3 text-sm text-text-main hover:border-primary/40",title:h,children:[f&&(0,r.jsx)(i.A,{src:(0,c.k)(f),alt:f,size:l?16:18,fallbackText:(f||"?").slice(0,2).toUpperCase()}),(0,r.jsx)("span",{className:`truncate ${e?"font-medium":"text-text-muted"}`,children:h}),(0,r.jsx)("span",{className:"material-symbols-outlined ml-auto text-[16px] text-text-muted",children:"expand_more"})]}),(0,r.jsx)(n.rq,{isOpen:x,onClose:()=>p(!1),onSelect:e=>{t("string"==typeof e?e:e?.value||e?.name||e?.id||""),p(!1)},selectedModel:g,activeProviders:u,title:"Select Model",modelAliases:o})]})}m.propTypes={value:o().string,onChange:o().func.isRequired,models:o().arrayOf(o().shape({id:o().string,provider:o().string})),compact:o().bool,modelAliases:o().object,activeProviders:o().array};var u=s(53593);let x=["low","medium","high","max"];function p({params:e,onChange:t,selectedModel:s=""}){let[n,l]=(0,a.useState)(!0),{getCaps:o}=(0,u.y)(),i=(s,r)=>t({...e,[s]:r}),c=o?.(s),d=!!c?.reasoning,m=!!(e.systemPrompt&&e.systemPrompt.trim());return(0,r.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-panel p-3",children:[(0,r.jsxs)("button",{onClick:()=>l(!n),className:"mb-3 flex w-full items-center justify-between",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"tune"}),"Parameters",m&&(0,r.jsx)("span",{className:"rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"system"})]}),(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${n?"rotate-90":""}`,children:"chevron_right"})]}),n&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"System Prompt"}),(0,r.jsx)("textarea",{value:e.systemPrompt||"",onChange:e=>i("systemPrompt",e.target.value),placeholder:"You are a helpful assistant...",rows:3,className:"custom-scrollbar w-full resize-none rounded-lg border border-border-subtle bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),d&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Thinking Level"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:x.map(t=>{let s=(e.reasoningEffort||"medium")===t;return"max"!==t||c?.thinkingMaxEffort?(0,r.jsx)("button",{onClick:()=>i("reasoningEffort",s?"":t),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${s?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:t},t):null})}),(0,r.jsx)("p",{className:"mt-1 text-[10px] text-text-muted",children:"Reasoning effort. Tap active level to clear."})]}),(0,r.jsx)(g,{label:"Temperature",value:e.temperature??.7,min:0,max:2,step:.05,onChange:e=>i("temperature",e)}),(0,r.jsx)(g,{label:"Top P",value:e.topP??1,min:0,max:1,step:.05,onChange:e=>i("topP",e)}),(0,r.jsx)(g,{label:"Frequency Penalty",value:e.frequencyPenalty??0,min:0,max:2,step:.1,onChange:e=>i("frequencyPenalty",e)}),(0,r.jsx)(g,{label:"Presence Penalty",value:e.presencePenalty??0,min:0,max:2,step:.1,onChange:e=>i("presencePenalty",e)}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Max Tokens"}),(0,r.jsx)("input",{type:"number",min:"1",max:"128000",value:e.maxTokens??4096,onChange:e=>i("maxTokens",parseInt(e.target.value)||4096),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main focus:border-primary focus:outline-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Top K"}),(0,r.jsx)("input",{type:"number",min:"1",max:"1000",placeholder:"unset",value:e.topK??"",onChange:e=>i("topK",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Seed"}),(0,r.jsx)("input",{type:"number",placeholder:"unset",value:e.seed??"",onChange:e=>i("seed",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]})]})]})}function g({label:e,value:t,min:s,max:a,step:n,onChange:l}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,r.jsx)("label",{className:"text-xs font-medium text-text-muted",children:e}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-main",children:Number(t).toFixed(2)})]}),(0,r.jsx)("input",{type:"range",min:s,max:a,step:n,value:t,onChange:e=>l(parseFloat(e.target.value)),className:"w-full accent-primary"})]})}p.propTypes={params:o().shape({systemPrompt:o().string,reasoningEffort:o().string,temperature:o().number,maxTokens:o().number,topP:o().number,frequencyPenalty:o().number,presencePenalty:o().number,topK:o().number,seed:o().number}).isRequired,onChange:o().func.isRequired,selectedModel:o().string},g.propTypes={label:o().string.isRequired,value:o().number.isRequired,min:o().number.isRequired,max:o().number.isRequired,step:o().number.isRequired,onChange:o().func.isRequired};var f=s(62630);function h(e){return null==e?"—":e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function b(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function y({stats:e,mode:t="single"}){var s;if("compare"===t)return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-primary",children:"compare_arrows"}),(0,r.jsxs)("span",{className:"font-medium text-text-main",children:[e.models||0," models compared"]})]}),(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"text-text-muted",children:["Total: ",b(e.compareLatencyMs)]})]});let a=null==(s=function(e){if(!e?.model||!e.inputTokens&&!e.outputTokens)return null;let t=e.model,s=t.indexOf("/"),r=s>0?t.slice(0,s):null,a=s>0?t.slice(s+1):t,n=(0,f.PS)(r,a);if(!n)return null;let l={prompt_tokens:e.inputTokens||0,completion_tokens:e.outputTokens||0,cached_tokens:e.cachedTokens||0,reasoning_tokens:e.reasoningTokens||0};return(0,f.uy)(l,n)}(e))||0===s?null:s<.01?`$${s.toFixed(4)}`:(0,f.BD)(s);return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-success",children:"arrow_upward"}),(0,r.jsx)("span",{className:"text-text-muted",children:"In:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:h(e.inputTokens)})]}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-info",children:"arrow_downward"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Out:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:h(e.outputTokens)})]}),(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"timer"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Latency:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:b(e.latencyMs)})]}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"payments"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Cost:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-warning",children:a})]})]}),e.model&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsx)("span",{className:"font-mono text-text-muted",children:e.model})]})]})}function j({sessions:e,currentSession:t,onNew:s,onLoad:l,onDelete:o}){let[i,c]=(0,a.useState)(""),[,d]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=setInterval(()=>d(e=>e+1),6e4);return()=>clearInterval(e)},[]);let m=(0,a.useMemo)(()=>{let t=i.trim().toLowerCase();return t?e.filter(e=>(e.title||"").toLowerCase().includes(t)):e},[e,i]);return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"History"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"add",onClick:s,title:"New chat"})]}),e.length>0&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"search"}),(0,r.jsx)("input",{value:i,onChange:e=>c(e.target.value),placeholder:"Search...",className:"w-full bg-transparent py-1 text-xs text-text-main placeholder:text-text-muted focus:outline-none"})]}),0===e.length?(0,r.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No saved conversations"}):0===m.length?(0,r.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No matches"}):(0,r.jsx)("div",{className:"custom-scrollbar flex max-h-[70vh] flex-col gap-1 overflow-y-auto",children:m.map(e=>(0,r.jsxs)("div",{className:`group flex items-center gap-2 rounded-lg px-2 py-1.5 transition-colors ${t===e.id?"bg-primary/10":"hover:bg-surface-2"}`,children:[(0,r.jsxs)("button",{onClick:()=>l(e),className:"flex min-w-0 flex-1 flex-col items-start",children:[(0,r.jsx)("span",{className:"w-full truncate text-xs font-medium text-text-main",children:e.title}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:function(e){if(!e)return"";let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);return s<24?`${s}h ago`:new Date(e).toLocaleDateString()}(e.updatedAt||e.createdAt)})]}),(0,r.jsx)("button",{onClick:()=>o(e.id),className:"rounded p-1 text-text-muted opacity-0 hover:text-danger group-hover:opacity-100",title:"Delete",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},e.id))})]})}y.propTypes={stats:o().object,mode:o().string},j.propTypes={sessions:o().array,currentSession:o().string,onNew:o().func.isRequired,onLoad:o().func.isRequired,onDelete:o().func.isRequired};var v=s(9233),N=s(91992);let w=void 0!==window.document,k=!1,C={FORBID_TAGS:["style","form","input","textarea","button","select","svg"],FORBID_ATTR:["style"],ALLOW_UNKNOWN_PROTOCOLS:!1};function S({content:e,role:t,error:s=!1}){let n=!s&&"assistant"===t,l=(0,a.useMemo)(()=>{if(!n||!e)return"";try{var t;let s=v.xI.parse(e);return t="string"==typeof s?s:String(s),"string"==typeof t&&t?w?(!k&&w&&(k=!0,N.A.addHook("afterSanitizeAttributes",e=>{for(let t of("A"===e.tagName&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer")),["src","href","xlink:href","action","formaction"])){let s=e.getAttribute(t);s&&/^\s*data:/i.test(s)&&!/^\s*data:image\/(?:png|jpe?g|gif|webp);/i.test(s)&&e.removeAttribute(t)}})),N.A.sanitize(t,C)):t:""}catch{return""}},[e,n]);return n&&l?(0,r.jsx)("div",{className:"prose-chat whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:l}}):(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e})}function T({messages:e,onSend:t,streaming:s}){let l=(0,a.useRef)(null);return((0,a.useEffect)(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[e]),0===e.length)?(0,r.jsx)("div",{className:"flex min-h-[300px] flex-1 items-center justify-center",children:(0,r.jsx)(n.pp,{icon:"science",title:"Start a conversation",description:"Pick a model above, type a message below, and press Enter. Switch to Compare mode to test multiple models side-by-side."})}):(0,r.jsx)("div",{ref:l,className:"custom-scrollbar flex max-h-[60vh] min-h-[200px] flex-1 flex-col gap-3 overflow-y-auto rounded-brand border border-border-subtle bg-panel p-4",children:e.map(e=>(0,r.jsx)(P,{msg:e},e.id))})}function P({msg:e}){let t="user"===e.role,s=e.error;return(0,r.jsx)("div",{className:`flex ${t?"justify-end":"justify-start"}`,children:(0,r.jsxs)("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${t?"bg-primary text-white":s?"bg-danger/10 text-danger border border-danger/20":"bg-surface-2 text-text-main"}`,children:[e.model&&!t&&(0,r.jsx)("div",{className:"mb-1 text-[10px] font-medium text-text-muted",children:e.model}),e.reasoning&&(0,r.jsxs)("details",{className:"mb-1.5 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap break-words text-xs italic text-text-muted",children:e.reasoning})]}),t&&e.attachments&&e.attachments.length>0&&(0,r.jsx)("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:e.attachments.map(e=>(0,r.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-20 w-20 rounded-lg border border-white/20 object-cover"},e.id))}),(0,r.jsxs)("div",{className:"break-words",children:[(0,r.jsx)(S,{content:e.content,role:e.role,error:s}),e.streaming&&(0,r.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]})]})})}async function _(e,{onChunk:t}={}){if(!e?.body?.getReader)return null;let s=e.body.getReader(),r=new TextDecoder,a="",n=null;for(;;){let{value:e,done:l}=await s.read();if(l)break;let o=(a+=r.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(a=o.pop()||"",o)){let s=e.trim();if(!s.startsWith("data:"))continue;let r=s.slice(5).trim();if(r&&"[DONE]"!==r)try{let e=function(e){let t=e?.choices?.[0],s=t?.delta||{};return{content:"string"==typeof s.content?s.content:null,reasoning:"string"==typeof s.reasoning_content?s.reasoning_content:null,toolCalls:Array.isArray(s.tool_calls)&&s.tool_calls.length>0?s.tool_calls:null,finishReason:t?.finish_reason??null,usage:e?.usage??null}}(JSON.parse(r));e.usage&&(n=e.usage),t?.(e)}catch{}}}return n}v.xI.setOptions({gfm:!0,breaks:!0,async:!1}),S.propTypes={content:o().string,role:o().string,error:o().bool},T.propTypes={messages:o().arrayOf(o().shape({id:o().string,role:o().string,content:o().string,reasoning:o().string,model:o().string,streaming:o().bool,error:o().bool,attachments:o().array})),onSend:o().func,streaming:o().bool};let A="extremerouter.playground.sessions";function R(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function E(e){try{localStorage.setItem(A,JSON.stringify(e))}catch{}}function O(){let[e,t]=(0,a.useState)(!0),[s,l]=(0,a.useState)([]),[o,i]=(0,a.useState)([]),[c,d]=(0,a.useState)({}),[u,x]=(0,a.useState)([]),[g,f]=(0,a.useState)(null),[h,b]=(0,a.useState)([]),[v,N]=(0,a.useState)({}),[w,k]=(0,a.useState)("single"),[C,P]=(0,a.useState)([""]),[O,D]=(0,a.useState)({systemPrompt:"",temperature:.7,maxTokens:4096,topP:1,frequencyPenalty:0,presencePenalty:0,topK:null,seed:null,reasoningEffort:""}),[q,z]=(0,a.useState)({}),M=(0,a.useRef)(null),I=(0,a.useRef)({}),{streamChat:L,abortAll:F,streaming:K}=function({onDelta:e,onComplete:t,onError:s}){let r=(0,a.useRef)({}),[n,l]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=r.current;return()=>{Object.values(e).forEach(e=>e?.abort?.())}},[]);let o=(0,a.useCallback)(async(a,{body:n,apiKey:o})=>{let i=new AbortController;r.current[a]=i,l(e=>e+1);try{let r={"Content-Type":"application/json",Accept:"text/event-stream"};o&&(r.Authorization=`Bearer ${o}`);let l=await fetch("/api/v1/chat/completions",{method:"POST",headers:r,body:JSON.stringify({...n,stream:!0}),signal:i.signal});if(!l.ok){let e=await l.json().catch(()=>({error:{message:`HTTP ${l.status}`}}));s(a,e.error?.message||`HTTP ${l.status}`,l.status);return}let c=await _(l,{onChunk:t=>e(a,t)});t(a,{usage:c,ok:!0})}catch(e){e?.name!=="AbortError"&&s(a,e?.message||"Network error",0)}finally{delete r.current[a],l(e=>Math.max(0,e-1))}},[e,t,s]);return{streamChat:o,abort:(0,a.useCallback)(e=>{r.current[e]?.abort?.()},[]),abortAll:(0,a.useCallback)(()=>{Object.values(r.current).forEach(e=>e?.abort?.())},[]),streaming:n>0}}({onDelta:(0,a.useCallback)((e,t)=>{let s=I.current[e];if(!s)return;let r=(e,t,s)=>s?(e||"")+s:e;"single"===s.mode?b(e=>e.map(e=>e.id!==s.assistantId?e:{...e,content:r(e.content,"content",t.content),reasoning:r(e.reasoning,"reasoning",t.reasoning)})):N(s=>{let a=s[e]||{content:"",reasoning:"",streaming:!0,error:null};return{...s,[e]:{...a,content:r(a.content,"content",t.content),reasoning:r(a.reasoning,"reasoning",t.reasoning)}}})},[]),onComplete:(0,a.useCallback)((e,{usage:t})=>{let s=I.current[e];s&&("single"===s.mode?(b(e=>e.map(e=>e.id===s.assistantId?{...e,streaming:!1}:e)),z({model:s.modelId,inputTokens:t?.prompt_tokens||0,outputTokens:t?.completion_tokens||0,latencyMs:Date.now()-s.startTime})):N(s=>({...s,[e]:{...s[e],streaming:!1,usage:t}})),delete I.current[e])},[]),onError:(0,a.useCallback)((e,t)=>{let s,r=I.current[e];if(!r)return;let a=((s=(s=(s=(s=(s="string"==typeof t?t:String(t??"")).replace(/https?:\/\/[^\s"'<>]+/g,"[url]")).replace(/(Bearer\s+)[A-Za-z0-9._\-]{16,}/gi,"$1[token]")).replace(/(signature=)[A-Za-z0-9%+/=]{16,}/gi,"$1[sig]")).replace(/\{[\s\S]{80,}\}/g,"[provider json]")).length>300&&(s=s.slice(0,297)+"..."),s.trim());"single"===r.mode?b(e=>e.map(e=>e.id===r.assistantId?{...e,content:`❌ Error: ${a}`,streaming:!1,error:!0}:e)):N(t=>({...t,[e]:{...t[e],content:`❌ ${a}`,streaming:!1,error:!0}})),delete I.current[e]},[])});(0,a.useEffect)(()=>{(async()=>{x(function(){try{let e=localStorage.getItem(A);return e?JSON.parse(e):[]}catch{return[]}}());try{let e=await fetch("/api/keys"),t=await e.json(),s=(t.keys||t||[]).find?.(e=>!1!==e.isActive);s?.key&&(M.current=s.key)}catch{}try{let[e,t,s]=await Promise.all([fetch("/api/providers"),fetch("/api/models/alias"),fetch("/api/v1/models")]),r=await e.json();i((r.connections||[]).filter(e=>!1!==e.isActive));let a=await t.json();d(a.aliases||{});let n=((await s.json()).data||[]).map(e=>({id:e.id,name:e.id,provider:e.owned_by||e.id.split("/")[0]}));l(n),n.length>0&&P([n[0].id])}catch{}t(!1)})()},[]);let B=(0,a.useCallback)(()=>{h.length>0&&g&&W(g,h),b([]),f(null),z({}),N({})},[h,g]),H=(0,a.useCallback)(e=>{h.length>0&&g&&W(g,h),b(e.messages||[]),f(e.id),e.model&&P([e.model]),e.params&&D(e.params),z({}),N({})},[h,g]),U=(0,a.useCallback)(e=>{let t=u.filter(t=>t.id!==e);x(t),E(t),g===e&&(f(null),b([]))},[u,g]),W=(0,a.useCallback)((e,t)=>{let s=u.map(s=>s.id===e?{...s,messages:t,updatedAt:Date.now()}:s);x(s),E(s)},[u]),J=(0,a.useCallback)(()=>{if(0===h.length)return;let e=g||R(),t={id:e,title:h.find(e=>"user"===e.role)?.content?.slice(0,40)||"New Chat",messages:h,model:C[0],params:O,createdAt:Date.now(),updatedAt:Date.now()},s=u.find(t=>t.id===e)?u.map(s=>s.id===e?{...s,...t}:s):[t,...u];x(s),E(s),f(e)},[h,g,u,C,O]),Y=(0,a.useCallback)((e,t=[])=>{let s=t.length>0,r={role:"user",content:s?[{type:"text",text:e},...t.map(e=>({type:"image_url",image_url:{url:e.dataUrl}}))]:e,id:R(),displayText:e,displayAttachments:s?t:void 0},a=[...h];O.systemPrompt&&a.unshift({role:"system",content:O.systemPrompt});let n=[...a.slice(-50),r],l={temperature:O.temperature,max_tokens:O.maxTokens,top_p:O.topP};return O.frequencyPenalty&&(l.frequency_penalty=O.frequencyPenalty),O.presencePenalty&&(l.presence_penalty=O.presencePenalty),O.topK&&(l.top_k=O.topK),null!=O.seed&&(l.seed=O.seed),O.reasoningEffort&&(l.reasoning_effort=O.reasoningEffort),{userMsg:r,baseMessages:n,requestParams:l}},[h,O]),Z=(0,a.useCallback)(async(e,t=[])=>{if(!e.trim()&&0===t.length||K)return;let{userMsg:s,baseMessages:r,requestParams:a}=Y(e,t),n=M.current,l=Date.now();if("single"===w){let e=C[0];if(!e)return;let t=R();b([...r.filter(e=>"system"!==e.role).map(e=>"user"===e.role?{...e,content:e.displayText??e.content,attachments:e.displayAttachments}:e),{role:"assistant",content:"",reasoning:"",id:t,model:e,streaming:!0}]),I.current.single={mode:"single",assistantId:t,modelId:e,startTime:l},await L("single",{body:{model:e,messages:r,...a},apiKey:n})}else{let e=C.filter(Boolean);if(0===e.length)return;N({}),e.forEach(e=>{I.current[e]={mode:"compare",modelId:e,startTime:l}}),await Promise.allSettled(e.map(e=>L(e,{body:{model:e,messages:r,...a},apiKey:n}))),z({compareLatencyMs:Date.now()-l,models:e.length})}},[K,w,C,Y,L]),G=(0,a.useCallback)(()=>{F(),b(e=>e.map(e=>e.streaming?{...e,streaming:!1}:e)),N(e=>{let t={};for(let[s,r]of Object.entries(e))t[s]={...r,streaming:!1};return t})},[F]);return e?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science"}),(0,r.jsx)(n.Qv,{})]}):(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,r.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science",actions:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(n.Iz,{options:[{value:"single",label:"Chat"},{value:"compare",label:"Compare"}],value:w,onChange:k,size:"sm"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:K?"stop":"save",onClick:K?G:J,disabled:!K&&0===h.length,children:K?"Stop":"Save"})]})}),(0,r.jsxs)("div",{className:"flex min-w-0 gap-4",children:[(0,r.jsx)("div",{className:"hidden w-56 shrink-0 lg:block",children:(0,r.jsx)(j,{sessions:u,currentSession:g,onNew:B,onLoad:H,onDelete:U})}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:["single"===w?(0,r.jsx)(m,{models:s,value:C[0],onChange:e=>P([e]),activeProviders:o,modelAliases:c}):(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[C.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(m,{models:s,value:e,onChange:e=>{let s=[...C];s[t]=e,P(s)},compact:!0,activeProviders:o,modelAliases:c}),C.length>2&&(0,r.jsx)("button",{onClick:()=>P(C.filter((e,s)=>s!==t)),className:"rounded-lg p-1.5 text-text-muted hover:bg-surface-2 hover:text-danger",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t)),C.length<4&&(0,r.jsxs)("button",{onClick:()=>P([...C,""]),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-3 py-1.5 text-xs text-text-muted hover:border-primary/40 hover:text-primary",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"}),"Add Model"]})]}),"single"===w?(0,r.jsx)(T,{messages:h,onSend:Z,streaming:K,stats:q}):(0,r.jsx)("div",{className:"flex min-w-0 gap-3",children:C.filter(Boolean).map(e=>{let t=v[e];return(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col rounded-brand border border-border-subtle bg-panel",children:[(0,r.jsx)("div",{className:"border-b border-border-subtle px-3 py-2",children:(0,r.jsx)("span",{className:"truncate text-xs font-medium text-text-main",children:e})}),(0,r.jsxs)("div",{className:"custom-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto p-3",children:[t?.reasoning&&(0,r.jsxs)("details",{className:"mb-2 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-xs italic text-text-muted",children:t.reasoning})]}),t?.content?(0,r.jsxs)("div",{className:`text-sm ${t.error?"text-danger":"text-text-main"}`,children:[t.error?(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:t.content}):(0,r.jsx)(S,{content:t.content,role:"assistant"}),t.streaming&&(0,r.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]}):(0,r.jsx)("p",{className:"text-sm text-text-muted",children:K?"Waiting...":"Send a message to compare"})]})]},e)})}),(0,r.jsx)($,{onSend:Z,streaming:K,onStop:G}),Object.keys(q).length>0&&(0,r.jsx)(y,{stats:q,mode:w})]}),(0,r.jsx)("div",{className:"hidden w-60 shrink-0 xl:block",children:(0,r.jsx)(p,{params:O,onChange:D,selectedModel:C[0]})})]})]})}function $({onSend:e,streaming:t,onStop:s}){let[n,l]=(0,a.useState)(""),[o,i]=(0,a.useState)([]),c=(0,a.useRef)(null),d=e=>{if(!e||!e.type.startsWith("image/")||e.size>5242880)return;let t=new FileReader;t.onload=()=>{i(s=>[...s,{id:R(),dataUrl:t.result,name:e.name}])},t.readAsDataURL(e)},m=()=>{(n.trim()||0!==o.length)&&!t&&(e(n,o),l(""),i([]),c.current&&(c.current.style.height="auto"))},u=(n.trim()||o.length>0)&&!t;return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-2",children:[o.length>0&&(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,r.jsxs)("div",{className:"group relative",children:[(0,r.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-16 w-16 rounded-lg border border-border-subtle object-cover"}),(0,r.jsx)("button",{onClick:()=>i(t=>t.filter(t=>t.id!==e.id)),className:"absolute -right-1.5 -top-1.5 flex size-5 items-center justify-center rounded-full bg-danger text-white opacity-0 transition-opacity group-hover:opacity-100",title:"Remove",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.id))}),(0,r.jsxs)("div",{className:"flex items-end gap-2",children:[(0,r.jsx)("textarea",{ref:c,value:n,onChange:e=>{l(e.target.value),e.target.style.height="auto",e.target.style.height=Math.min(e.target.scrollHeight,120)+"px"},onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let s=!1;for(let e of t)e.type.startsWith("image/")&&(s=!0,d(e.getAsFile()));s&&e.preventDefault()},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),m())},placeholder:"Send a message... (Enter to send, Shift+Enter for newline, paste images)",rows:1,className:"custom-scrollbar max-h-[120px] flex-1 resize-none bg-transparent px-2 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:outline-none"}),t?(0,r.jsx)("button",{onClick:s,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-danger/15 text-danger hover:bg-danger/25",title:"Stop",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop"})}):(0,r.jsx)("button",{onClick:m,disabled:!u,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary text-white hover:bg-primary-hover disabled:opacity-40",title:"Send",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"send"})})]})]})}}},e=>{e.O(0,[27,1992,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=51191)),_N_E=e.O()}]);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{26340:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>es});var a=s(95155),l=s(12115),i=s(73321),n=s(35497),r=s(88105),o=s(28777),d=s(11059),c=s(53593),m=s(73006);let x=new Map;async function p(e,t={}){if(!e?.url||!e?.type)return[];let s=t.connectionId?`${e.url}::${t.connectionId}`:e.url,a=x.get(s);if(a&&Date.now()<a.expiresAt)return a.data;try{let a=new URLSearchParams({url:e.url,type:e.type});t.connectionId&&a.set("connectionId",t.connectionId);let l=await fetch(`/api/providers/suggested-models?${a}`);if(!l.ok)return[];let i=(await l.json()).data??[];return x.set(s,{data:i,expiresAt:Date.now()+6e5}),i}catch{return[]}}var u=s(8247),h=s(14051),f=s.n(h);let g=`name1|sk-key1
|
|
2
|
-
name2|sk-key2
|
|
3
|
-
sk-key-only-auto-named`;function b({isOpen:e,provider:t,providerName:s,isCompatible:i,isAnthropic:o,authType:d,authHint:c,website:m,proxyPools:x,error:p,onSave:u,onBulkDone:h,onClose:f}){let y="__none__",v="ollama-local"===t,j="cookie"===d,N="xai"===t&&!j,w="tokenrouter"===t,k=j?"Cookie Value":"API Key",C=j?"grok-web"===t?"sso=xxxxx... or just the raw value":"chatglm-cn"===t?"Paste your full chatglm.cn cookies, or just the chatglm_refresh_token value (eyJhbGc...)":"eyJhbGciOi...":N?"xai-...":"",S="azure"===t,A="cloudflare-ai"===t,$=r.Q2?.[t]?.regions||null,T=r.Q2?.[t]?.defaultRegion||$?.[0]?.id||"",[E,I]=(0,l.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:y,ollamaHostUrl:""}),[P,O]=(0,l.useState)(""),[z,M]=(0,l.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[D,_]=(0,l.useState)({accountId:""}),[R,U]=(0,l.useState)(T),[L,q]=(0,l.useState)(!1),[K,F]=(0,l.useState)(null),[J,B]=(0,l.useState)(!1),[W,G]=(0,l.useState)("single"),[H,Q]=(0,l.useState)(""),[V,Z]=(0,l.useState)(null),X=()=>v&&E.ollamaHostUrl.trim()?{baseUrl:E.ollamaHostUrl.trim()}:S?{azureEndpoint:z.azureEndpoint,apiVersion:z.apiVersion,deployment:z.deployment,organization:z.organization}:A?{accountId:D.accountId}:w&&P.trim()?{mgmtKey:P.trim()}:$&&R?{region:R}:void 0,Y=async()=>{q(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:E.apiKey,providerSpecificData:X()})}),s=await e.json();F(s.valid?"success":"failed")}catch{F("failed")}finally{q(!1)}},ee=async()=>{if(t&&(v||E.apiKey)&&(v||E.name)&&(!i||E.defaultModel.trim())){B(!0);try{let e=!1;try{q(!0),F(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:E.apiKey,providerSpecificData:X()})});e=!!(await s.json()).valid,F(e?"success":"failed")}catch{F("failed")}finally{q(!1)}await u({name:E.name||(v?"Ollama Local":""),apiKey:E.apiKey,defaultModel:i?E.defaultModel.trim():void 0,priority:E.priority,proxyPoolId:E.proxyPoolId===y?null:E.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:X()})}finally{B(!1)}}},et=async()=>{let e=H.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;B(!0),Z(null);let s=0,a=0;for(let l=0;l<e.length;l++){let i=e[l].split("|"),n=i.length>=2?i.slice(1).join("|").trim():i[0].trim(),r=i.length>=2?i[0].trim():"Key",o=`${r} ${l+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:n,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}B(!1),Z({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(n.aF,{isOpen:e,title:`Add ${s||t} ${k}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"single"===W?"primary":"ghost",onClick:()=>{G("single"),Z(null)},children:"Single"}),(0,a.jsx)(n.$n,{size:"sm",variant:"bulk"===W?"primary":"ghost",onClick:()=>{G("bulk"),Z(null)},children:"Bulk Add"})]}),"bulk"===W&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:g,value:H,onChange:e=>Q(e.target.value)}),V&&(0,a.jsxs)("div",{className:`text-sm font-medium ${V.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",V.success," added",V.failed>0?`, ✗ ${V.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.$n,{onClick:et,fullWidth:!0,disabled:J||!H.trim(),children:J?"Adding...":"Add All Keys"}),(0,a.jsx)(n.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===W&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.pd,{label:"Name",value:E.name,onChange:e=>I({...E,name:e.target.value}),placeholder:v?"Ollama Local":"Production Key"}),v&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.pd,{label:"Ollama Host URL",value:E.ollamaHostUrl,onChange:e=>I({...E,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(n.$n,{onClick:Y,disabled:L||J,variant:"secondary",children:L?"Checking...":"Check"})})]}),!v&&(0,a.jsxs)("div",{className:"flex gap-2",children:[j?(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-text-muted",children:k}),(0,a.jsx)("textarea",{value:E.apiKey,onChange:e=>I({...E,apiKey:e.target.value}),placeholder:C,rows:5,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",className:"w-full rounded-lg border border-border bg-input px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary font-mono resize-y"})]}):(0,a.jsx)(n.pd,{label:k,type:"password",value:E.apiKey,onChange:e=>I({...E,apiKey:e.target.value}),placeholder:C,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(n.$n,{onClick:Y,disabled:!E.apiKey||L||J,variant:"secondary",children:L?"Checking...":"Check"})})]}),N&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),j&&c&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[c,m&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),$&&(0,a.jsx)(n.l6,{label:"Region",value:R,onChange:e=>U(e.target.value),options:$.map(e=>({value:e.id,label:e.label}))}),i&&(0,a.jsx)(n.pd,{label:"Default Model",value:E.defaultModel,onChange:e=>I({...E,defaultModel:e.target.value}),placeholder:o?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),v&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),K&&(0,a.jsx)(n.Ex,{variant:"success"===K?"success":"error",children:"success"===K?"Valid":"Invalid"}),p&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:p}),i&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),w&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"TokenRouter Management Key (optional)"}),(0,a.jsx)(n.pd,{label:"Management Key",type:"password",value:P,onChange:e=>O(e.target.value),placeholder:"your_management_key..."}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-2",children:"The management key is separate from the chat API key (sk-...) and is required for Quota Tracker to read your wallet balance. Without it, chat still works but quota tracking is disabled. Get it from the TokenRouter dashboard."})]}),A&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(n.pd,{label:"Account ID",value:D.accountId,onChange:e=>_({...D,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),S&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(n.pd,{label:"Azure Endpoint",value:z.azureEndpoint,onChange:e=>M({...z,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(n.pd,{label:"Deployment Name",value:z.deployment,onChange:e=>M({...z,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(n.pd,{label:"API Version",value:z.apiVersion,onChange:e=>M({...z,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(n.pd,{label:"Organization",value:z.organization,onChange:e=>M({...z,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(n.pd,{label:"Priority",type:"number",value:E.priority,onChange:e=>I({...E,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(n.l6,{label:"Proxy Pool",value:E.proxyPoolId,onChange:e=>I({...E,proxyPoolId:e.target.value}),options:[{value:y,label:"None"},...(x||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(x||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.$n,{onClick:ee,fullWidth:!0,disabled:J||!v&&(!E.name||!E.apiKey)||i&&!E.defaultModel.trim()||S&&(!z.azureEndpoint||!z.deployment||!z.organization)||A&&!D.accountId,children:J?"Saving...":"Save"}),(0,a.jsx)(n.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function y({isOpen:e,node:t,onSave:s,onClose:i,isAnthropic:r}){let[o,d]=(0,l.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,m]=(0,l.useState)(!1),[x,p]=(0,l.useState)(""),[u,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),[b,v]=(0,l.useState)(null);(0,l.useEffect)(()=>{t&&d({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 j=async()=>{if(o.name.trim()&&o.prefix.trim()&&o.baseUrl.trim()){m(!0);try{let e={name:o.name,prefix:o.prefix,baseUrl:o.baseUrl};r||(e.apiType=o.apiType),await s(e)}finally{m(!1)}}},N=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:o.baseUrl,apiKey:x,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();v(t.valid?"success":"failed")}catch{v("failed")}finally{g(!1)}};return t?(0,a.jsx)(n.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:i,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(n.pd,{label:"Name",value:o.name,onChange:e=>d({...o,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(n.pd,{label:"Prefix",value:o.prefix,onChange:e=>d({...o,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(n.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:o.apiType,onChange:e=>d({...o,apiType:e.target.value})}),(0,a.jsx)(n.pd,{label:"Base URL",value:o.baseUrl,onChange:e=>d({...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,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:x,onChange:e=>p(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(n.$n,{onClick:N,disabled:!x||f||!o.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(n.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."}),b&&(0,a.jsx)(n.Ex,{variant:"success"===b?"success":"error",children:"success"===b?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.$n,{onClick:j,fullWidth:!0,disabled:!o.name.trim()||!o.prefix.trim()||!o.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(n.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function v({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:i,onClose:r}){let[o,d]=(0,l.useState)(""),[c,m]=(0,l.useState)(null),[x,p]=(0,l.useState)(""),[u,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&(d(""),m(null),p(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(o.trim());if(e){m("testing"),p("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();m(a.ok?"ok":"error"),p(a.error||"")}catch(e){m("error"),p(e.message)}}},b=async()=>{let e=f(o.trim());if(e&&!u){h(!0);try{await i(e)}finally{h(!1)}}};return(0,a.jsx)(n.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:o,onChange:e=>{d(e.target.value),m(null),p("")},onKeyDown:e=>{"Enter"===e.key&&g()},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,a.jsx)(n.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!o.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(o.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:x||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(n.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(n.$n,{onClick:b,fullWidth:!0,size:"sm",disabled:!o.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}b.propTypes={isOpen:f().bool.isRequired,provider:f().string,providerName:f().string,isCompatible:f().bool,isAnthropic:f().bool,authType:f().string,authHint:f().string,website:f().string,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string})),error:f().string,onSave:f().func.isRequired,onBulkDone:f().func,onClose:f().func.isRequired},y.propTypes={isOpen:f().bool.isRequired,node:f().shape({id:f().string,name:f().string,prefix:f().string,apiType:f().string,baseUrl:f().string}),onSave:f().func.isRequired,onClose:f().func.isRequired,isAnthropic:f().bool},v.propTypes={isOpen:f().bool.isRequired,providerAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,onSave:f().func.isRequired,onClose:f().func.isRequired};let j=`[
|
|
4
|
-
{
|
|
5
|
-
"accessToken": "eyJhbGc...",
|
|
6
|
-
"refreshToken": "rt_...",
|
|
7
|
-
"idToken": "eyJhbGc...",
|
|
8
|
-
"email": "user@example.com"
|
|
9
|
-
}
|
|
10
|
-
]`;function N({isOpen:e,onClose:t,onSuccess:s}){let[i,r]=(0,l.useState)(""),[o,d]=(0,l.useState)(!1),[c,x]=(0,l.useState)(""),[p,u]=(0,l.useState)(null),h=()=>{o||(r(""),x(""),u(null),t())},f=async()=>{var e;let t;x(""),u(null);let a=i.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){x(`${(0,m.Tl)("Invalid JSON")}: ${e.message}`);return}let l=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!l||0===l.length)return void x((0,m.Tl)("No accounts found in input"));d(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:l})}),t=await e.json();if(!e.ok)return void x(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof s&&s()}catch(e){x(e.message||(0,m.Tl)("Request failed"))}finally{d(!1)}},g=p?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(n.aF,{isOpen:e,title:(0,m.Tl)("Bulk Add Codex Accounts"),onClose:h,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,m.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:j,value:i,onChange:e=>r(e.target.value),disabled:o}),c&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),p&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,m.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,m.Tl)("failed")}`:""]}),g.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:g.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.$n,{onClick:f,fullWidth:!0,disabled:o||!i.trim(),children:o?(0,m.Tl)("Importing..."):(0,m.Tl)("Import All")}),(0,a.jsx)(n.$n,{onClick:h,variant:"ghost",fullWidth:!0,disabled:o,children:(0,m.Tl)("Close")})]})]})})}function w({providerId:e,hours:t=24}){let[s,i]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!e)return;let s=!1,a=async()=>{try{let a=await fetch(`/api/providers/${e}/health-timeline?hours=${t}`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();s||i(l.timeline||[])}catch{}};a();let l=setInterval(a,6e4),n=()=>{document.hidden?clearInterval(l):(clearInterval(l),a(),l=setInterval(a,6e4))};return document.addEventListener("visibilitychange",n),()=>{s=!0,clearInterval(l),document.removeEventListener("visibilitychange",n)}},[e,t]),!s)return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-pulse",children:"monitor_heart"}),"Loading health timeline..."]});if(0===s.length||s.every(e=>0===e.ok&&0===e.err))return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"monitor_heart"}),"No request history yet."]});let n=s.length,r=s.reduce((e,t)=>e+t.ok+t.err,0),o=s.reduce((e,t)=>e+t.err,0),d=Math.max(...s.map(e=>e.ok+e.err),1),c=Math.max(...s.map(e=>e.latency),1),m=Math.max(6*n,120),x=Math.max(m/n-1,2),p=s.filter(e=>e.latency>0).map((e,t)=>{let s=t/Math.max(n-1,1)*m,a=32-e.latency/c*19.2-2;return`${s.toFixed(1)},${a.toFixed(1)}`}),u=p.length>1?`M${p.join(" L")}`:"",h=r>0?Math.round((r-o)/r*100):null;return(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Health (24h)"}),null!==h&&(0,a.jsxs)("span",{className:`text-[10px] font-bold ${h>=90?"text-success":h>=70?"text-warning":"text-danger"}`,children:[h,"% success \xb7 ",r," requests \xb7 ",o," errors"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block size-2 rounded-sm bg-success"})," OK"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block size-2 rounded-sm bg-danger"})," Error"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block h-0.5 w-3 bg-info"})," Latency"]})]})]}),(0,a.jsxs)("svg",{width:m,height:32,className:"overflow-visible",children:[s.map((e,t)=>{let s=m/n*t;if(0===e.ok+e.err)return null;let l=e.ok/d*32,i=e.err/d*32;return(0,a.jsxs)("g",{children:[(0,a.jsx)("rect",{x:s,y:32-l-i,width:x,height:i,rx:.5,className:"fill-danger/60"}),(0,a.jsx)("rect",{x:s,y:32-l,width:x,height:l,rx:.5,className:"fill-success/60"})]},t)}),u&&(0,a.jsx)("path",{d:u,fill:"none",strokeWidth:1,className:"stroke-info",strokeDasharray:"2 2"})]})]})}N.propTypes={isOpen:f().bool.isRequired,onClose:f().func.isRequired,onSuccess:f().func};var k=s(67098),C=s(98500),S=s.n(C),A=s(5772);function $({providerInfo:e,providerId:t,connections:s,modelCount:l,headerIconPath:i,headerImgError:n,setHeaderImgError:r}){let o=e.notice?.apiKeyUrl||e.notice?.signupUrl||e.website,d=[e.authModes?e.authModes.includes("oauth")&&e.authModes.includes("apikey")?"OAuth + API Key":"oauth"===e.authModes[0]?"OAuth":"cookie"===e.authModes[0]?"Cookie":"API Key":"oauth"===e.authType?"OAuth":"cookie"===e.authType?"Cookie":"API Key"];s.length>0&&d.push(`${s.length} connection${1===s.length?"":"s"}`),l>0&&d.push(`${l} model${1===l?"":"s"}`);let c=e.color||"#6366f1";return(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(S(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"mt-4 flex min-w-0 items-center gap-4",children:[(0,a.jsx)("div",{className:"flex size-14 shrink-0 items-center justify-center rounded-xl",style:{backgroundColor:`${c}15`},children:n?(0,a.jsx)("span",{className:"text-base font-bold",style:{color:c},children:e.textIcon||e.id?.slice(0,2).toUpperCase()}):(0,a.jsx)(A.default,{src:i,alt:e.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>r(!0)})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight text-text-main",children:e.name}),o&&(0,a.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e.notice?.apiKeyUrl?"Get API Key":"Sign up"]}),"moonshot"===t&&(0,a.jsxs)("a",{href:"https://www.kimi.com/activities/viral-referral/share?scenario=invite&from=share_poster&invitation_code=BPGXZR",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded-full bg-primary/12 px-3 py-1 text-xs font-semibold text-primary ring-1 ring-primary/20 transition-colors hover:bg-primary/20",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"celebration"}),"Get KIMI K3 For Free"]})]}),(0,a.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs text-text-muted",children:d.map((e,t)=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-2",children:[t>0&&(0,a.jsx)("span",{className:"text-text-muted/40",children:"\xb7"}),e]},t))})]})]}),e.deprecated&&(0,a.jsxs)("div",{className:"mt-4 flex items-start gap-2 rounded-lg border border-yellow-500/30 bg-yellow-500/10 px-3 py-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mt-0.5 shrink-0 text-[16px] text-yellow-500",children:"warning"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-red-600 dark:text-yellow-400",children:e.deprecationNotice})]}),e.notice?.text&&!e.deprecated&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-2 rounded-lg border border-info/30 bg-info/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[16px] text-info",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-info",children:e.notice.text}),e.notice.apiKeyUrl&&(0,a.jsx)("a",{href:e.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]})]})}var T=s(31474);function E({title:e,icon:t,count:s,defaultExpanded:i=!0,actions:n=null,children:r,className:o}){let[d,c]=(0,l.useState)(i);return(0,a.jsxs)("div",{className:(0,T.cn)("overflow-hidden rounded-panel border border-border-subtle bg-panel shadow-[var(--shadow-soft)]",o),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 px-4 py-3",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>c(e=>!e),className:"flex min-w-0 items-center gap-2 text-left","aria-expanded":d,children:[t&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted",children:t}),(0,a.jsx)("h2",{className:"truncate text-sm font-semibold text-text-main",children:e}),null!=s&&(0,a.jsx)("span",{className:"shrink-0 rounded-full bg-black/5 px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-text-muted dark:bg-white/10",children:s}),(0,a.jsx)("span",{className:(0,T.cn)("material-symbols-outlined text-[18px] text-text-muted transition-transform",d&&"rotate-180"),children:"expand_more"})]}),n&&(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-1.5",children:n})]}),d&&(0,a.jsx)("div",{className:"border-t border-border-subtle",children:r})]})}var I=s(70217);function P({until:e}){let[t,s]=(0,l.useState)("");return((0,l.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function O({connection:e,proxyPools:t,isOAuth:s,isFirst:i,isLast:r,onMoveUp:o,onMoveDown:d,onToggleActive:c,onUpdateProxy:m,onEdit:x,onDelete:p,oneByOneStatus:u=null,autoPing:h=null}){let[f,g]=(0,l.useState)(!1),[b,y]=(0,l.useState)(!1),v=(0,l.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),N=e.providerSpecificData?.proxyPoolId||null,w=N?j.get(N):null,k=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!N||k,S=w?`Pool: ${w.name}`:N?`Pool: ${N} (inactive/missing)`:k?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A=h?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",$="";if(w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);$=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{$=t}}let T=w?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E="default";w?.isActive===!0?E="success":(N||k)&&(E="error"),(0,l.useEffect)(()=>{if(!f)return;let e=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let z=async e=>{y(!0);try{await m("__none__"===e?null:e)}finally{y(!1),g(!1)}},M=e.authType||(s?"oauth":"apikey"),D="oauth"===M,_="cookie"===M,R=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(D?"OAuth Account":_?"Cookie Account":"API Key"),U=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[L,q]=(0,l.useState)(!1),K=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,l.useEffect)(()=>{let t=()=>{q(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=K?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[K]);let F="unavailable"!==e.testStatus||L?e.testStatus:"active",J=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:o,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:_?"cookie":D?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:R}),U&&(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:U}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(n.Ex,{variant:(0,I.g)(e.isActive,F),size:"sm",dot:!0,children:!1===e.isActive?"disabled":F||"Unknown"}),(0,a.jsx)(n.Ex,{variant:"default",size:"sm",children:D?"OAuth":_?"Cookie":"API Key"}),C&&(0,a.jsx)(n.Ex,{variant:E,size:"sm",children:"Proxy"}),L&&!1!==e.isActive&&(0,a.jsx)(P,{until:K}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),J()&&(0,a.jsx)(n.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:J()})]}),C&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),$&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:$}),T&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:T,children:["no_proxy: ",T]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:v,children:[(0,a.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:b,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:b?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>z("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!N?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>z(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${N===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,a.jsx)(n.m_,{text:A,children:(0,a.jsxs)("button",{onClick:()=>h.onToggle(!h.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,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:p,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(n.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}P.propTypes={until:f().string.isRequired},O.propTypes={connection:f().shape({id:f().string,name:f().string,email:f().string,displayName:f().string,modelLockUntil:f().string,testStatus:f().string,isActive:f().bool,lastError:f().string,priority:f().number,globalPriority:f().number}).isRequired,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string,proxyUrl:f().string,noProxy:f().string,isActive:f().bool})),isOAuth:f().bool.isRequired,isFirst:f().bool.isRequired,isLast:f().bool.isRequired,onMoveUp:f().func.isRequired,onMoveDown:f().func.isRequired,onToggleActive:f().func.isRequired,onUpdateProxy:f().func,onEdit:f().func.isRequired,onDelete:f().func.isRequired,oneByOneStatus:f().shape({state:f().string,error:f().string}),autoPing:f().shape({on:f().bool,onToggle:f().func,provider:f().string})};let z={healthy:{variant:"success",label:"Pool healthy",icon:"shield"},degraded:{variant:"warning",label:"Pool degraded",icon:"warning"},exhausted:{variant:"error",label:"Pool exhausted",icon:"error"}};function M({providerId:e}){let[t,s]=(0,l.useState)(null);if((0,l.useEffect)(()=>{let t;if(!e)return;let a=!1,l=async()=>{try{let t=await fetch(`/api/providers/${e}/vault-pool`,{cache:"no-store"});if(!t.ok)return;let l=await t.json();a||s(l)}catch{}};l();let i=()=>{t||(t=setInterval(l,1e4))},n=()=>{t&&(clearInterval(t),t=null)},r=()=>document.hidden?n():i();return i(),document.addEventListener("visibilitychange",r),()=>{a=!0,n(),document.removeEventListener("visibilitychange",r)}},[e]),!t||!t.hasPool)return null;let i=z[t.status]||z.healthy;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",title:"Admin-provided shared key pool. Keys are hidden; only counts are shown.",children:[(0,a.jsx)(n.Ex,{variant:i.variant,size:"sm",icon:i.icon,children:i.label}),(0,a.jsxs)(n.Ex,{variant:"info",size:"sm",icon:"key",children:[t.total," pool keys"]}),(0,a.jsxs)(n.Ex,{variant:"success",size:"sm",icon:"check_circle",children:[t.available," available"]}),t.rateLimited>0&&(0,a.jsxs)(n.Ex,{variant:"warning",size:"sm",icon:"schedule",children:[t.rateLimited," cooling"]})]})}function D({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,r]=(0,l.useState)(!0);if((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/freebuff-profile`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();t||s(l)}catch{}t||r(!1)})(),()=>{t=!0}},[e]),i)return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!t)return null;let o=t.expires?new Date(t.expires):null,d=o?Math.ceil((o.getTime()-Date.now())/864e5):null,c=null!==d&&d<=3;return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[t.image?(0,a.jsx)("img",{src:t.image,alt:t.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:t.name?.charAt(0)?.toUpperCase()||"F"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:t.name}),t.email&&(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:t.email})]}),o&&(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-muted",children:"schedule"}),(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["Session expires ",o.toLocaleDateString()]}),null!==d&&(0,a.jsxs)(n.Ex,{variant:c?"warning":"success",size:"sm",children:[d,"d left"]})]})]})]})}function _({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,r]=(0,l.useState)(!0);if((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/v0-profile`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();t||s(l)}catch{}t||r(!1)})(),()=>{t=!0}},[e]),i)return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!t?.profile&&!t?.balance)return null;let{profile:o,balance:d}=t;return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[o?.image?(0,a.jsx)("img",{src:o.image,alt:o.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:o?.name?.charAt(0)?.toUpperCase()||"v"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:o?.name||"User"}),o?.email&&(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:o.email})]}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[o?.plan&&(0,a.jsx)(n.Ex,{variant:"v0-free"===o.plan?"default":"primary",size:"sm",children:"v0-free"===o.plan?"Free":o.plan}),o?.teamName&&(0,a.jsx)("span",{className:"truncate text-[11px] text-text-muted",children:o.teamName})]})]}),d&&(0,a.jsxs)("div",{className:"flex shrink-0 flex-col items-end",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"bolt"}),(0,a.jsx)("span",{className:"font-mono text-sm font-bold text-text-main",children:d.remaining}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["/",d.total||"?"]})]}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"credits left"})]})]})}function R({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,r]=(0,l.useState)(!0);return((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/qwencloud-profile`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();t||s(l)}catch{}t||r(!1)})(),()=>{t=!0}},[e]),i)?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):t?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[t.image?(0,a.jsx)("img",{src:t.image,alt:t.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:t.name?.charAt(0)?.toUpperCase()||"Q"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:t.name}),t.email&&(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:t.email})]}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[t.channelId&&(0,a.jsxs)(n.Ex,{variant:"info",size:"sm",children:["Region: ",t.channelId]}),t.uid&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["UID: ",t.uid]})]})]})]}):null}function U({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,r]=(0,l.useState)(!0);return((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/inxora-profile`,{cache:"no-store"});if(a.ok){let e=await a.json();t||s(e)}}catch{}finally{t||r(!1)}})(),()=>{t=!0}},[e]),i)?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):t?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:t.name?.charAt(0)?.toUpperCase()||"I"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:t.name}),t.email&&(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:t.email})]}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[t.plan&&(0,a.jsx)(n.Ex,{variant:"FREE"===t.plan?"default":"primary",size:"sm",children:t.plan}),!1===t.isActive&&(0,a.jsx)(n.Ex,{variant:"danger",size:"sm",children:"Inactive"})]})]})]}):null}function L({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,r]=(0,l.useState)(!0);return((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/onemin-profile`,{cache:"no-store"});if(a.ok){let e=await a.json();t||s(e)}}catch{}finally{t||r(!1)}})(),()=>{t=!0}},[e]),i)?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):t?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"1M"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:"1min.ai"}),t.plan&&(0,a.jsx)(n.Ex,{variant:"primary",size:"sm",children:t.plan})]}),null!=t.credits&&(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Credits: ",Number(t.credits).toLocaleString(void 0,{maximumFractionDigits:2})]})]})]}):null}function q({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,r]=(0,l.useState)(!0);return((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/onemin-api-profile`,{cache:"no-store"});if(a.ok){let e=await a.json();t||s(e)}}catch{}finally{t||r(!1)}})(),()=>{t=!0}},[e]),i)?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):t?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"1M"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:"1min.ai (API)"}),t.plan&&(0,a.jsx)(n.Ex,{variant:"primary",size:"sm",children:t.plan})]}),null!=t.credits&&(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Credits: ",Number(t.credits).toLocaleString(void 0,{maximumFractionDigits:2})]})]})]}):null}function K({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,r]=(0,l.useState)(!0);return((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/agnes-profile`,{cache:"no-store"});if(a.ok){let e=await a.json();t||s(e)}}catch{}finally{t||r(!1)}})(),()=>{t=!0}},[e]),i)?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):t?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"AG"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:"Agnes"}),t.username&&(0,a.jsxs)(n.Ex,{variant:"primary",size:"sm",children:["@",t.username]})]}),null!=t.credits&&(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Credits: ",Number(t.credits).toLocaleString()]})]})]}):null}function F({connectionId:e,cookie:t,currentPlan:s="free",onPlanChanged:i}){let r,[o,d]=(0,l.useState)([]),[c,m]=(0,l.useState)(s),[x,p]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)(!1),[b,y]=(0,l.useState)(null),v=(r=String(t||"").match(/ctoken=([^;]+)/),r?.[1]||"");(0,l.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/providers/zenmux-free/zenmux-plans",{cache:"no-store"});if(!t.ok)return;let s=await t.json();!e&&Array.isArray(s.plans)&&d(s.plans)}catch{}})(),()=>{e=!0}},[]),(0,l.useEffect)(()=>{if(!v)return;let e=!1;return h(!0),(async()=>{try{let t=await fetch("/api/providers/zenmux-free/zenmux-plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ctoken:v})});if(!t.ok)return;let a=await t.json();!e&&a.planKey&&(p(a.planKey),s&&"free"!==s||m(a.planKey))}catch{}finally{e||h(!1)}})(),()=>{e=!0}},[v,s]);let j=async t=>{let a=t.target.value;m(a),g(!0),y(null);try{if(!(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{zenmuxPlan:a}})})).ok)throw Error("Failed to save plan");i?.(a)}catch(e){y(e.message),m(s)}finally{g(!1)}},N=x&&x===c;return 0===o.length?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,a.jsx)("select",{value:c,onChange:j,disabled:!0,className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-muted [-webkit-appearance:none] [-moz-appearance:none]",children:(0,a.jsxs)("option",{value:c,children:[c," (loading…)"]})})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("select",{value:c,onChange:j,disabled:f,title:"Select your ZenMux subscription plan. Models from this plan will be available.",className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 disabled:opacity-50",children:o.map(e=>(0,a.jsxs)("option",{value:e.planKey,children:[e.name," (",e.modelCount," models",e.price>0?`, $${e.price}/mo`:", free",")"]},e.planKey))}),(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),u&&(0,a.jsx)(n.Ex,{variant:"info",size:"sm",children:"Detecting…"}),N&&!u&&(0,a.jsx)(n.Ex,{variant:"success",size:"sm",icon:"check_circle",dot:!0,children:"Auto-detected"}),f&&(0,a.jsx)(n.Ex,{variant:"info",size:"sm",children:"Saving…"}),b&&(0,a.jsx)(n.Ex,{variant:"error",size:"sm",icon:"error",children:b})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:x?`Plan auto-detected from your ctoken: ${x}. You can override manually if needed.`:"Select your ZenMux subscription plan. Models available depend on your plan."})]})}let J=[{key:"now",label:"Now",desc:"Real-time streaming — no waiting",savings:"0%"},{key:"soon",label:"Soon",desc:"Short delay, small discount",savings:"~10%"},{key:"later",label:"Later",desc:"~15 min wait, ~50% cheaper",savings:"~50%"},{key:"anytime",label:"Anytime",desc:"Best-effort, up to 65% cheaper",savings:"up to 65%"}];function B({connectionId:e,currentWindow:t="now",onWindowChanged:s}){let[i,r]=(0,l.useState)(t),[o,d]=(0,l.useState)(!1),[c,m]=(0,l.useState)(null),x=async a=>{let l=a.target.value;r(l),d(!0),m(null);try{if(!(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{completionWindow:l}})})).ok)throw Error("Failed to save window");s?.(l)}catch(e){m(e.message),r(t)}finally{d(!1)}},p=J.find(e=>e.key===i)||J[0],u="now"!==i;return(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Completion Window"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("select",{value:i,onChange:x,disabled:o,title:"Pick a completion window. Longer windows cost less but wait longer.",className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 disabled:opacity-50",children:J.map(e=>(0,a.jsxs)("option",{value:e.key,children:[e.label," (",e.savings," off)"]},e.key))}),(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),u&&(0,a.jsx)(n.Ex,{variant:"info",size:"sm",icon:"schedule",dot:!0,children:"Async"}),o&&(0,a.jsx)(n.Ex,{variant:"info",size:"sm",children:"Saving…"}),c&&(0,a.jsx)(n.Ex,{variant:"error",size:"sm",icon:"error",children:c})]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-muted",children:[p.desc,u&&" — results polled automatically with keep-alive heartbeats."]})]})}var W=s(4823);function G({providerId:e,isOAuth:t,isCompatible:s,isFreeNoAuth:l,hasDualAuthModes:i,oauthConnectionLabel:r,apiKeyConnectionLabel:o,thinkingConfig:d,AUTO_PING_SETTINGS_KEYS:c,connections:x,proxyPools:p,selectedConnectionIds:u,selectedConnections:h,allSelected:f,oneByOneRunning:g,oneByOneStopping:b,oneByOneCurrentConnectionId:y,oneByOneResults:v,oneByOneSummary:j,providerStrategy:N,providerStickyLimit:w,thinkingMode:k,autoPing:C,showBulkProxyModal:S,bulkUpdatingProxy:A,activePools:$,selectedProxySummary:T,handleSwapPriority:E,handleUpdateConnectionStatus:I,handleDelete:P,handleBulkDelete:z,handleRunOneByOneTest:J,handleStopOneByOneTest:H,handleRoundRobinToggle:Q,handleStickyLimitChange:V,handleThinkingModeChange:Z,handleAutoPingConnection:X,triggerOAuthConnection:Y,triggerApiKeyConnection:ee,triggerAddConnection:et,toggleSelectConnection:es,toggleSelectAllConnections:ea,openBulkProxyModal:el,closeBulkProxyModal:ei,applyProxyAssignments:en,handleApplySinglePool:er,handleApplyOneToOne:eo,fetchConnections:ed,setSelectedConnection:ec,setShowEditModal:em,setShowBulkProxyModal:ex,setShowIFlowCookieModal:ep,setShowBulkImportCodex:eu,setConnections:eh}){return l?(0,a.jsx)(W.default,{providerId:e}):(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 border-b border-border-subtle px-4 py-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Connections"}),x.length>0&&(0,a.jsx)("span",{className:"rounded-full bg-black/5 px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-text-muted dark:bg-white/10",children:x.length})]}),(0,a.jsx)(M,{providerId:e}),"freebuff-web"===e&&x.length>0&&(0,a.jsx)(D,{connectionId:x[0].id}),"v0-vercel-web"===e&&x.length>0&&(0,a.jsx)(_,{connectionId:x[0].id}),"qwencloud"===e&&x.length>0&&(0,a.jsx)(R,{connectionId:x[0].id}),"inxorastudio-web"===e&&x.length>0&&(0,a.jsx)(U,{connectionId:x[0].id}),"1min"===e&&x.length>0&&(0,a.jsx)(L,{connectionId:x[0].id}),"1min-api"===e&&x.length>0&&(0,a.jsx)(q,{connectionId:x[0].id}),"agnes-web"===e&&x.length>0&&(0,a.jsx)(K,{connectionId:x[0].id})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[x.length>0&&p.length>0&&(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:el,children:"Apply Proxy"}),x.length>0&&u.length>0&&(0,a.jsxs)(n.$n,{size:"sm",variant:"danger",icon:"delete",onClick:z,children:["Delete (",u.length,")"]}),x.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:g?"progress_activity":"sync",onClick:J,disabled:g,className:g?"animate-pulse":"",children:g?"Testing...":"Test All"}),g&&(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:H,disabled:b,children:b?"Stopping":"Stop"})]}),d&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Thinking"}),(0,a.jsx)("select",{value:k,onChange:e=>Z(e.target.value),className:"h-7 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03]",children:d.options.map(e=>(0,a.jsx)("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Round Robin"}),(0,a.jsx)(n.lM,{checked:"round-robin"===N,onChange:Q}),"round-robin"===N&&(0,a.jsx)("input",{type:"number",min:1,value:w,onChange:e=>V(e.target.value),placeholder:"1",className:"w-12 rounded-lg border border-border bg-black/[0.02] px-1.5 py-0.5 text-xs text-text-primary outline-none dark:border-white/10 dark:bg-white/[0.03]",title:"Sticky limit (requests per account before rotating)"})]}),"zenmux-free"===e&&x.length>0&&(0,a.jsx)(F,{connectionId:x[0].id,cookie:x[0].apiKey||"",currentPlan:x[0].providerSpecificData?.zenmuxPlan||"free",onPlanChanged:ed}),"marathon"===e&&x.length>0&&(0,a.jsx)(B,{connectionId:x[0].id,currentWindow:x[0].providerSpecificData?.completionWindow||"now",onWindowChanged:ed})]})]}),0===x.length?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3 px-4 py-8 text-center",children:[(0,a.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:t?"lock":"key"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"No connections yet"}),i&&(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Choose ",r," or ",o]})]}),(0,a.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:Y,children:r}),(0,a.jsx)(n.$n,{size:"sm",icon:"key",onClick:ee,children:o})]}):(0,a.jsxs)(a.Fragment,{children:[!s&&"iflow"===e&&(0,a.jsx)(n.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>ep(!0),children:"Cookie"}),"codex"===e&&(0,a.jsx)(n.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>eu(!0),children:(0,m.Tl)("Bulk Add")}),(0,a.jsx)(n.$n,{size:"sm",icon:"add",onClick:et,children:s?"Add API Key":"iflow"===e?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)("div",{className:"flex flex-col",children:[j&&(0,a.jsxs)("div",{className:"border-b border-border-subtle px-4 py-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"checklist"}),(0,a.jsxs)("span",{className:"font-medium text-text-main",children:[j.completed,"/",j.total]})]}),j.passed>0&&(0,a.jsxs)("span",{className:"text-success",children:["✓ ",j.passed]}),j.failed>0&&(0,a.jsxs)("span",{className:"text-danger",children:["✗ ",j.failed]}),j.stopped&&(0,a.jsx)("span",{className:"text-warning",children:"Stopped"}),g&&y&&(0,a.jsxs)("span",{className:"truncate text-text-muted",children:["Testing: ",x.find(e=>e.id===y)?.name||y]})]}),j.total>0&&(0,a.jsx)("div",{className:"mt-1.5 h-1 overflow-hidden rounded-full bg-surface-2",children:(0,a.jsx)("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${j.completed/j.total*100}%`}})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle px-4 py-2",children:[(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,a.jsx)("input",{type:"checkbox",checked:f,onChange:ea,className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]}),u.length>0&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:[u.length," selected"]})]}),(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-border-subtle",children:x.map((s,l)=>{let i;return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center pl-2 sm:pl-3",children:(0,a.jsx)("input",{type:"checkbox",checked:(i=s.id,u.includes(i)),onChange:()=>es(s.id),className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,a.jsx)("div",{className:"min-w-0 flex-1",children:(0,a.jsx)(O,{connection:s,proxyPools:p,isOAuth:t,isFirst:0===l,isLast:l===x.length-1,onMoveUp:()=>E(l,l-1),onMoveDown:()=>E(l,l+1),onToggleActive:e=>I(s.id,e),autoPing:c[e]&&"oauth"===s.authType?{on:!0===C.connections[s.id],onToggle:e=>X(s.id,e),provider:e}:null,onUpdateProxy:async e=>{try{(await fetch(`/api/providers/${s.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:e||null})})).ok&&eh(t=>t.map(t=>t.id===s.id?{...t,providerSpecificData:{...t.providerSpecificData,proxyPoolId:e||null}}:t))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ec(s),em(!0)},onDelete:()=>P(s.id),oneByOneStatus:v[s.id]||null})})]},s.id)})}),!s&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-border-subtle px-4 py-3",children:["iflow"===e&&(0,a.jsx)(n.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>ep(!0),children:"Cookie"}),"codex"===e&&(0,a.jsx)(n.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>eu(!0),children:(0,m.Tl)("Bulk Add")}),i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:Y,children:r}),(0,a.jsx)(n.$n,{size:"sm",icon:"key",onClick:ee,children:o})]}):(0,a.jsx)(n.$n,{size:"sm",icon:"add",onClick:et,children:"Add"})]})]}),(0,a.jsx)(n.aF,{isOpen:S,onClose:ei,title:`Apply Proxy (${x.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[T&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:T}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:eo,disabled:A||0===$.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>er(null),disabled:A,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),p.map(e=>(0,a.jsxs)("button",{onClick:()=>er(e.id),disabled:A||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),A&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(n.$n,{onClick:ei,variant:"ghost",fullWidth:!0,disabled:A,children:"Cancel"})]})})]})}let H=[{value:"auto",label:"Auto",hint:"No override"},{value:"none",label:"Off",hint:"Disable thinking"},{value:"minimal",label:"Minimal",hint:"512 tokens"},{value:"low",label:"Low",hint:"1,024 tokens"},{value:"medium",label:"Medium",hint:"8,192 tokens"},{value:"high",label:"High",hint:"24,576 tokens"},{value:"xhigh",label:"X-High",hint:"32,768 tokens"},{value:"max",label:"Max",hint:"128,000 tokens"}];function Q({caps:e,selectedLevel:t,onSelect:s}){let[i,n]=(0,l.useState)(!1),r=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!i)return;let e=e=>{r.current&&!r.current.contains(e.target)&&n(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let o=H.filter(t=>"auto"===t.value||("none"===t.value?e?.thinkingCanDisable!==!1:"max"!==t.value||e?.thinkingMaxEffort===!0)),d=o.find(e=>e.value===t)||o[0];return(0,a.jsxs)("div",{className:"relative",ref:r,children:[(0,a.jsx)("button",{onClick:()=>n(e=>!e),title:`Thinking: ${d.label}${d.hint?` (${d.hint})`:""}`,className:`rounded p-0.5 transition-colors ${"auto"!==t?"text-primary":"text-text-muted hover:bg-sidebar hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"psychology"})}),i&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[140px] rounded-lg border border-border bg-panel shadow-[var(--shadow-warm)]",children:[(0,a.jsx)("div",{className:"px-2 py-1.5 border-b border-border-subtle",children:(0,a.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-text-muted",children:"Thinking Level"})}),o.map(e=>(0,a.jsxs)("button",{onClick:()=>{s(e.value),n(!1)},className:`flex w-full items-center justify-between gap-2 px-2.5 py-1.5 text-xs transition-colors hover:bg-sidebar ${e.value===t?"text-primary font-semibold":"text-text-main"}`,children:[(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:e.hint})]},e.value))]})]})}function V({model:e,fullModel:t,alias:s,copied:i,onCopy:r,testStatus:o,isCustom:d,isFree:c,onDeleteAlias:m,onTest:x,isTesting:p,onDisable:u,caps:h}){let[f,g]=(0,l.useState)("auto"),b="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0,y=!!h?.reasoning,v="auto"!==f&&"none"!==f?`${t}(${f})`:"none"===f?`${t}(none)`:t;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:b?{color:b}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:v}),(0,a.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,a.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,a.jsx)(n.nh,{caps:h,colorOverride:"text-text-muted/70",size:12})]})]}),y&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)(Q,{caps:h,selectedLevel:f,onSelect:g}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:"Thinking"})]}),x&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:x,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:p?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(v,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),d?(0,a.jsx)("button",{onClick:m,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,a.jsx)("button",{onClick:u,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function Z({customModels:e=[],modelAliases:t={},providerAlias:s,builtInModels:a=[],type:l="llm",includeLegacyAliases:i=!0}){let n=new Set(a.map(e=>e.id)),r=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==s)continue;let e=t?.kind||t?.type||"llm";if(l&&e!==l||n.has(t.id))continue;let a=`${s}/${t.id}`;r.has(a)||(r.add(a),o.push({id:t.id,name:t.name||t.id,fullModel:a,source:"custom",type:e}))}if(!i)return o;let d=`${s}/`;for(let[e,s]of Object.entries(t||{})){if("string"!=typeof s||!s.startsWith(d))continue;let t=s.slice(d.length);!t||n.has(t)||r.has(s)||(r.add(s),o.push({id:t,alias:e,fullModel:s,source:"legacyAlias",type:l||"llm"}))}return o}function X({modelId:e,fullModel:t,copied:s,onCopy:l,onDeleteAlias:i,onTest:n,testStatus:r,isTesting:o}){let d="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),n&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:n,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:i,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function Y({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:i,copied:r,onCopy:o,onDeleteAlias:d,onAddCustomModel:c,onDeleteCustomModel:m,connections:x,isAnthropic:p}){let[u,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),[b,y]=(0,l.useState)(!1),[v,j]=(0,l.useState)(null),[N,w]=(0,l.useState)({}),k=async t=>{if(!v){j(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();w(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{w(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=Z({customModels:i,modelAliases:s,providerAlias:e,type:"llm"}),S=async()=>{if(!u.trim()||f)return;let e=u.trim();if(C.some(t=>t.id===e))return void alert("Model already exists for this provider.");g(!0);try{await c(e),h("")}catch(e){console.log("Error adding model:",e)}finally{g(!1)}},A=async()=>{if(b)return;let e=x.find(e=>!1!==e.isActive);if(e){y(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.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 e of a){let t=e.id||e.name||e.model;t&&(C.some(e=>e.id===t)||(await c(t),l+=1))}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{y(!1)}}},$=x.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",p?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:u,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&S(),placeholder:p?"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,a.jsx)(n.$n,{size:"sm",icon:"add",onClick:S,disabled:!u.trim()||f,children:f?"Adding...":"Add"}),(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"download",onClick:A,disabled:!$||b,children:b?"Importing...":"Import from /models"})]}),!$&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({id:s,alias:l,source:i})=>(0,a.jsx)(X,{modelId:s,fullModel:`${t}/${s}`,copied:r,onCopy:o,onDeleteAlias:()=>"custom"===i?m(s):d(l),onTest:x.length>0?()=>k(s):void 0,testStatus:N[s],isTesting:v===s},`${i}-${e}/${s}`))})]})}function ee({providerId:e,isCompatible:t,isAnthropicCompatible:s,isFreeNoAuth:l,providerStorageAlias:i,providerDisplayAlias:r,models:d,kiloFreeModels:c,modelAliases:x,customModels:p,disabledModelIds:u,modelTestResults:h,testingModelIds:f,testingAllModels:g,modelsTestError:b,modelSearchQuery:y,connections:v,suggestedModels:j,importingQoderModels:N,copied:w,getCaps:k,copy:C,handleTestModel:S,handleTestAllModels:A,handleDisableModel:$,handleEnableModel:T,handleDisableAll:E,handleEnableAll:I,handleSetAlias:P,handleDeleteAlias:O,handleAddCustomModel:z,handleDeleteCustomModel:M,handleImportQoderModels:D,setModelSearchQuery:_,setShowAddCustomModel:R}){let U,L,q;if(t)return(0,a.jsx)("div",{className:"px-4 py-3",children:(0,a.jsx)(Y,{providerStorageAlias:i,providerDisplayAlias:r,modelAliases:x,customModels:p,copied:w,onCopy:C,onSetAlias:P,onDeleteAlias:O,onAddCustomModel:e=>z(e,"llm",i),onDeleteCustomModel:e=>M(e,"llm",i),connections:v,isAnthropic:s})});let K=[...d,...c.filter(e=>!d.some(t=>t.id===e.id))].filter(e=>{let t=(0,o.CP)(e);return!t||"llm"===t}),F=new Set(u),J=K.filter(e=>!F.has(e.id)),B=K.filter(e=>F.has(e.id)),W=Z({customModels:p,modelAliases:x,providerAlias:i,builtInModels:d,type:"llm"}),G=y.trim().toLowerCase(),H=(e,t="")=>!G||e.toLowerCase().includes(G)||String(t).toLowerCase().includes(G),Q=J.filter(e=>H(e.id,e.name)),X=W.filter(e=>H(e.id,e.name)),et=K.map(e=>e.id).filter(e=>!u.includes(e)),es=et.filter(e=>!G||e.toLowerCase().includes(G));return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border-subtle px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[u.length>0&&(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:I,children:"Active All"}),et.length>0&&(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>E(et),children:"Disable All"}),(v.length>0||l)&&es.length>0&&(0,a.jsx)(n.$n,{size:"sm",variant:"primary",icon:g?"progress_activity":"play_arrow",onClick:()=>A(es),disabled:g,className:g?"animate-pulse":"",children:g?"Testing...":`Test All (${es.length})`})]}),(0,a.jsx)("div",{className:"sm:w-56",children:(0,a.jsx)(n.pd,{type:"search",placeholder:"Search models...",value:y,onChange:e=>_(e.target.value),className:"w-full"})})]}),(0,a.jsxs)("div",{className:"px-4 py-3",children:[!!b&&(0,a.jsx)("p",{className:"mb-3 break-words text-xs text-danger",children:b}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:[X.map(t=>(0,a.jsx)(V,{model:{id:t.id,name:t.name},fullModel:`${r}/${t.id}`,alias:t.alias,copied:w,onCopy:C,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===t.source?M(t.id,"llm",i):O(t.alias)},testStatus:h[t.id],onTest:v.length>0||l?()=>S(t.id):void 0,isTesting:f.has(t.id),isCustom:!0,isFree:!1,caps:k(`${e}/${t.id}`)},`${t.source}-${t.fullModel}`)),Q.map(t=>{let s=`${i}/${t.id}`,n=`${e}/${t.id}`,o=Object.entries(x).find(([,e])=>e===s||e===n)?.[0];return(0,a.jsx)(V,{model:t,fullModel:`${r}/${t.id}`,alias:o,copied:w,onCopy:C,onSetAlias:e=>P(t.id,e,i),onDeleteAlias:()=>O(o),testStatus:h[t.id],onTest:v.length>0||l?()=>S(t.id):void 0,isTesting:f.has(t.id),isFree:t.isFree,onDisable:()=>$(t.id),caps:k(`${e}/${t.id}`)},t.id)})]}),y.trim()&&0===Q.length&&0===X.length&&(0,a.jsxs)("p",{className:"w-full py-4 text-center text-sm text-text-muted",children:["No models match “",y,"”"]}),(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,a.jsxs)("button",{onClick:()=>R(!0),className:"flex items-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===e&&v.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:D,disabled:N,className:"flex items-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-info transition-colors hover:border-blue-500 hover:bg-blue-500/5 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:N?{animation:"spin 1s linear infinite"}:void 0,children:N?"progress_activity":"download"}),N?(0,m.Tl)("Fetching..."):(0,m.Tl)("Fetch Qoder Models")]})]}),j.length>0&&(U=new Set([...Object.values(x),...W.map(e=>e.fullModel)]),L=new Set(d.map(e=>e.id)),0===(q=j.filter(e=>!U.has(`${i}/${e.id}`)&&!L.has(e.id))).length?null:(0,a.jsxs)("div",{className:"mt-3 w-full",children:[(0,a.jsx)("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-text-muted",children:"Suggested free models"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:q.map(e=>(0,a.jsxs)("button",{onClick:async()=>{await z(e.id,"llm",i)},className:"flex items-center gap-1 rounded-lg border border-border px-2.5 py-1.5 text-xs text-text-muted transition-colors hover:border-primary/40 hover:bg-primary/5 hover:text-primary",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),B.length>0&&(0,a.jsxs)("div",{className:"mt-3 w-full",children:[(0,a.jsxs)("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-text-muted",children:["Disabled (",B.length,")"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:B.map(e=>(0,a.jsxs)("button",{onClick:()=>T(e.id),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-2.5 py-1.5 text-xs text-text-muted transition-colors hover:border-primary/40 hover:bg-primary/5 hover:text-primary",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})]})}V.propTypes={model:f().shape({id:f().string.isRequired}).isRequired,fullModel:f().string.isRequired,alias:f().string,copied:f().string,onCopy:f().func.isRequired,testStatus:f().oneOf(["ok","error"]),isCustom:f().bool,isFree:f().bool,onDeleteAlias:f().func,onTest:f().func,isTesting:f().bool,onDisable:f().func,caps:f().object},Y.propTypes={providerStorageAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,modelAliases:f().object.isRequired,customModels:f().arrayOf(f().object),copied:f().string,onCopy:f().func.isRequired,onDeleteAlias:f().func.isRequired,onAddCustomModel:f().func.isRequired,onDeleteCustomModel:f().func.isRequired,connections:f().arrayOf(f().shape({id:f().string,isActive:f().bool})).isRequired,isAnthropic:f().bool};let et={claude:"claudeAutoPing",codex:"codexAutoPing"};function es(){let e=(0,i.useParams)(),t=(0,i.useRouter)(),s=e.id,{getCaps:x}=(0,c.y)(),{markSeen:h}=(0,k.P)("providers");(0,l.useEffect)(()=>{s&&h(s)},[s,h]);let[f,g]=(0,l.useState)([]),[j,C]=(0,l.useState)(!0),[S,A]=(0,l.useState)(null),[T,I]=(0,l.useState)([]),[P,O]=(0,l.useState)(!1),[z,M]=(0,l.useState)(!1),[D,_]=(0,l.useState)(!1),[R,U]=(0,l.useState)(""),[L,q]=(0,l.useState)(!1),[K,F]=(0,l.useState)(!1),[J,B]=(0,l.useState)(!1),[W,H]=(0,l.useState)(!1),[Q,V]=(0,l.useState)(null),[Z,X]=(0,l.useState)({}),[Y,es]=(0,l.useState)([]),[ea,el]=(0,l.useState)(!1),[ei,en]=(0,l.useState)({}),[er,eo]=(0,l.useState)(""),[ed,ec]=(0,l.useState)(()=>new Set),[em,ex]=(0,l.useState)(""),[ep,eu]=(0,l.useState)(!1),[eh,ef]=(0,l.useState)(!1),[eg,eb]=(0,l.useState)([]),[ey,ev]=(0,l.useState)("__none__"),[ej,eN]=(0,l.useState)(!1),[ew,ek]=(0,l.useState)(null),[eC,eS]=(0,l.useState)(""),[eA,e$]=(0,l.useState)("auto"),[eT,eE]=(0,l.useState)({enabled:!1,connections:{}}),[eI,eP]=(0,l.useState)([]),[eO,ez]=(0,l.useState)([]),[eM,eD]=(0,l.useState)([]),[e_,eR]=(0,l.useState)(null),[eU,eL]=(0,l.useState)(!1),[eq,eK]=(0,l.useState)(!1),[eF,eJ]=(0,l.useState)(!1),[eB,eW]=(0,l.useState)(null),[eG,eH]=(0,l.useState)({}),[eQ,eV]=(0,l.useState)(null),eZ=(0,l.useRef)(!1),[eX,eY]=(0,l.useState)(!1),{copied:e0,copy:e1}=(0,d.C)(),e2="ag_risk_confirmed",e5=["1min","qwen-web"],e3=()=>{O(!0)},e4=()=>{"antigravity"===s&&"true"!==window.localStorage.getItem(e2)?eL(!0):e9||e5.includes(s)?e3():(U(""),_(!0))},e8=()=>{U(""),_(!0)},e6=S?{id:S.id,name:S.name||("anthropic-compatible"===S.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===S.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===S.type?"AC":"OC",apiType:S.apiType,baseUrl:S.baseUrl,type:S.type}:r.zN[s]||r.fg[s]||r.IS[s]||r.nJ[s]||r.br[s],e7=e6?.authModes||[],e9=(!!r.zN[s]||!!r.IS[s]||e7.includes("oauth"))&&e6?.hasOAuth!==!1,te=!!r.fg[s]||e7.includes("apikey")||e6?.hasOAuth===!1,tt=!!r.IS[s]?.noAuth,ts=(0,o.KC)(s),ta=(0,r.wG)(s),tl=(0,r.mq)(s),ti=(0,r.gb)(s),tn=tl||ti,tr=!tn&&e9&&te,to="xai"===s?"Grok Build OAuth":"OAuth",td="xai"===s?"xAI API Key":"API Key",tc=r.Q2[s]?.thinkingConfig||r.s9.extended,tm=tn?s:ta,tx=tn?S?.prefix||s:ta,tp=(0,l.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tm)}`,{cache:"no-store"}),t=await e.json();e.ok&&eD(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tm]),tu=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tm,ids:[e]})})).ok&&await tp()}catch(e){console.log("Error disabling model:",e)}},th=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tm)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tp()}catch(e){console.log("Error enabling model:",e)}},tf=async e=>{e.length&&eR({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eR(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tm,ids:e})})).ok&&await tp()}catch(e){console.log("Error disabling all models:",e)}}})},tg=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tm)}`,{method:"DELETE"})).ok&&await tp()}catch(e){console.log("Error enabling all models:",e)}},tb=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&X(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),ty=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&es(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,l.useEffect)(()=>{"kilocode"===s&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&ez(e.models)}).catch(()=>{})},[s]);let tv=(0,l.useCallback)(async()=>{try{let[e,t,a,l]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),i=await e.json(),n=await t.json(),r=await a.json(),o=l.ok?await l.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===s);g(e)}a.ok&&I(r.proxyPools||[]);let d=(o.providerStrategies||{})[s]||{};ek(d.fallbackStrategy||null),eS(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(o.providerThinking||{})[s]||{};e$(c.mode||"auto");let m=et[s],x=m&&o[m]||{};if(eE({enabled:!0===x.enabled,connections:x.connections||{}}),t.ok){let e=(n.nodes||[]).find(e=>e.id===s)||null;if(!e&&tn)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===s)||null))break}A(e)}}catch(e){console.log("Error fetching connections:",e)}finally{C(!1)}},[s,tn]),tj=async e=>{try{let t=await fetch(`/api/provider-nodes/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(A(a.node),await tv(),B(!1))}catch(e){console.log("Error updating provider node:",e)}},tN=async(e,t)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),l=(a.ok?await a.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let n={...l};0===Object.keys(i).length?delete n[s]:n[s]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("Error saving provider strategy:",e)}},tw=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?a[s]={mode:e}:delete a[s],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:a})})}catch(e){console.log("Error saving thinking config:",e)}},tk=async e=>{let t=et[s];if(t){eE(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,l.useEffect)(()=>{tv(),tb(),ty(),tp()},[tv,tb,ty,tp]),(0,l.useEffect)(()=>{let e=(r.zN[s]||r.fg[s]||r.IS[s]||r.nJ[s]||r.br[s])?.modelsFetcher;if(!e)return void eP([]);let t=!1,a=f.find(e=>!1!==e.isActive);return p(e,{connectionId:a?.id}).then(e=>{t||eP(e)}),()=>{t=!0}},[s,f]);let tC=async(e,t,s=ta)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tb();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tS=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tb()}catch(e){console.log("Error deleting alias:",e)}},tA=async(e,t="llm",s=tm)=>{try{let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:s,id:e,type:t})});if(a.ok)await ty(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await a.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},t$=async(e,t="llm",s=tm)=>{try{let a=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${a}`,{method:"DELETE"})).ok&&(await ty(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tT=async()=>{if(eX)return;let e=f.find(e=>!1!==e.isActive);if(!e)return void alert((0,m.Tl)("Please add an active Qoder connection first"));eY(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,m.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,m.Tl)("No models returned"));let l=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,"");Y.some(e=>e.providerAlias===tm&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(Z).includes(`${tm}/${s}`)||(await tA(s,"llm",tm),l+=1)}0===l?alert((0,m.Tl)("All models already exist, no new models added")):alert((0,m.Tl)("Successfully added")+` ${l} `+(0,m.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,m.Tl)("Error fetching models")+": "+e.message)}finally{eY(!1)}},tE=async()=>{if(eq||0===f.length)return;let e=Object.fromEntries(f.map(e=>[e.id,{state:"queued",error:null}]));eZ.current=!1,eK(!0),eJ(!1),eW(null),eH(e),eV({total:f.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<f.length;e+=1){if(eZ.current){eV({total:f.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=f[e];eW(a.id),eH(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),l=await e.json(),i=!!l.valid;i?t+=1:s+=1,eH(e=>({...e,[a.id]:{state:i?"success":"failed",error:i?null:l.error||null}}))}catch(e){s+=1,eH(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eV({total:f.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<f.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eW(null),eK(!1),eJ(!1),eZ.current=!1}},tI=async e=>{eR({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eR(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&g(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tP=()=>{tv(),O(!1)},tO=async e=>{U("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:s,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok){await tv(),_(!1);return}U(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),U("Failed to save connection")}},tz=async e=>{try{(await fetch(`/api/providers/${Q.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tv(),F(!1))}catch(e){console.log("Error updating connection:",e)}},tM=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&g(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tD=async(e,t)=>{let s=[...f];[s[e],s[t]]=[s[t],s[e]],g(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tv()}},t_=f.filter(e=>eg.includes(e.id)),tR=f.length>0&&eg.length===f.length;(0,l.useEffect)(()=>{eb(e=>e.filter(e=>f.some(t=>t.id===e)))},[f]);let tU=(()=>{if(0===t_.length)return"";let e=new Set(t_.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let s=T.find(e=>e.id===t);return`All selected currently bound to ${s?.name||t}`}return"Selected connections have mixed proxy bindings"})(),tL=async e=>{eN(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tv(),H(!1)}finally{eN(!1)}},tq=T.filter(e=>!0===e.isActive),tK=async e=>{if(!ed.has(e)){ec(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tm}/${e}`})}),s=await t.json();en(t=>({...t,[e]:s.ok?"ok":"error"})),eo(s.ok?"":s.error||"Model not reachable")}catch{en(t=>({...t,[e]:"error"})),eo("Network error")}finally{ec(t=>{let s=new Set(t);return s.delete(e),s})}}},tF=async e=>{ep||0===e.length||(eu(!0),eo(""),await Promise.all(e.map(e=>tK(e))),eu(!1))};if(j)return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(n.Qv,{}),(0,a.jsx)(n.Qv,{})]});if(!e6)return(0,a.jsxs)("div",{className:"py-20 text-center",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(Link,{href:"/dashboard/providers",className:"mt-4 inline-block text-primary",children:"Back to Providers"})]});let tJ=(0,u.k)(e6.id,e6.apiType);return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,a.jsx)($,{providerInfo:e6,providerId:s,connections:f,modelCount:ts.length,headerIconPath:tJ,headerImgError:ea,setHeaderImgError:el}),tn&&S&&(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:ti?"Anthropic Compatible":"OpenAI Compatible"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[ti?"Messages API":"responses"===S.apiType?"Responses API":"Chat Completions"," \xb7 ",(S.baseUrl||"").replace(/\/$/,""),"/",ti?"messages":"responses"===S.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>{U(""),_(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>B(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:()=>{eR({title:"Delete Compatible Node",message:`Delete this ${ti?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eR(null);try{(await fetch(`/api/provider-nodes/${s}`,{method:"DELETE"})).ok&&t.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),(0,a.jsx)(E,{title:"Connections",icon:"cable",count:f.length,defaultExpanded:!0,children:(0,a.jsx)(G,{providerId:s,isOAuth:e9,isCompatible:tn,isFreeNoAuth:tt,hasDualAuthModes:tr,oauthConnectionLabel:to,apiKeyConnectionLabel:td,thinkingConfig:tc,AUTO_PING_SETTINGS_KEYS:et,connections:f,proxyPools:T,selectedConnectionIds:eg,selectedConnections:t_,allSelected:tR,oneByOneRunning:eq,oneByOneStopping:eF,oneByOneCurrentConnectionId:eB,oneByOneResults:eG,oneByOneSummary:eQ,providerStrategy:ew,providerStickyLimit:eC,thinkingMode:eA,autoPing:eT,showBulkProxyModal:W,bulkUpdatingProxy:ej,activePools:tq,selectedProxySummary:tU,handleSwapPriority:tD,handleUpdateConnectionStatus:tM,handleDelete:tI,handleBulkDelete:()=>{let e=eg.length;0!==e&&eR({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eR(null);let e=0,t=[...eg];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}g(e=>e.filter(e=>!t.includes(e.id))),eb([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},handleRunOneByOneTest:tE,handleStopOneByOneTest:()=>{eq&&(eZ.current=!0,eJ(!0))},handleRoundRobinToggle:e=>{let t=e?"round-robin":null,s=e?eC||"1":eC;e&&!eC&&eS("1"),ek(t),tN(t,s)},handleStickyLimitChange:e=>{eS(e),tN("round-robin",e)},handleThinkingModeChange:e=>{e$(e),tw(e)},handleAutoPingConnection:(e,t)=>{tk({...eT,connections:{...eT.connections,[e]:t}})},triggerOAuthConnection:e4,triggerApiKeyConnection:e8,triggerAddConnection:()=>{e9||e5.includes(s)?e4():e8()},toggleSelectConnection:e=>{eb(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},toggleSelectAllConnections:()=>{tR?eb([]):eb(f.map(e=>e.id))},openBulkProxyModal:()=>{if(0===t_.length)return;let e=[...new Set(t_.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"))];ev(1===e.length?e[0]:"__none__"),H(!0)},closeBulkProxyModal:()=>{ej||H(!1)},applyProxyAssignments:tL,handleApplySinglePool:e=>tL(f.map(t=>({connectionId:t.id,proxyPoolId:e}))),handleApplyOneToOne:()=>{let e=T.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tL(f.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},fetchConnections:tv,setSelectedConnection:V,setShowEditModal:F,setShowBulkProxyModal:H,setShowIFlowCookieModal:M,setShowBulkImportCodex:q,setConnections:g})}),(0,a.jsx)(E,{title:"Health",icon:"monitoring",defaultExpanded:!1,children:(0,a.jsx)("div",{className:"px-4 py-3",children:(0,a.jsx)(w,{providerId:s})})}),(0,a.jsx)(E,{title:"Models",icon:"apps",count:ts.length,defaultExpanded:!0,children:(0,a.jsx)(ee,{providerId:s,isCompatible:tn,isAnthropicCompatible:ti,isFreeNoAuth:tt,providerStorageAlias:tm,providerDisplayAlias:tx,models:ts,kiloFreeModels:eO,modelAliases:Z,customModels:Y,disabledModelIds:eM,modelTestResults:ei,testingModelIds:ed,testingAllModels:ep,modelsTestError:er,modelSearchQuery:em,connections:f,suggestedModels:eI,importingQoderModels:eX,copied:e0,getCaps:x,copy:e1,handleTestModel:tK,handleTestAllModels:tF,handleDisableModel:tu,handleEnableModel:th,handleDisableAll:tf,handleEnableAll:tg,handleSetAlias:tC,handleDeleteAlias:tS,handleAddCustomModel:tA,handleDeleteCustomModel:t$,handleImportQoderModels:tT,setModelSearchQuery:ex,setShowAddCustomModel:ef})}),"kiro"===s?(0,a.jsx)(n.Mh,{isOpen:P,providerInfo:e6,onSuccess:tP,onClose:()=>O(!1)}):"cursor"===s?(0,a.jsx)(n.G9,{isOpen:P,onSuccess:tP,onClose:()=>O(!1)}):"1min"===s?(0,a.jsx)(n.CG,{isOpen:P,onSuccess:tP,onClose:()=>O(!1)}):"qwen-web"===s?(0,a.jsx)(n.F8,{isOpen:P,onSuccess:tP,onClose:()=>O(!1)}):"wp-studio"===s?(0,a.jsx)(n.V1,{isOpen:P,onSuccess:tP,onClose:()=>O(!1)}):"zed"===s?(0,a.jsx)(n.TE,{isOpen:P,onSuccess:tP,onClose:()=>O(!1)}):"gitlab"===s?(0,a.jsx)(n.vj,{isOpen:P,providerInfo:e6,onSuccess:tP,onClose:()=>O(!1)}):(0,a.jsx)(n.LF,{isOpen:P,provider:s,providerInfo:e6,onSuccess:tP,onClose:()=>O(!1)}),"iflow"===s&&(0,a.jsx)(n.vE,{isOpen:z,onSuccess:()=>{tv(),M(!1)},onClose:()=>M(!1)}),(0,a.jsx)(b,{isOpen:D,provider:s,providerName:e6.name,isCompatible:tn,isAnthropic:ti,authType:e6?.authType,authHint:e6?.authHint,website:e6?.website,proxyPools:T,error:R,onSave:tO,onBulkDone:tv,onClose:()=>{U(""),_(!1)}}),(0,a.jsx)(n.wI,{isOpen:K,connection:Q,proxyPools:T,onSave:tz,onClose:()=>F(!1)}),tn&&(0,a.jsx)(y,{isOpen:J,node:S,onSave:tj,onClose:()=>B(!1),isAnthropic:ti}),!tn&&(0,a.jsx)(v,{isOpen:eh,providerAlias:tm,providerDisplayAlias:tx,onSave:async e=>{await tA(e,"llm",tm),ef(!1)},onClose:()=>ef(!1)}),"codex"===s&&(0,a.jsx)(N,{isOpen:L,onClose:()=>q(!1),onSuccess:tv}),(0,a.jsx)(n.uo,{isOpen:eU,onClose:()=>eL(!1),onConfirm:()=>{(window.localStorage.setItem(e2,"true"),eL(!1),e9)?e3():e8()},title:"Risk Notice",message:e6?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(n.uo,{isOpen:!!e_,onClose:()=>eR(null),onConfirm:e_?.onConfirm,title:e_?.title||"Confirm",message:e_?.message,variant:"danger"})]})}},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})},88845:(e,t,s)=>{Promise.resolve().then(s.bind(s,26340))}},e=>{e.O(0,[27,5772,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=88845)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-bc16a0312f0a7915.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{17566:(e,t,r)=>{"use strict";r.d(t,{default:()=>O});var a=r(95155),s=r(12115),i=r(57250),n=r(8247),l=r(70778);let o="quotaCacheData",d="quotaAutoRefresh",c=[10,20,50,100],u=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],x=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function m(e){return e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function h(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function p(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function b(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function g(e,t){return await e(t)}function f(){try{let e=window.localStorage.getItem(o);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function y(e,t){try{let r=f();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(o,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}function v(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function j({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:i=!1}){let[n,l]=(0,s.useState)(1),o=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):v(e?.used,e?.total)})),[e]),d=(0,s.useMemo)(()=>"remaining-asc"===r?[...o].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...o].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):o,[o,r]),c=Math.max(1,Math.ceil(d.length/10));if((0,s.useEffect)(()=>{l(1)},[r,e]),(0,s.useEffect)(()=>{l(e=>Math.min(e,c))},[c]),!e||0===e.length)return null;let u=d.slice((n-1)*10,10*n),x=0===d.length?0:(n-1)*10+1,m=Math.min(10*n,d.length),h=t?"py-1 px-1.5":"py-2 px-3",p=t?"text-[11px]":"text-sm",b=t?"text-[11px]":"text-sm",g=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[d.length," quota",d.length>1?"s":""]}),i&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:u.map(e=>{var r;let s=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},i=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let s=Math.ceil(a/6e4);if(s<60)return`${s}m`;let i=Math.floor(s/60),n=s%60;if(i<24)return`${i}h ${n}m`;let l=Math.floor(i/24);return`${l}d ${i%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),n=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let i="";i=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${i}, ${n}`}catch{return null}}(e.resetAt),l=!1!==e.recurring?`in ${i}`:`expires in ${i}`;return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${h} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,a.jsx)("span",{className:`${p} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${h} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${s.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]}),(0,a.jsxs)("span",{className:`font-medium ${s.text}`,children:[e.remaining,"%"]})]})]})}),(0,a.jsx)("td",{className:`${h} w-[25%]`,children:"-"!==i||n?t?(0,a.jsx)("div",{className:`${b} text-text-primary font-medium truncate`,title:n||"",children:"-"!==i?l:n}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==i&&(0,a.jsx)("div",{className:`${b} text-text-primary font-medium`,children:l}),n&&(0,a.jsx)("div",{className:`${g} text-text-muted`,children:n})]}):(0,a.jsx)("div",{className:`${b} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),c>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",x,"-",m," of ",d.length]}),(0,a.jsxs)("span",{children:["Page ",n," / ",c]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>l(e=>Math.max(1,e-1)),disabled:1===n,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>l(e=>Math.min(c,e+1)),disabled:n===c,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var w=r(98542),N=r(97677),k=r(54960),C=r(84588),S=r(35497),A=r(88105),$=r(11059);let P={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},q={claude:"claudeAutoPing",codex:"codexAutoPing"},E={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota."};function D(e){return e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null}function T(e){let t=e.providerSpecificData?.region;if(t)return t;let r=e.providerSpecificData?.profileArn;return("string"==typeof r?r.split(":")[3]:"")||""}function M(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}function O(){let{copied:e,copy:t}=(0,$.C)(),[r,O]=(0,s.useState)([]),[I,_]=(0,s.useState)({}),[F,L]=(0,s.useState)({}),[z,R]=(0,s.useState)({}),[U,J]=(0,s.useState)(!0),[K,G]=(0,s.useState)({claude:{},codex:{}}),[H,B]=(0,s.useState)(null),[V,W]=(0,s.useState)(!1),[Q,Y]=(0,s.useState)(!1),[X,Z]=(0,s.useState)(60),[ee,et]=(0,s.useState)(!0),[er,ea]=(0,s.useState)(null),[es,ei]=(0,s.useState)(null),[en,el]=(0,s.useState)(null),[eo,ed]=(0,s.useState)(null),[ec,eu]=(0,s.useState)(null),[ex,em]=(0,s.useState)(!1),[eh,ep]=(0,s.useState)(null),[eb,eg]=(0,s.useState)([]),[ef,ey]=(0,s.useState)("all"),[ev,ej]=(0,s.useState)([]),[ew,eN]=(0,s.useState)("all"),[ek,eC]=(0,s.useState)("default"),[eS,eA]=(0,s.useState)(!1),[e$,eP]=(0,s.useState)(!1),[eq,eE]=(0,s.useState)(!1),[eD,eT]=(0,s.useState)(1),[eM,eO]=(0,s.useState)(20),[eI,e_]=(0,s.useState)(String(20)),[eF,eL]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[ez,eR]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eU=(0,s.useRef)(null),eJ=(0,s.useRef)(null),eK=(0,s.useRef)(0),eG=(0,s.useCallback)(async(e=eD)=>{try{var t,r;let a=new URLSearchParams({page:String(e),pageSize:String(eM),accountStatus:ew,sort:"priority"});"all"!==ef&&a.set("provider",ef);let s=await fetch(`/api/providers/client?${a.toString()}`);if(!s.ok)throw Error("Failed to fetch connections");let i=await s.json(),n=i.connections||[],l=(t=i.pagination,t||{page:1,pageSize:eM,total:0,totalPages:1}),o=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(i.totals,n.length);return O(n),ej(i.providerOptions||[]),eL(l),eR(o),eT((r=i.pagination,r?.page||e)),n}catch(e){return console.error("Error fetching connections:",e),O([]),ej([]),eL({page:1,pageSize:eM,total:0,totalPages:1}),eR({eligibleConnections:0,providerFilteredConnections:0}),[]}},[ew,eS,eD,eM,ef]),eH=(0,s.useCallback)(async(e,t)=>{L(t=>({...t,[e]:!0})),R(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}`);if(!r.ok){let a=(await r.json().catch(()=>({}))).error||r.statusText;if(404===r.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===r.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a);let r={quotas:[],message:a};_(t=>({...t,[e]:r})),y(e,r);return}throw Error(`HTTP ${r.status}: ${a}`)}let a=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,a);let s=a??{},i={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codebuddy-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,recurring:!1!==t.recurring})});break;case"xai":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!0===t.unlimited})}),0===r.length&&t.plan&&r.push({name:`${t.plan} (subscription)`,used:0,total:0,remainingPercentage:null,resetAt:null,recurring:!1,unlimited:!0});break;case"tokenrouter":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!1})});break;case"cline":case"clinepass":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remainingPercentage,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!0,unlimited:!1})});break;case"infron":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!1})});break;case"grok-web":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!0,unlimited:!1})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,l.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}(t,s),plan:s.plan||null,message:s.message||null,raw:a};_(t=>({...t,[e]:i})),y(e,i)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),R(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{L(t=>({...t,[e]:!1}))}},[]),eB=(0,s.useCallback)(async(e,t)=>{await eH(e,t),B(new Date)},[eH]),eV=(0,s.useCallback)(async(e,t)=>{if("codex"===t&&!en){el(e),R(t=>({...t,[e]:null}));try{let r=await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.message||a.error||a.code||"Failed to reset Codex limit");await eH(e,t),B(new Date)}catch(t){R(r=>({...r,[e]:t.message||"Failed to reset Codex limit"}))}finally{el(null)}}},[eH,en]),eW=(0,s.useCallback)(async e=>{eu({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),eu({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){eu({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),eQ=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){ea(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){_(t=>{let r={...t};return delete r[e],r}),L(t=>{let r={...t};return delete r[e],r}),R(t=>{let r={...t};return delete r[e],r});try{let t=f();t[e]&&(delete t[e],window.localStorage.setItem(o,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await g(eG,eD)}}catch(e){console.error("Error deleting connection:",e)}finally{ea(null)}}},[eG,eD]),eY=(0,s.useCallback)(async(e,t)=>{ei(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(_(e=>({...e})),await g(eG,eD))}catch(e){console.error("Error updating connection status:",e)}finally{ei(null)}},[eG,eD]),eX=(0,s.useCallback)(async e=>{if(!eh?.id)return;let t=eh.id,r=eh.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eG(),em(!1),ep(null),A.wb.includes(r)&&await eH(t,r))}catch(e){console.error("Error saving connection:",e)}},[eh,eG,eH]);(0,s.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&eg(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eZ=(0,s.useCallback)(async(e=!1)=>{if(Q)return;Y(!0),Z(60);let t=eK.current+=1,r=Math.round(3);try{let a=await eG(eD);L(p(a)),R(e=>b(e,a)),_(e=>b(e,a)),await Promise.all(a.filter(a=>e||"claude"!==a.provider||t%r==0).map(e=>eH(e.id,e.provider))),B(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{Y(!1)}},[Q,eG,eH,eD]);(0,s.useEffect)(()=>{(async()=>{et(!0);let e=await eG(eD);et(!1),L(p(e)),R(t=>b(t,e)),_(t=>b(t,e)),await Promise.all(e.map(e=>eH(e.id,e.provider))),B(new Date)})()},[eG,eH,eD]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(d);J(null===e||"true"===e),W(!0)},[]),(0,s.useEffect)(()=>{V&&window.localStorage.setItem(d,String(U))},[U,V]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>G({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}})).catch(()=>{})},[]);let e0=(0,s.useCallback)(async(e,t,r)=>{let a=q[t];if(!a)return;let s={...K[t]||{},[e]:r};G({...K,[t]:s});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[a]||{},connections:s};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:t})})}catch{G(K)}},[K]);(0,s.useEffect)(()=>{if(!V||!U){eU.current&&(clearInterval(eU.current),eU.current=null),eJ.current&&(clearInterval(eJ.current),eJ.current=null);return}return eU.current=setInterval(()=>{eZ()},6e4),eJ.current=setInterval(()=>{Z(e=>e<=1?60:e-1)},1e3),()=>{eU.current&&clearInterval(eU.current),eJ.current&&clearInterval(eJ.current)}},[U,eZ,V]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(eU.current&&(clearInterval(eU.current),eU.current=null),eJ.current&&(clearInterval(eJ.current),eJ.current=null)):U&&V&&(eU.current=setInterval(()=>eZ(),6e4),eJ.current=setInterval(()=>{Z(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[U,eZ,V]);let e1=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=h(e,t),i=h(r,t),n="remaining-asc"===s?a-i:i-a;return 0!==n?n:(m(e)||"").localeCompare(m(r)||"")});if(!r)return e;let i=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=i(e)-i(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(m(e)||"").localeCompare(m(t)||"")})})(r,I,eS,ef,ek),[r,I,eS,ef,ek]),e2=e=>{let t=I[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=v(e.used,e.total))},e5=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eq){eE(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await g(eG,eD)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eE(!1)}}},[eq,eG,eD]),e3="all"===ef?"All providers":ef,e8=ez.eligibleConnections>0,e4=e1.length>0,e6=ez.eligibleConnections?ez.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===ef?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===ew?"turned off":"active"===ew?"active":"matching"} accounts found for ${ef}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},e7=function(e){var t;let{start:r,end:a}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${r}-${a} of ${e.total}`}(eF),e9=!c.includes(eM);return ee||e8?ee||e4?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(k.default,{title:"Quota",description:"Capacity, resets, and account availability",icon:"data_usage"}),(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eP(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":e$,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===ef?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(i.A,{src:(0,n.k)(ef),alt:ef,size:18,className:"size-[18px] rounded object-contain",fallbackText:ef.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:e3})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),e$&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>eP(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-border bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{"all"!==ef&&eT(1),ey("all"),eP(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ef?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ef&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:ev.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{ef!==e&&eT(1),ey(e),eP(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ef===e?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)(i.A,{src:(0,n.k)(e),alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),ef===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:ew,onChange:e=>{let t=e.target.value;ew!==t&&eT(1),eN(t)},className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:u.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===ef&&(0,a.jsx)("select",{value:ek,onChange:e=>eC(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:x.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>eA(e=>!e),"aria-pressed":eS,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${eS?"border-amber-500/40 bg-warning/10 text-warning":"border-border text-text-primary hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{e5(e1.filter(e=>(e.isActive??!0)&&e2(e)).map(e=>e.id),!1)},disabled:eq,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-danger transition-colors hover:bg-danger/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{e5(e1.filter(e=>!(e.isActive??!0)&&!e2(e)).map(e=>e.id),!0)},disabled:eq,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>J(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5",title:U?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${U?"text-primary":"text-text-muted"}`,children:U?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),U&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",X,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eZ(!0),disabled:Q,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${Q?"animate-spin":""}`,children:"refresh"})})]})}),eS&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-warning/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e1.map(r=>{let s,l,o,d=I[r.id],c=F[r.id],u=z[r.id],x=!1===r.isActive,h="codex"===r.provider,p=Number.isFinite(l="number"==typeof(s=d?.raw?.resetCredits?.availableCount)?s:Number(s))?Math.max(0,l):0,b=en===r.id,g=er===r.id||es===r.id||b;return(0,a.jsxs)(C.default,{padding:"none",className:`min-w-0 ${x?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-border",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(i.A,{src:(0,n.k)(r.provider),alt:r.provider,size:32,className:"object-contain",fallbackText:r.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:r.provider}),m(r)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:m(r)}):null,D(r)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:D(r)}):null,"kiro"===r.provider&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,a.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(o=r.providerSpecificData?.authMethod)&&P[o]?P[o]:"api_key"===r.authType?"API Key":"OAuth"}),T(r)&&(0,a.jsx)("span",{className:"rounded-full bg-info/10 px-2 py-0.5 text-[10px] font-semibold text-info",children:T(r)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${x?"bg-surface-2 text-text-muted":"active"===r.testStatus||"success"===r.testStatus?"bg-green-500/10 text-success":"error"===r.testStatus||"expired"===r.testStatus||"unavailable"===r.testStatus?"bg-red-500/10 text-danger":"bg-surface-2 text-text-muted"}`,children:x?"disabled":r.testStatus||"unknown"}),r.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>t(r.providerSpecificData.profileArn,r.id),title:r.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===r.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:r.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N.default,{text:p>0?`Use one Codex reset credit. Available: ${p}`:"No Codex reset credits available",children:(0,a.jsxs)("button",{type:"button",onClick:()=>ed({connection:r,resetCreditCount:p}),disabled:p<=0||c||g,"aria-label":p>0?`Use one Codex reset credit. ${p} available.`:"No Codex reset credits available",className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${p>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-border bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${b?"animate-spin":""}`,children:b?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:p})]})}),(0,a.jsx)(N.default,{text:"View Codex reset credit expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>eW(r),disabled:c||g,"aria-label":"View Codex reset credit expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-muted transition-colors hover:bg-surface-2 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),q[r.provider]&&"oauth"===r.authType&&(0,a.jsx)(N.default,{text:E[r.provider],children:(0,a.jsx)("button",{type:"button",onClick:()=>e0(r.id,r.provider,K[r.provider]?.[r.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:hover:bg-surface-3 ${K[r.provider]?.[r.id]===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)(N.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>eB(r.id,r.provider),disabled:c||g,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${c?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(N.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>{ep(r),em(!0)},disabled:g,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(N.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>eQ(r.id),disabled:g,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-danger/10 text-danger transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${er===r.id?"animate-pulse":""}`,children:"delete"})})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:r.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(w.default,{size:"sm",checked:r.isActive??!0,disabled:g,onChange:e=>eY(r.id,e)})})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:c?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):u?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-danger",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:u})]}):d?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:d.message})}):(0,a.jsx)(j,{quotas:d?.quotas,compact:!0,sortMode:"default",showSortLabel:"codex"===r.provider&&"default"!==ek})})]},r.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:e7}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:e9?"custom":String(eM),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(eT(1),eO(r),e_(String(r)))},className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[c.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:eI,onChange:e=>e_(e.target.value),onBlur:()=>{let e=Number.parseInt(eI,10);if(!Number.isFinite(e))return void e_(String(eM));let t=Math.min(500,Math.max(1,e));eT(1),eO(t),e_(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eI,10);if(!Number.isFinite(t))return void e_(String(eM));let r=Math.min(500,Math.max(1,t));eT(1),eO(r),e_(String(r))},className:"h-8 w-20 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eF.page," / ",eF.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eT(1),disabled:eF.page<=1||ee||Q,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e=>Math.max(1,e-1)),disabled:eF.page<=1||ee||Q,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e=>Math.min(eF.totalPages,e+1)),disabled:eF.page>=eF.totalPages||ee||Q,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(eF.totalPages),disabled:eF.page>=eF.totalPages||ee||Q,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)(S.uo,{isOpen:!!eo,onClose:()=>{en||ed(null)},onConfirm:async()=>{let e=eo?.connection;e&&(await eV(e.id,e.provider),ed(null))},title:"Reset Codex limit?",message:`Use 1 Codex reset credit for ${m(eo?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${eo?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!en}),ec&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-surface dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-border bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-text-primary",children:"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:m(ec.connection)||"Codex account"})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eu(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-surface-2 hover:text-text-primary dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-surface",children:ec.loading?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):ec.error?(0,a.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:ec.error}):ec.data?.credits?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-border bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("span",{children:[ec.data.credits.length," reset credit",1===ec.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[ec.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:ec.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-border-subtle",children:[(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:M(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:M(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:function(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let r=Math.ceil(t/36e5),a=Math.floor(r/24),s=r%24;return a>0?`${a}d ${s}h`:`${s}h`}(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"No reset credit details returned for this account."})})]})}),(0,a.jsx)(S.wI,{isOpen:ex,connection:eh,proxyPools:eb,onSave:eX,onClose:()=>{em(!1),ep(null)}})]}):(0,a.jsx)(C.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:e6.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:e6.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:e6.description})]})}):(0,a.jsx)(C.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}},67471:(e,t,r)=>{Promise.resolve().then(r.bind(r,17566)),Promise.resolve().then(r.bind(r,25086))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=67471)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,449,501,516,543,552,675,684,747,748,907,931,948,992,997,1045,1067,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1726,1750,1860,1898,1907,1910,1946,1949,2121,2198,2248,2284,2296,2536,2772,2785,2797,2845,2919,2922,3025,3038,3079,3351,3397,3472,3549,3562,3568,3673,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4831,4896,4993,5018,5107,5170,5177,5211,5226,5297,5466,5616,5637,5685,5745,5922,6091,6107,6121,6268,6319,6463,6478,6479,6517,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7231,7241,7302,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8095,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8658,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9033,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709,9792,9865,9925],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,449,501,516,543,552,675,684,747,748,907,931,948,992,997,1045,1067,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1726,1750,1860,1898,1907,1910,1946,1949,2121,2198,2248,2284,2296,2536,2772,2785,2797,2845,2919,2922,3025,3038,3079,3351,3397,3472,3549,3562,3568,3673,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4831,4896,4993,5018,5107,5170,5177,5211,5226,5297,5466,5616,5637,5685,5745,5922,6091,6107,6121,6268,6319,6463,6478,6479,6517,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7231,7241,7302,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8095,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8658,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9033,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709,9792,9865,9925],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,449,501,516,543,552,675,684,747,748,907,931,948,992,997,1045,1067,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1726,1750,1860,1898,1907,1910,1946,1949,2121,2198,2248,2284,2296,2536,2772,2785,2797,2845,2919,2922,3025,3038,3079,3351,3397,3472,3549,3562,3568,3673,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4831,4896,4993,5018,5107,5170,5177,5211,5226,5297,5466,5616,5637,5685,5745,5922,6091,6107,6121,6268,6319,6463,6478,6479,6517,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7231,7241,7302,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8095,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8658,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9033,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709,9792,9865,9925],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|