@rsalmn/extremerouter 0.7.6 → 0.7.7
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 +17 -12
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/routes-manifest.json +34 -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 +2 -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 +3 -3
- 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 +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- 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 +5 -5
- 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/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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 -0
- package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/combos/validate-roles/route_client-reference-manifest.js +1 -0
- 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/[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/zed/auto-import/route.js +3 -0
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route_client-reference-manifest.js +1 -0
- 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]/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 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route_client-reference-manifest.js +1 -0
- 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 +2 -2
- 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 +2 -2
- 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 +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- 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 +5 -5
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- 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 +5 -5
- 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 +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- 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 +5 -5
- 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 +17 -12
- 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/1914.js +1 -0
- 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/2722.js +2 -2
- package/app/.next-cli-build/server/chunks/2926.js +75 -0
- package/app/.next-cli-build/server/chunks/318.js +19 -12
- package/app/.next-cli-build/server/chunks/3535.js +1 -1
- package/app/.next-cli-build/server/chunks/4040.js +3 -3
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- 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/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/6182.js +2 -2
- package/app/.next-cli-build/server/chunks/6316.js +2 -2
- package/app/.next-cli-build/server/chunks/7674.js +9 -0
- package/app/.next-cli-build/server/chunks/8084.js +1 -0
- 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/8895.js +5 -5
- package/app/.next-cli-build/server/chunks/9630.js +1 -1
- package/app/.next-cli-build/server/chunks/9703.js +1 -1
- package/app/.next-cli-build/server/chunks/9846.js +9 -0
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +1 -1
- 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/chunks/1321-6a34c5faf11383f6.js +1 -0
- package/app/.next-cli-build/static/chunks/{1636-47ea773ffa2d3a4b.js → 1636-25599a8426fd97ed.js} +1 -1
- package/app/.next-cli-build/static/chunks/5497-ffa6b6463e401ac2.js +7 -0
- package/app/.next-cli-build/static/chunks/{6069-6b96289a846b5144.js → 6069-bd1f2f41043f8c30.js} +10 -10
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-262aee689cd6eb34.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/{page-d75417b0f8c41834.js → page-640703af38ea9eed.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-cd819afe3da4581e.js +10 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-1927a7bec7dfec9e.js → layout-fbd9ba3da73c1af0.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cache/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-200d63272da34918.js +1 -0
- package/app/.next-cli-build/static/css/78539cadb589145c.css +1 -0
- package/app/.next-cli-build/static/jvjk_lCzF7LBW1SV_GCaU/_buildManifest.js +1 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.6-to-0.7.7-0.7.7-20260726-222052/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/package.json +1 -1
- package/app/public/providers/1min.png +0 -0
- package/app/public/providers/alibaba-cn.svg +11 -11
- package/app/public/providers/alibaba.svg +11 -11
- package/app/public/providers/bynara.svg +22 -22
- package/app/public/providers/featherless.svg +8 -8
- package/app/public/providers/forge.svg +9 -9
- package/app/public/providers/freebuff-web.svg +6 -6
- package/app/public/providers/hcnsec.svg +10 -10
- package/app/public/providers/inxorastudio-web.svg +4 -4
- package/app/public/providers/inxorastudio.svg +4 -4
- package/app/public/providers/moonshot.svg +8 -8
- package/app/public/providers/openvecta.svg +7 -7
- package/app/public/providers/perplexity-agent.svg +13 -13
- package/app/public/providers/qwen-cloud.svg +1 -8
- package/app/public/providers/qwencloud.svg +6 -6
- package/app/public/providers/tokenrouter.svg +15 -15
- package/app/public/providers/zed.svg +11 -0
- package/app/public/providers/zenmux-free.svg +9 -9
- package/app/src/lib/network/pickProxyPoolId.js +38 -38
- package/app/src/mitm/server.js +45 -30
- package/package.json +66 -66
- package/app/.next-cli-build/server/chunks/1173.js +0 -75
- package/app/.next-cli-build/server/chunks/4055.js +0 -9
- package/app/.next-cli-build/server/chunks/5217.js +0 -9
- package/app/.next-cli-build/server/chunks/788.js +0 -1
- package/app/.next-cli-build/server/chunks/964.js +0 -1
- package/app/.next-cli-build/static/GZ-78K5tlyWItqwZpG22j/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-27f4790ac6ad4567.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-c5c5e821654f54c1.js +0 -7
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-783ab7461aca504e.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-c9e6d2b03ed95619.js +0 -10
- package/app/.next-cli-build/static/chunks/app/_global-error/page-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cache/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-e4e5f60bd2215699.js +0 -1
- package/app/.next-cli-build/static/css/b0fc55ef939fe0cb.css +0 -1
- package/app/public/providers/qwen-cloud-token-plan.svg +0 -8
- /package/app/.next-cli-build/static/{GZ-78K5tlyWItqwZpG22j → jvjk_lCzF7LBW1SV_GCaU}/_ssgManifest.js +0 -0
- /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.7.1-to-0.7.2-0.7.2-20260718-105318 → upgrade-0.7.5-to-0.7.6-0.7.6-20260725-174113}/data.sqlite +0 -0
- /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.7.2-to-0.7.3-0.7.3-20260719-100408 → upgrade-0.7.6-to-0.7.7-0.7.7-20260726-222051}/data.sqlite +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2134,a.ids=[2134],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3725:a=>{"use strict";a.exports=require("wreq-js")},4573:a=>{"use strict";a.exports=require("node:buffer")},7066:a=>{"use strict";a.exports=require("node:tty")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},
|
|
1
|
+
(()=>{var a={};a.id=2134,a.ids=[2134],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3725:a=>{"use strict";a.exports=require("wreq-js")},4573:a=>{"use strict";a.exports=require("node:buffer")},7066:a=>{"use strict";a.exports=require("node:tty")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},17945:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>_});var d=c(48249),e=c(67484),f=c(19099),g=c(50412),h=c(92592),i=c(91431),j=c(50377),k=c(98425),l=c(99258),m=c(29225),n=c(49885),o=c.n(n);let p=`name1|sk-key1
|
|
2
2
|
name2|sk-key2
|
|
3
3
|
sk-key-only-auto-named`;function q({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:i,authType:j,authHint:k,website:l,proxyPools:m,error:n,onSave:o,onBulkDone:r,onClose:s}){let t="__none__",u="ollama-local"===b,v="cookie"===j,w="xai"===b&&!v,x="tokenrouter"===b,y=v?"Cookie Value":"API Key",z=v?"grok-web"===b?"sso=xxxxx... or just the raw value":"chatglm-cn"===b?"Paste your full chatglm.cn cookies, or just the chatglm_refresh_token value (eyJhbGc...)":"eyJhbGciOi...":w?"xai-...":"",A="azure"===b,B="cloudflare-ai"===b,C=h.Q2?.[b]?.regions||null,D=h.Q2?.[b]?.defaultRegion||C?.[0]?.id||"",[E,F]=(0,e.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:t,ollamaHostUrl:""}),[G,H]=(0,e.useState)(""),[I,J]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[K,L]=(0,e.useState)({accountId:""}),[M,N]=(0,e.useState)(D),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)(null),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)("single"),[W,X]=(0,e.useState)(""),[Y,Z]=(0,e.useState)(null),$=()=>u&&E.ollamaHostUrl.trim()?{baseUrl:E.ollamaHostUrl.trim()}:A?{azureEndpoint:I.azureEndpoint,apiVersion:I.apiVersion,deployment:I.deployment,organization:I.organization}:B?{accountId:K.accountId}:x&&G.trim()?{mgmtKey:G.trim()}:C&&M?{region:M}:void 0,_=async()=>{P(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:E.apiKey,providerSpecificData:$()})}),c=await a.json();R(c.valid?"success":"failed")}catch{R("failed")}finally{P(!1)}},aa=async()=>{if(b&&(u||E.apiKey)&&(u||E.name)&&(!f||E.defaultModel.trim())){T(!0);try{let a=!1;try{P(!0),R(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:E.apiKey,providerSpecificData:$()})});a=!!(await c.json()).valid,R(a?"success":"failed")}catch{R("failed")}finally{P(!1)}await o({name:E.name||(u?"Ollama Local":""),apiKey:E.apiKey,defaultModel:f?E.defaultModel.trim():void 0,priority:E.priority,proxyPoolId:E.proxyPoolId===t?null:E.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:$()})}finally{T(!1)}}},ab=async()=>{let a=W.split("\n").map(a=>a.trim()).filter(Boolean);if(!a.length)return;T(!0),Z(null);let c=0,d=0;for(let e=0;e<a.length;e++){let f=a[e].split("|"),g=f.length>=2?f.slice(1).join("|").trim():f[0].trim(),h=f.length>=2?f[0].trim():"Key",i=`${h} ${e+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:g,name:i,priority:1,testStatus:"unknown"})})).ok?c++:d++}catch{d++}}T(!1),Z({success:c,failed:d}),c>0&&r&&r()};return b?(0,d.jsx)(g.aF,{isOpen:a,title:`Add ${c||b} ${y}`,onClose:s,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(g.$n,{size:"sm",variant:"single"===U?"primary":"ghost",onClick:()=>{V("single"),Z(null)},children:"Single"}),(0,d.jsx)(g.$n,{size:"sm",variant:"bulk"===U?"primary":"ghost",onClick:()=>{V("bulk"),Z(null)},children:"Bulk Add"})]}),"bulk"===U&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,d.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:p,value:W,onChange:a=>X(a.target.value)}),Y&&(0,d.jsxs)("div",{className:`text-sm font-medium ${Y.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",Y.success," added",Y.failed>0?`, ✗ ${Y.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(g.$n,{onClick:ab,fullWidth:!0,disabled:S||!W.trim(),children:S?"Adding...":"Add All Keys"}),(0,d.jsx)(g.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===U&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.pd,{label:"Name",value:E.name,onChange:a=>F({...E,name:a.target.value}),placeholder:u?"Ollama Local":"Production Key"}),u&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(g.pd,{label:"Ollama Host URL",value:E.ollamaHostUrl,onChange:a=>F({...E,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(g.$n,{onClick:_,disabled:O||S,variant:"secondary",children:O?"Checking...":"Check"})})]}),!u&&(0,d.jsxs)("div",{className:"flex gap-2",children:[v?(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-1",children:[(0,d.jsx)("label",{className:"text-xs font-medium text-text-muted",children:y}),(0,d.jsx)("textarea",{value:E.apiKey,onChange:a=>F({...E,apiKey:a.target.value}),placeholder:z,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,d.jsx)(g.pd,{label:y,type:"password",value:E.apiKey,onChange:a=>F({...E,apiKey:a.target.value}),placeholder:z,className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(g.$n,{onClick:_,disabled:!E.apiKey||O||S,variant:"secondary",children:O?"Checking...":"Check"})})]}),w&&(0,d.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."}),v&&k&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[k,l&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",l.replace(/^https?:\/\//,"")]})]})]}),C&&(0,d.jsx)(g.l6,{label:"Region",value:M,onChange:a=>N(a.target.value),options:C.map(a=>({value:a.id,label:a.label}))}),f&&(0,d.jsx)(g.pd,{label:"Default Model",value:E.defaultModel,onChange:a=>F({...E,defaultModel:a.target.value}),placeholder:i?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),u&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),Q&&(0,d.jsx)(g.Ex,{variant:"success"===Q?"success":"error",children:"success"===Q?"Valid":"Invalid"}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),f&&(0,d.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."}),x&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"TokenRouter Management Key (optional)"}),(0,d.jsx)(g.pd,{label:"Management Key",type:"password",value:G,onChange:a=>H(a.target.value),placeholder:"your_management_key..."}),(0,d.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."})]}),B&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(g.pd,{label:"Account ID",value:K.accountId,onChange:a=>L({...K,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),A&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(g.pd,{label:"Azure Endpoint",value:I.azureEndpoint,onChange:a=>J({...I,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(g.pd,{label:"Deployment Name",value:I.deployment,onChange:a=>J({...I,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(g.pd,{label:"API Version",value:I.apiVersion,onChange:a=>J({...I,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(g.pd,{label:"Organization",value:I.organization,onChange:a=>J({...I,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(g.pd,{label:"Priority",type:"number",value:E.priority,onChange:a=>F({...E,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(g.l6,{label:"Proxy Pool",value:E.proxyPoolId,onChange:a=>F({...E,proxyPoolId:a.target.value}),options:[{value:t,label:"None"},...(m||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(m||[]).length&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(g.$n,{onClick:aa,fullWidth:!0,disabled:S||!u&&(!E.name||!E.apiKey)||f&&!E.defaultModel.trim()||A&&(!I.azureEndpoint||!I.deployment||!I.organization)||B&&!K.accountId,children:S?"Saving...":"Save"}),(0,d.jsx)(g.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function r({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:h}){let[i,j]=(0,e.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(null),v=async()=>{if(i.name.trim()&&i.prefix.trim()&&i.baseUrl.trim()){l(!0);try{let a={name:i.name,prefix:i.prefix,baseUrl:i.baseUrl};h||(a.apiType=i.apiType),await c(a)}finally{l(!1)}}},w=async()=>{s(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:i.baseUrl,apiKey:m,type:h?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();u(b.valid?"success":"failed")}catch{u("failed")}finally{s(!1)}};return b?(0,d.jsx)(g.aF,{isOpen:a,title:`Edit ${h?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(g.pd,{label:"Name",value:i.name,onChange:a=>j({...i,name:a.target.value}),placeholder:`${h?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,d.jsx)(g.pd,{label:"Prefix",value:i.prefix,onChange:a=>j({...i,prefix:a.target.value}),placeholder:h?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!h&&(0,d.jsx)(g.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:i.apiType,onChange:a=>j({...i,apiType:a.target.value})}),(0,d.jsx)(g.pd,{label:"Base URL",value:i.baseUrl,onChange:a=>j({...i,baseUrl:a.target.value}),placeholder:h?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${h?"Anthropic":"OpenAI"}-compatible API.`}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(g.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(g.$n,{onClick:w,disabled:!m||q||!i.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(g.pd,{label:"Model ID (optional)",value:o,onChange:a=>p(a.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),t&&(0,d.jsx)(g.Ex,{variant:"success"===t?"success":"error",children:"success"===t?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(g.$n,{onClick:v,fullWidth:!0,disabled:!i.name.trim()||!i.prefix.trim()||!i.baseUrl.trim()||k,children:k?"Saving...":"Save"}),(0,d.jsx)(g.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function s({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:h}){let[i,j]=(0,e.useState)(""),[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),q=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},r=async()=>{let a=q(i.trim());if(a){l("testing"),n("");try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();l(d.ok?"ok":"error"),n(d.error||"")}catch(a){l("error"),n(a.message)}}},t=async()=>{let a=q(i.trim());if(a&&!o){p(!0);try{await f(a)}finally{p(!1)}}};return(0,d.jsx)(g.aF,{isOpen:a,onClose:h,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{type:"text",value:i,onChange:a=>{j(a.target.value),l(null),n("")},onKeyDown:a=>{"Enter"===a.key&&r()},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,d.jsx)(g.$n,{variant:"secondary",icon:"science",loading:"testing"===k,onClick:r,disabled:!i.trim()||"testing"===k,children:"testing"===k?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:q(i.trim())||"model-id"})]})]}),"ok"===k&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===k&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:m||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(g.$n,{onClick:h,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(g.$n,{onClick:t,fullWidth:!0,size:"sm",disabled:!i.trim()||o,children:o?"Adding...":"Add Model"})]})]})})}q.propTypes={isOpen:o().bool.isRequired,provider:o().string,providerName:o().string,isCompatible:o().bool,isAnthropic:o().bool,authType:o().string,authHint:o().string,website:o().string,proxyPools:o().arrayOf(o().shape({id:o().string,name:o().string})),error:o().string,onSave:o().func.isRequired,onBulkDone:o().func,onClose:o().func.isRequired},r.propTypes={isOpen:o().bool.isRequired,node:o().shape({id:o().string,name:o().string,prefix:o().string,apiType:o().string,baseUrl:o().string}),onSave:o().func.isRequired,onClose:o().func.isRequired,isAnthropic:o().bool},s.propTypes={isOpen:o().bool.isRequired,providerAlias:o().string.isRequired,providerDisplayAlias:o().string.isRequired,onSave:o().func.isRequired,onClose:o().func.isRequired};let t=`[
|
|
4
4
|
{
|
|
@@ -7,5 +7,5 @@ sk-key-only-auto-named`;function q({isOpen:a,provider:b,providerName:c,isCompati
|
|
|
7
7
|
"idToken": "eyJhbGc...",
|
|
8
8
|
"email": "user@example.com"
|
|
9
9
|
}
|
|
10
|
-
]`;function u({isOpen:a,onClose:b,onSuccess:c}){let[f,h]=(0,e.useState)(""),[i,j]=(0,e.useState)(!1),[k,m]=(0,e.useState)(""),[n,o]=(0,e.useState)(null),p=()=>{i||(h(""),m(""),o(null),b())},q=async()=>{var a;let b;m(""),o(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){m(`${(0,l.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a=b)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void m((0,l.Tl)("No accounts found in input"));j(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void m(b?.error||`Request failed: ${a.status}`);o(b),b.success>0&&"function"==typeof c&&c()}catch(a){m(a.message||(0,l.Tl)("Request failed"))}finally{j(!1)}},r=n?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(g.aF,{isOpen:a,title:(0,l.Tl)("Bulk Add Codex Accounts"),onClose:p,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,l.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,d.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:t,value:f,onChange:a=>h(a.target.value),disabled:i}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),n&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:`text-sm font-medium ${n.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",n.success," ",(0,l.Tl)("added"),n.failed>0?`, ✗ ${n.failed} ${(0,l.Tl)("failed")}`:""]}),r.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:r.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(g.$n,{onClick:q,fullWidth:!0,disabled:i||!f.trim(),children:i?(0,l.Tl)("Importing..."):(0,l.Tl)("Import All")}),(0,d.jsx)(g.$n,{onClick:p,variant:"ghost",fullWidth:!0,disabled:i,children:(0,l.Tl)("Close")})]})]})})}function v({providerId:a,hours:b=24}){let[c,f]=(0,e.useState)(null);if(!c)return(0,d.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-pulse",children:"monitor_heart"}),"Loading health timeline..."]});if(0===c.length||c.every(a=>0===a.ok&&0===a.err))return(0,d.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"monitor_heart"}),"No request history yet."]});let g=c.length,h=c.reduce((a,b)=>a+b.ok+b.err,0),i=c.reduce((a,b)=>a+b.err,0),j=Math.max(...c.map(a=>a.ok+a.err),1),k=Math.max(...c.map(a=>a.latency),1),l=Math.max(6*g,120),m=Math.max(l/g-1,2),n=c.filter(a=>a.latency>0).map((a,b)=>{let c=b/Math.max(g-1,1)*l,d=32-a.latency/k*19.2-2;return`${c.toFixed(1)},${d.toFixed(1)}`}),o=n.length>1?`M${n.join(" L")}`:"",p=h>0?Math.round((h-i)/h*100):null;return(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Health (24h)"}),null!==p&&(0,d.jsxs)("span",{className:`text-[10px] font-bold ${p>=90?"text-success":p>=70?"text-warning":"text-danger"}`,children:[p,"% success \xb7 ",h," requests \xb7 ",i," errors"]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-text-muted",children:[(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block size-2 rounded-sm bg-success"})," OK"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block size-2 rounded-sm bg-danger"})," Error"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block h-0.5 w-3 bg-info"})," Latency"]})]})]}),(0,d.jsxs)("svg",{width:l,height:32,className:"overflow-visible",children:[c.map((a,b)=>{let c=l/g*b;if(0===a.ok+a.err)return null;let e=a.ok/j*32,f=a.err/j*32;return(0,d.jsxs)("g",{children:[(0,d.jsx)("rect",{x:c,y:32-e-f,width:m,height:f,rx:.5,className:"fill-danger/60"}),(0,d.jsx)("rect",{x:c,y:32-e,width:m,height:e,rx:.5,className:"fill-success/60"})]},b)}),o&&(0,d.jsx)("path",{d:o,fill:"none",strokeWidth:1,className:"stroke-info",strokeDasharray:"2 2"})]})]})}u.propTypes={isOpen:o().bool.isRequired,onClose:o().func.isRequired,onSuccess:o().func};var w=c(82214),x=c(2116),y=c.n(x),z=c(81220);function A({providerInfo:a,providerId:b,connections:c,modelCount:e,headerIconPath:f,headerImgError:g,setHeaderImgError:h}){let i=a.notice?.apiKeyUrl||a.notice?.signupUrl||a.website,j=[a.authModes?a.authModes.includes("oauth")&&a.authModes.includes("apikey")?"OAuth + API Key":"oauth"===a.authModes[0]?"OAuth":"cookie"===a.authModes[0]?"Cookie":"API Key":"oauth"===a.authType?"OAuth":"cookie"===a.authType?"Cookie":"API Key"];c.length>0&&j.push(`${c.length} connection${1===c.length?"":"s"}`),e>0&&j.push(`${e} model${1===e?"":"s"}`);let k=a.color||"#6366f1";return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(y(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-primary",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"mt-4 flex min-w-0 items-center gap-4",children:[(0,d.jsx)("div",{className:"flex size-14 shrink-0 items-center justify-center rounded-xl",style:{backgroundColor:`${k}15`},children:g?(0,d.jsx)("span",{className:"text-base font-bold",style:{color:k},children:a.textIcon||a.id?.slice(0,2).toUpperCase()}):(0,d.jsx)(z.default,{src:f,alt:a.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>h(!0)})}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight text-text-main",children:a.name}),i&&(0,d.jsxs)("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),a.notice?.apiKeyUrl?"Get API Key":"Sign up"]}),"moonshot"===b&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"celebration"}),"Get KIMI K3 For Free"]})]}),(0,d.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs text-text-muted",children:j.map((a,b)=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-2",children:[b>0&&(0,d.jsx)("span",{className:"text-text-muted/40",children:"\xb7"}),a]},b))})]})]}),a.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined mt-0.5 shrink-0 text-[16px] text-yellow-500",children:"warning"}),(0,d.jsx)("p",{className:"text-xs leading-relaxed text-red-600 dark:text-yellow-400",children:a.deprecationNotice})]}),a.notice?.text&&!a.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[16px] text-info",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-info",children:a.notice.text}),a.notice.apiKeyUrl&&(0,d.jsx)("a",{href:a.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 B=c(71404);function C({title:a,icon:b,count:c,defaultExpanded:f=!0,actions:g=null,children:h,className:i}){let[j,k]=(0,e.useState)(f);return(0,d.jsxs)("div",{className:(0,B.cn)("overflow-hidden rounded-panel border border-border-subtle bg-panel shadow-[var(--shadow-soft)]",i),children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 px-4 py-3",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>k(a=>!a),className:"flex min-w-0 items-center gap-2 text-left","aria-expanded":j,children:[b&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted",children:b}),(0,d.jsx)("h2",{className:"truncate text-sm font-semibold text-text-main",children:a}),null!=c&&(0,d.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:c}),(0,d.jsx)("span",{className:(0,B.cn)("material-symbols-outlined text-[18px] text-text-muted transition-transform",j&&"rotate-180"),children:"expand_more"})]}),g&&(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-1.5",children:g})]}),j&&(0,d.jsx)("div",{className:"border-t border-border-subtle",children:h})]})}var D=c(74875);function E({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function F({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:h,onMoveUp:i,onMoveDown:j,onToggleActive:k,onUpdateProxy:l,onEdit:m,onDelete:n,oneByOneStatus:o=null,autoPing:p=null}){let[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),u=(0,e.useRef)(null),v=new Map((b||[]).map(a=>[a.id,a])),w=a.providerSpecificData?.proxyPoolId||null,x=w?v.get(w):null,y=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,z=!!w||y,A=x?`Pool: ${x.name}`:w?`Pool: ${w} (inactive/missing)`:y?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",B=p?.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.",C="";if(x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);C=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{C=b}}let G=x?.noProxy||a.providerSpecificData?.connectionNoProxy||"",H="default";x?.isActive===!0?H="success":(w||y)&&(H="error");let I=async a=>{t(!0);try{await l("__none__"===a?null:a)}finally{t(!1),r(!1)}},J=a.authType||(c?"oauth":"apikey"),K="oauth"===J,L="cookie"===J,M=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(K?"OAuth Account":L?"Cookie Account":"API Key"),N=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[O,P]=(0,e.useState)(!1),Q=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,R="unavailable"!==a.testStatus||O?a.testStatus:"active",S=()=>o?"queued"===o.state?"queued":"testing"===o.state?"testing":"success"===o.state?"success":"failed"===o.state?o.error?`failed: ${o.error}`:"failed":null:null;return(0,d.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===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:i,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:j,disabled:h,className:`p-0.5 rounded ${h?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:L?"cookie":K?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:M}),N&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:N}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(g.Ex,{variant:(0,D.g)(a.isActive,R),size:"sm",dot:!0,children:!1===a.isActive?"disabled":R||"Unknown"}),(0,d.jsx)(g.Ex,{variant:"default",size:"sm",children:K?"OAuth":L?"Cookie":"API Key"}),z&&(0,d.jsx)(g.Ex,{variant:H,size:"sm",children:"Proxy"}),O&&!1!==a.isActive&&(0,d.jsx)(E,{until:Q}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),S()&&(0,d.jsx)(g.Ex,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:S()})]}),z&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:A,children:A}),C&&(0,d.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:C}),G&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:G,children:["no_proxy: ",G]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{className:"relative",ref:u,children:[(0,d.jsxs)("button",{onClick:()=>r(a=>!a),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${z?"text-primary":"text-text-muted hover:text-primary"}`,disabled:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),q&&(0,d.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,d.jsx)("button",{onClick:()=>I("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>I(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),p&&(0,d.jsx)(g.m_,{text:B,children:(0,d.jsxs)("button",{onClick:()=>p.onToggle(!p.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 ${p.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick:m,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(g.lM,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}E.propTypes={until:o().string.isRequired},F.propTypes={connection:o().shape({id:o().string,name:o().string,email:o().string,displayName:o().string,modelLockUntil:o().string,testStatus:o().string,isActive:o().bool,lastError:o().string,priority:o().number,globalPriority:o().number}).isRequired,proxyPools:o().arrayOf(o().shape({id:o().string,name:o().string,proxyUrl:o().string,noProxy:o().string,isActive:o().bool})),isOAuth:o().bool.isRequired,isFirst:o().bool.isRequired,isLast:o().bool.isRequired,onMoveUp:o().func.isRequired,onMoveDown:o().func.isRequired,onToggleActive:o().func.isRequired,onUpdateProxy:o().func,onEdit:o().func.isRequired,onDelete:o().func.isRequired,oneByOneStatus:o().shape({state:o().string,error:o().string}),autoPing:o().shape({on:o().bool,onToggle:o().func,provider:o().string})};let G={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 H({providerId:a}){let[b,c]=(0,e.useState)(null);if(!b||!b.hasPool)return null;let f=G[b.status]||G.healthy;return(0,d.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,d.jsx)(g.Ex,{variant:f.variant,size:"sm",icon:f.icon,children:f.label}),(0,d.jsxs)(g.Ex,{variant:"info",size:"sm",icon:"key",children:[b.total," pool keys"]}),(0,d.jsxs)(g.Ex,{variant:"success",size:"sm",icon:"check_circle",children:[b.available," available"]}),b.rateLimited>0&&(0,d.jsxs)(g.Ex,{variant:"warning",size:"sm",icon:"schedule",children:[b.rateLimited," cooling"]})]})}function I({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,h]=(0,e.useState)(!0);if(f)return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!b)return null;let i=b.expires?new Date(b.expires):null,j=i?Math.ceil((i.getTime()-Date.now())/864e5):null,k=null!==j&&j<=3;return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"F"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),i&&(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-muted",children:"schedule"}),(0,d.jsxs)("span",{className:"text-[11px] text-text-muted",children:["Session expires ",i.toLocaleDateString()]}),null!==j&&(0,d.jsxs)(g.Ex,{variant:k?"warning":"success",size:"sm",children:[j,"d left"]})]})]})]})}function J({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,h]=(0,e.useState)(!0);if(f)return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!b?.profile&&!b?.balance)return null;let{profile:i,balance:j}=b;return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[i?.image?(0,d.jsx)("img",{src:i.image,alt:i.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:i?.name?.charAt(0)?.toUpperCase()||"v"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:i?.name||"User"}),i?.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:i.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[i?.plan&&(0,d.jsx)(g.Ex,{variant:"v0-free"===i.plan?"default":"primary",size:"sm",children:"v0-free"===i.plan?"Free":i.plan}),i?.teamName&&(0,d.jsx)("span",{className:"truncate text-[11px] text-text-muted",children:i.teamName})]})]}),j&&(0,d.jsxs)("div",{className:"flex shrink-0 flex-col items-end",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"bolt"}),(0,d.jsx)("span",{className:"font-mono text-sm font-bold text-text-main",children:j.remaining}),(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:["/",j.total||"?"]})]}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"credits left"})]})]})}function K({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,h]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"Q"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[b.channelId&&(0,d.jsxs)(g.Ex,{variant:"info",size:"sm",children:["Region: ",b.channelId]}),b.uid&&(0,d.jsxs)("span",{className:"text-[11px] text-text-muted",children:["UID: ",b.uid]})]})]})]}):null}function L({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,h]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"I"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[b.plan&&(0,d.jsx)(g.Ex,{variant:"FREE"===b.plan?"default":"primary",size:"sm",children:b.plan}),!1===b.isActive&&(0,d.jsx)(g.Ex,{variant:"danger",size:"sm",children:"Inactive"})]})]})]}):null}function M({connectionId:a,cookie:b,currentPlan:c="free",onPlanChanged:f}){let h,[i,j]=(0,e.useState)([]),[k,l]=(0,e.useState)(c),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null);h=String(b||"").match(/ctoken=([^;]+)/),h?.[1];let u=async b=>{let d=b.target.value;l(d),r(!0),t(null);try{if(!(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{zenmuxPlan:d}})})).ok)throw Error("Failed to save plan");f?.(d)}catch(a){t(a.message),l(c)}finally{r(!1)}},v=m&&m===k;return 0===i.length?(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,d.jsx)("select",{value:k,onChange:u,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,d.jsxs)("option",{value:k,children:[k," (loading…)"]})})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("select",{value:k,onChange:u,disabled:q,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:i.map(a=>(0,d.jsxs)("option",{value:a.planKey,children:[a.name," (",a.modelCount," models",a.price>0?`, $${a.price}/mo`:", free",")"]},a.planKey))}),(0,d.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),o&&(0,d.jsx)(g.Ex,{variant:"info",size:"sm",children:"Detecting…"}),v&&!o&&(0,d.jsx)(g.Ex,{variant:"success",size:"sm",icon:"check_circle",dot:!0,children:"Auto-detected"}),q&&(0,d.jsx)(g.Ex,{variant:"info",size:"sm",children:"Saving…"}),s&&(0,d.jsx)(g.Ex,{variant:"error",size:"sm",icon:"error",children:s})]}),(0,d.jsx)("p",{className:"text-[11px] text-text-muted",children:m?`Plan auto-detected from your ctoken: ${m}. You can override manually if needed.`:"Select your ZenMux subscription plan. Models available depend on your plan."})]})}var N=c(50585);function O({providerId:a,isOAuth:b,isCompatible:c,isFreeNoAuth:e,hasDualAuthModes:f,oauthConnectionLabel:h,apiKeyConnectionLabel:i,thinkingConfig:j,AUTO_PING_SETTINGS_KEYS:k,connections:m,proxyPools:n,selectedConnectionIds:o,selectedConnections:p,allSelected:q,oneByOneRunning:r,oneByOneStopping:s,oneByOneCurrentConnectionId:t,oneByOneResults:u,oneByOneSummary:v,providerStrategy:w,providerStickyLimit:x,thinkingMode:y,autoPing:z,showBulkProxyModal:A,bulkUpdatingProxy:B,activePools:C,selectedProxySummary:D,handleSwapPriority:E,handleUpdateConnectionStatus:G,handleDelete:P,handleBulkDelete:Q,handleRunOneByOneTest:R,handleStopOneByOneTest:S,handleRoundRobinToggle:T,handleStickyLimitChange:U,handleThinkingModeChange:V,handleAutoPingConnection:W,triggerOAuthConnection:X,triggerApiKeyConnection:Y,triggerAddConnection:Z,toggleSelectConnection:$,toggleSelectAllConnections:_,openBulkProxyModal:aa,closeBulkProxyModal:ab,applyProxyAssignments:ac,handleApplySinglePool:ad,handleApplyOneToOne:ae,fetchConnections:af,setSelectedConnection:ag,setShowEditModal:ah,setShowBulkProxyModal:ai,setShowIFlowCookieModal:aj,setShowBulkImportCodex:ak,setConnections:al}){return e?(0,d.jsx)(N.default,{providerId:a}):(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.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,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Connections"}),m.length>0&&(0,d.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:m.length})]}),(0,d.jsx)(H,{providerId:a}),"freebuff-web"===a&&m.length>0&&(0,d.jsx)(I,{connectionId:m[0].id}),"v0-vercel-web"===a&&m.length>0&&(0,d.jsx)(J,{connectionId:m[0].id}),"qwencloud"===a&&m.length>0&&(0,d.jsx)(K,{connectionId:m[0].id}),"inxorastudio-web"===a&&m.length>0&&(0,d.jsx)(L,{connectionId:m[0].id})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[m.length>0&&n.length>0&&(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:aa,children:"Apply Proxy"}),m.length>0&&o.length>0&&(0,d.jsxs)(g.$n,{size:"sm",variant:"danger",icon:"delete",onClick:Q,children:["Delete (",o.length,")"]}),m.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:r?"progress_activity":"sync",onClick:R,disabled:r,className:r?"animate-pulse":"",children:r?"Testing...":"Test All"}),r&&(0,d.jsx)(g.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:S,disabled:s,children:s?"Stopping":"Stop"})]}),j&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Thinking"}),(0,d.jsx)("select",{value:y,onChange:a=>V(a.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:j.options.map(a=>(0,d.jsx)("option",{value:a,children:a.charAt(0).toUpperCase()+a.slice(1)},a))})]}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Round Robin"}),(0,d.jsx)(g.lM,{checked:"round-robin"===w,onChange:T}),"round-robin"===w&&(0,d.jsx)("input",{type:"number",min:1,value:x,onChange:a=>U(a.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"===a&&m.length>0&&(0,d.jsx)(M,{connectionId:m[0].id,cookie:m[0].apiKey||"",currentPlan:m[0].providerSpecificData?.zenmuxPlan||"free",onPlanChanged:af})]})]}),0===m.length?(0,d.jsxs)("div",{className:"flex flex-col items-center gap-3 px-4 py-8 text-center",children:[(0,d.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:b?"lock":"key"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium text-text-main",children:"No connections yet"}),f&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Choose ",h," or ",i]})]}),(0,d.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:X,children:h}),(0,d.jsx)(g.$n,{size:"sm",icon:"key",onClick:Y,children:i})]}):(0,d.jsxs)(d.Fragment,{children:[!c&&"iflow"===a&&(0,d.jsx)(g.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>aj(!0),children:"Cookie"}),"codex"===a&&(0,d.jsx)(g.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ak(!0),children:(0,l.Tl)("Bulk Add")}),(0,d.jsx)(g.$n,{size:"sm",icon:"add",onClick:Z,children:c?"Add API Key":"iflow"===a?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)("div",{className:"flex flex-col",children:[v&&(0,d.jsxs)("div",{className:"border-b border-border-subtle px-4 py-2.5",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"checklist"}),(0,d.jsxs)("span",{className:"font-medium text-text-main",children:[v.completed,"/",v.total]})]}),v.passed>0&&(0,d.jsxs)("span",{className:"text-success",children:["✓ ",v.passed]}),v.failed>0&&(0,d.jsxs)("span",{className:"text-danger",children:["✗ ",v.failed]}),v.stopped&&(0,d.jsx)("span",{className:"text-warning",children:"Stopped"}),r&&t&&(0,d.jsxs)("span",{className:"truncate text-text-muted",children:["Testing: ",m.find(a=>a.id===t)?.name||t]})]}),v.total>0&&(0,d.jsx)("div",{className:"mt-1.5 h-1 overflow-hidden rounded-full bg-surface-2",children:(0,d.jsx)("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${v.completed/v.total*100}%`}})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle px-4 py-2",children:[(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:q,onChange:_,className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]}),o.length>0&&(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:[o.length," selected"]})]}),(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-border-subtle",children:m.map((c,e)=>{let f;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-2 sm:pl-3",children:(0,d.jsx)("input",{type:"checkbox",checked:(f=c.id,o.includes(f)),onChange:()=>$(c.id),className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"min-w-0 flex-1",children:(0,d.jsx)(F,{connection:c,proxyPools:n,isOAuth:b,isFirst:0===e,isLast:e===m.length-1,onMoveUp:()=>E(e,e-1),onMoveDown:()=>E(e,e+1),onToggleActive:a=>G(c.id,a),autoPing:k[a]&&"oauth"===c.authType?{on:!0===z.connections[c.id],onToggle:a=>W(c.id,a),provider:a}:null,onUpdateProxy:async a=>{try{(await fetch(`/api/providers/${c.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a||null})})).ok&&al(b=>b.map(b=>b.id===c.id?{...b,providerSpecificData:{...b.providerSpecificData,proxyPoolId:a||null}}:b))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{ag(c),ah(!0)},onDelete:()=>P(c.id),oneByOneStatus:u[c.id]||null})})]},c.id)})}),!c&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-border-subtle px-4 py-3",children:["iflow"===a&&(0,d.jsx)(g.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>aj(!0),children:"Cookie"}),"codex"===a&&(0,d.jsx)(g.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ak(!0),children:(0,l.Tl)("Bulk Add")}),f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:X,children:h}),(0,d.jsx)(g.$n,{size:"sm",icon:"key",onClick:Y,children:i})]}):(0,d.jsx)(g.$n,{size:"sm",icon:"add",onClick:Z,children:"Add"})]})]}),(0,d.jsx)(g.aF,{isOpen:A,onClose:ab,title:`Apply Proxy (${m.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[D&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:D}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:ae,disabled:B||0===C.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,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>ad(null),disabled:B,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),n.map(a=>(0,d.jsxs)("button",{onClick:()=>ad(a.id),disabled:B||!0!==a.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,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"lan"}),(0,d.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),B&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(g.$n,{onClick:ab,variant:"ghost",fullWidth:!0,disabled:B,children:"Cancel"})]})})]})}let P=[{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:a,selectedLevel:b,onSelect:c}){let[f,g]=(0,e.useState)(!1),h=(0,e.useRef)(null),i=P.filter(b=>"auto"===b.value||("none"===b.value?a?.thinkingCanDisable!==!1:"max"!==b.value||a?.thinkingMaxEffort===!0)),j=i.find(a=>a.value===b)||i[0];return(0,d.jsxs)("div",{className:"relative",ref:h,children:[(0,d.jsx)("button",{onClick:()=>g(a=>!a),title:`Thinking: ${j.label}${j.hint?` (${j.hint})`:""}`,className:`rounded p-0.5 transition-colors ${"auto"!==b?"text-primary":"text-text-muted hover:bg-sidebar hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"psychology"})}),f&&(0,d.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,d.jsx)("div",{className:"px-2 py-1.5 border-b border-border-subtle",children:(0,d.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-text-muted",children:"Thinking Level"})}),i.map(a=>(0,d.jsxs)("button",{onClick:()=>{c(a.value),g(!1)},className:`flex w-full items-center justify-between gap-2 px-2.5 py-1.5 text-xs transition-colors hover:bg-sidebar ${a.value===b?"text-primary font-semibold":"text-text-main"}`,children:[(0,d.jsx)("span",{children:a.label}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:a.hint})]},a.value))]})]})}function R({model:a,fullModel:b,alias:c,copied:f,onCopy:h,testStatus:i,isCustom:j,isFree:k,onDeleteAlias:l,onTest:m,isTesting:n,onDisable:o,caps:p}){let[q,r]=(0,e.useState)("auto"),s="ok"===i?"#22c55e":"error"===i?"#ef4444":void 0,t=!!p?.reasoning,u="auto"!==q&&"none"!==q?`${b}(${q})`:"none"===q?`${b}(none)`:b;return(0,d.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===i?"border-green-500/40":"error"===i?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:s?{color:s}:void 0,children:"ok"===i?"check_circle":"error"===i?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.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:u}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,d.jsx)(g.nh,{caps:p,colorOverride:"text-text-muted/70",size:12})]})]}),t&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)(Q,{caps:p,selectedLevel:q,onSelect:r}),(0,d.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"})]}),m&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:m,disabled:n,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${n?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:n?{animation:"spin 1s linear infinite"}:void 0,children:n?"progress_activity":"science"})}),(0,d.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:n?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>h(u,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:f===`model-${a.id}`?"check":"content_copy"})}),(0,d.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:f===`model-${a.id}`?"Copied!":"Copy"})]}),j?(0,d.jsx)("button",{onClick:l,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):o?(0,d.jsx)("button",{onClick:o,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function S({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:d=[],type:e="llm",includeLegacyAliases:f=!0}){let g=new Set(d.map(a=>a.id)),h=new Set,i=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(e&&a!==e||g.has(b.id))continue;let d=`${c}/${b.id}`;h.has(d)||(h.add(d),i.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a}))}if(!f)return i;let j=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(j))continue;let b=c.slice(j.length);!b||g.has(b)||h.has(c)||(h.add(c),i.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:e||"llm"}))}return i}function T({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.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:c===`model-${a}`?"Copied!":"Copy"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.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:i?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function U({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:h,onCopy:i,onDeleteAlias:j,onAddCustomModel:k,onDeleteCustomModel:l,connections:m,isAnthropic:n}){let[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)({}),y=async b=>{if(!u){v(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();x(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{x(a=>({...a,[b]:"error"}))}finally{v(null)}}},z=S({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),A=async()=>{if(!o.trim()||q)return;let a=o.trim();if(z.some(b=>b.id===a))return void alert("Model already exists for this provider.");r(!0);try{await k(a),p("")}catch(a){console.log("Error adding model:",a)}finally{r(!1)}},B=async()=>{if(s)return;let a=m.find(a=>!1!==a.isActive);if(a){t(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void alert("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(z.some(a=>a.id===b)||(await k(b),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{t(!1)}}},C=m.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",n?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&A(),placeholder:n?"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,d.jsx)(g.$n,{size:"sm",icon:"add",onClick:A,disabled:!o.trim()||q,children:q?"Adding...":"Add"}),(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"download",onClick:B,disabled:!C||s,children:s?"Importing...":"Import from /models"})]}),!C&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),z.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:z.map(({id:c,alias:e,source:f})=>(0,d.jsx)(T,{modelId:c,fullModel:`${b}/${c}`,copied:h,onCopy:i,onDeleteAlias:()=>"custom"===f?l(c):j(e),onTest:m.length>0?()=>y(c):void 0,testStatus:w[c],isTesting:u===c},`${f}-${a}/${c}`))})]})}function V({providerId:a,isCompatible:b,isAnthropicCompatible:c,isFreeNoAuth:e,providerStorageAlias:f,providerDisplayAlias:h,models:j,kiloFreeModels:k,modelAliases:m,customModels:n,disabledModelIds:o,modelTestResults:p,testingModelIds:q,testingAllModels:r,modelsTestError:s,modelSearchQuery:t,connections:u,suggestedModels:v,importingQoderModels:w,copied:x,getCaps:y,copy:z,handleTestModel:A,handleTestAllModels:B,handleDisableModel:C,handleEnableModel:D,handleDisableAll:E,handleEnableAll:F,handleSetAlias:G,handleDeleteAlias:H,handleAddCustomModel:I,handleDeleteCustomModel:J,handleImportQoderModels:K,setModelSearchQuery:L,setShowAddCustomModel:M}){let N,O,P;if(b)return(0,d.jsx)("div",{className:"px-4 py-3",children:(0,d.jsx)(U,{providerStorageAlias:f,providerDisplayAlias:h,modelAliases:m,customModels:n,copied:x,onCopy:z,onSetAlias:G,onDeleteAlias:H,onAddCustomModel:a=>I(a,"llm",f),onDeleteCustomModel:a=>J(a,"llm",f),connections:u,isAnthropic:c})});let Q=[...j,...k.filter(a=>!j.some(b=>b.id===a.id))].filter(a=>{let b=(0,i.CP)(a);return!b||"llm"===b}),T=new Set(o),W=Q.filter(a=>!T.has(a.id)),X=Q.filter(a=>T.has(a.id)),Y=S({customModels:n,modelAliases:m,providerAlias:f,builtInModels:j,type:"llm"}),Z=t.trim().toLowerCase(),$=(a,b="")=>!Z||a.toLowerCase().includes(Z)||String(b).toLowerCase().includes(Z),_=W.filter(a=>$(a.id,a.name)),aa=Y.filter(a=>$(a.id,a.name)),ab=Q.map(a=>a.id).filter(a=>!o.includes(a)),ac=ab.filter(a=>!Z||a.toLowerCase().includes(Z));return(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.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,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[o.length>0&&(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:F,children:"Active All"}),ab.length>0&&(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>E(ab),children:"Disable All"}),(u.length>0||e)&&ac.length>0&&(0,d.jsx)(g.$n,{size:"sm",variant:"primary",icon:r?"progress_activity":"play_arrow",onClick:()=>B(ac),disabled:r,className:r?"animate-pulse":"",children:r?"Testing...":`Test All (${ac.length})`})]}),(0,d.jsx)("div",{className:"sm:w-56",children:(0,d.jsx)(g.pd,{type:"search",placeholder:"Search models...",value:t,onChange:a=>L(a.target.value),className:"w-full"})})]}),(0,d.jsxs)("div",{className:"px-4 py-3",children:[!!s&&(0,d.jsx)("p",{className:"mb-3 break-words text-xs text-danger",children:s}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:[aa.map(b=>(0,d.jsx)(R,{model:{id:b.id,name:b.name},fullModel:`${h}/${b.id}`,alias:b.alias,copied:x,onCopy:z,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===b.source?J(b.id,"llm",f):H(b.alias)},testStatus:p[b.id],onTest:u.length>0||e?()=>A(b.id):void 0,isTesting:q.has(b.id),isCustom:!0,isFree:!1,caps:y(`${a}/${b.id}`)},`${b.source}-${b.fullModel}`)),_.map(b=>{let c=`${f}/${b.id}`,g=`${a}/${b.id}`,i=Object.entries(m).find(([,a])=>a===c||a===g)?.[0];return(0,d.jsx)(R,{model:b,fullModel:`${h}/${b.id}`,alias:i,copied:x,onCopy:z,onSetAlias:a=>G(b.id,a,f),onDeleteAlias:()=>H(i),testStatus:p[b.id],onTest:u.length>0||e?()=>A(b.id):void 0,isTesting:q.has(b.id),isFree:b.isFree,onDisable:()=>C(b.id),caps:y(`${a}/${b.id}`)},b.id)})]}),t.trim()&&0===_.length&&0===aa.length&&(0,d.jsxs)("p",{className:"w-full py-4 text-center text-sm text-text-muted",children:["No models match “",t,"”"]}),(0,d.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,d.jsxs)("button",{onClick:()=>M(!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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===a&&u.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:K,disabled:w,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:w?{animation:"spin 1s linear infinite"}:void 0,children:w?"progress_activity":"download"}),w?(0,l.Tl)("Fetching..."):(0,l.Tl)("Fetch Qoder Models")]})]}),v.length>0&&(N=new Set([...Object.values(m),...Y.map(a=>a.fullModel)]),O=new Set(j.map(a=>a.id)),0===(P=v.filter(a=>!N.has(`${f}/${a.id}`)&&!O.has(a.id))).length?null:(0,d.jsxs)("div",{className:"mt-3 w-full",children:[(0,d.jsx)("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-text-muted",children:"Suggested free models"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:P.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await I(a.id,"llm",f)},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:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),X.length>0&&(0,d.jsxs)("div",{className:"mt-3 w-full",children:[(0,d.jsxs)("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-text-muted",children:["Disabled (",X.length,")"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:X.map(a=>(0,d.jsxs)("button",{onClick:()=>D(a.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,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})]})}R.propTypes={model:o().shape({id:o().string.isRequired}).isRequired,fullModel:o().string.isRequired,alias:o().string,copied:o().string,onCopy:o().func.isRequired,testStatus:o().oneOf(["ok","error"]),isCustom:o().bool,isFree:o().bool,onDeleteAlias:o().func,onTest:o().func,isTesting:o().bool,onDisable:o().func,caps:o().object},U.propTypes={providerStorageAlias:o().string.isRequired,providerDisplayAlias:o().string.isRequired,modelAliases:o().object.isRequired,customModels:o().arrayOf(o().object),copied:o().string,onCopy:o().func.isRequired,onDeleteAlias:o().func.isRequired,onAddCustomModel:o().func.isRequired,onDeleteCustomModel:o().func.isRequired,connections:o().arrayOf(o().shape({id:o().string,isActive:o().bool})).isRequired,isAnthropic:o().bool};let W={claude:"claudeAutoPing",codex:"codexAutoPing"};function X(){let a=(0,f.useParams)(),b=(0,f.useRouter)(),c=a.id,{getCaps:n}=(0,k.y)(),{markSeen:o}=(0,w.P)("providers"),[p,t]=(0,e.useState)([]),[x,y]=(0,e.useState)(!0),[z,B]=(0,e.useState)(null),[D,E]=(0,e.useState)([]),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)(""),[N,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,X]=(0,e.useState)(!1),[Y,Z]=(0,e.useState)(null),[$,_]=(0,e.useState)({}),[aa,ab]=(0,e.useState)([]),[ac,ad]=(0,e.useState)(!1),[ae,af]=(0,e.useState)({}),[ag,ah]=(0,e.useState)(""),[ai,aj]=(0,e.useState)(()=>new Set),[ak,al]=(0,e.useState)(""),[am,an]=(0,e.useState)(!1),[ao,ap]=(0,e.useState)(!1),[aq,ar]=(0,e.useState)([]),[as,at]=(0,e.useState)("__none__"),[au,av]=(0,e.useState)(!1),[aw,ax]=(0,e.useState)(null),[ay,az]=(0,e.useState)(""),[aA,aB]=(0,e.useState)("auto"),[aC,aD]=(0,e.useState)({enabled:!1,connections:{}}),[aE,aF]=(0,e.useState)([]),[aG,aH]=(0,e.useState)([]),[aI,aJ]=(0,e.useState)([]),[aK,aL]=(0,e.useState)(null),[aM,aN]=(0,e.useState)(!1),[aO,aP]=(0,e.useState)(!1),[aQ,aR]=(0,e.useState)(!1),[aS,aT]=(0,e.useState)(null),[aU,aV]=(0,e.useState)({}),[aW,aX]=(0,e.useState)(null),aY=(0,e.useRef)(!1),[aZ,a$]=(0,e.useState)(!1),{copied:a_,copy:a0}=(0,j.C)(),a1=()=>{G(!0)},a2=()=>{a6?a1():(M(""),K(!0))},a3=()=>{M(""),K(!0)},a4=z?{id:z.id,name:z.name||("anthropic-compatible"===z.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===z.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===z.type?"AC":"OC",apiType:z.apiType,baseUrl:z.baseUrl,type:z.type}:h.zN[c]||h.fg[c]||h.IS[c]||h.nJ[c]||h.br[c],a5=a4?.authModes||[],a6=(!!h.zN[c]||!!h.IS[c]||a5.includes("oauth"))&&a4?.hasOAuth!==!1,a7=!!h.fg[c]||a5.includes("apikey")||a4?.hasOAuth===!1,a8=!!h.IS[c]?.noAuth,a9=(0,i.KC)(c),ba=(0,h.wG)(c),bb=(0,h.mq)(c),bc=(0,h.gb)(c),bd=bb||bc,be=!bd&&a6&&a7,bf="xai"===c?"Grok Build OAuth":"OAuth",bg="xai"===c?"xAI API Key":"API Key",bh=h.Q2[c]?.thinkingConfig||h.s9.extended,bi=bd?c:ba,bj=bd?z?.prefix||c:ba,bk=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bi)}`,{cache:"no-store"}),b=await a.json();a.ok&&aJ(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bi]),bl=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bi,ids:[a]})})).ok&&await bk()}catch(a){console.log("Error disabling model:",a)}},bm=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bi)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bk()}catch(a){console.log("Error enabling model:",a)}},bn=async a=>{a.length&&aL({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aL(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bi,ids:a})})).ok&&await bk()}catch(a){console.log("Error disabling all models:",a)}}})},bo=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bi)}`,{method:"DELETE"})).ok&&await bk()}catch(a){console.log("Error enabling all models:",a)}},bp=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&_(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bq=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ab(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),br=(0,e.useCallback)(async()=>{try{let[a,b,d,e]=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"})]),f=await a.json(),g=await b.json(),h=await d.json(),i=e.ok?await e.json():{};if(a.ok){let a=(f.connections||[]).filter(a=>a.provider===c);t(a)}d.ok&&E(h.proxyPools||[]);let j=(i.providerStrategies||{})[c]||{};ax(j.fallbackStrategy||null),az(null!=j.stickyRoundRobinLimit?String(j.stickyRoundRobinLimit):"1");let k=(i.providerThinking||{})[c]||{};aB(k.mode||"auto");let l=W[c],m=l&&i[l]||{};if(aD({enabled:!0===m.enabled,connections:m.connections||{}}),b.ok){let a=(g.nodes||[]).find(a=>a.id===c)||null;if(!a&&bd)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===c)||null))break}B(a)}}catch(a){console.log("Error fetching connections:",a)}finally{y(!1)}},[c,bd]),bs=async a=>{try{let b=await fetch(`/api/provider-nodes/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),d=await b.json();b.ok&&(B(d.node),await br(),T(!1))}catch(a){console.log("Error updating provider node:",a)}},bt=async(a,b)=>{try{let d=await fetch("/api/settings",{cache:"no-store"}),e=(d.ok?await d.json():{}).providerStrategies||{},f={};a&&(f.fallbackStrategy=a),"round-robin"===a&&""!==b&&(f.stickyRoundRobinLimit=Number(b)||3);let g={...e};0===Object.keys(f).length?delete g[c]:g[c]=f,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:g})})}catch(a){console.log("Error saving provider strategy:",a)}},bu=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),d={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?d[c]={mode:a}:delete d[c],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:d})})}catch(a){console.log("Error saving thinking config:",a)}},bv=async a=>{let b=W[c];if(b){aD(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},bw=async(a,b,c=ba)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await bp();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bx=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bp()}catch(a){console.log("Error deleting alias:",a)}},by=async(a,b="llm",c=bi)=>{try{let d=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b})});if(d.ok)await bq();else{let a=await d.json();alert(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bz=async(a,b="llm",c=bi)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bq()}catch(a){console.log("Error deleting custom model:",a)}},bA=async()=>{if(aZ)return;let a=p.find(a=>!1!==a.isActive);if(!a)return void alert((0,l.Tl)("Please add an active Qoder connection first"));a$(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,l.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,l.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;if(!b)continue;let c=b.replace(/^qoder\//,"");aa.some(a=>a.providerAlias===bi&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values($).includes(`${bi}/${c}`)||(await by(c,"llm",bi),e+=1)}0===e?alert((0,l.Tl)("All models already exist, no new models added")):alert((0,l.Tl)("Successfully added")+` ${e} `+(0,l.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),alert((0,l.Tl)("Error fetching models")+": "+a.message)}finally{a$(!1)}},bB=async()=>{if(aO||0===p.length)return;let a=Object.fromEntries(p.map(a=>[a.id,{state:"queued",error:null}]));aY.current=!1,aP(!0),aR(!1),aT(null),aV(a),aX({total:p.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<p.length;a+=1){if(aY.current){aX({total:p.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=p[a];aT(d.id),aV(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,aV(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,aV(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}aX({total:p.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<p.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aT(null),aP(!1),aR(!1),aY.current=!1}},bC=async a=>{aL({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aL(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&t(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bD=()=>{br(),G(!1)},bE=async a=>{M("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:c,...a})}),d=null;try{d=await b.json()}catch{d=null}if(b.ok){await br(),K(!1);return}M(d?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),M("Failed to save connection")}},bF=async a=>{try{(await fetch(`/api/providers/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await br(),R(!1))}catch(a){console.log("Error updating connection:",a)}},bG=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&t(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},bH=async(a,b)=>{let c=[...p];[c[a],c[b]]=[c[b],c[a]],t(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await br()}},bI=p.filter(a=>aq.includes(a.id)),bJ=p.length>0&&aq.length===p.length,bK=(()=>{if(0===bI.length)return"";let a=new Set(bI.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return"All selected currently unbound";let c=D.find(a=>a.id===b);return`All selected currently bound to ${c?.name||b}`}return"Selected connections have mixed proxy bindings"})(),bL=async a=>{av(!0);try{let b=0;for(let{connectionId:c,proxyPoolId:d}of a)try{(await fetch(`/api/providers/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:d})})).ok||(b+=1)}catch(a){console.log("Error applying proxy for",c,a),b+=1}b>0&&alert(`Updated with ${b} failed request(s).`),await br(),X(!1)}finally{av(!1)}},bM=D.filter(a=>!0===a.isActive),bN=async a=>{if(!ai.has(a)){aj(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bi}/${a}`})}),c=await b.json();af(b=>({...b,[a]:c.ok?"ok":"error"})),ah(c.ok?"":c.error||"Model not reachable")}catch{af(b=>({...b,[a]:"error"})),ah("Network error")}finally{aj(b=>{let c=new Set(b);return c.delete(a),c})}}},bO=async a=>{am||0===a.length||(an(!0),ah(""),await Promise.all(a.map(a=>bN(a))),an(!1))};if(x)return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,d.jsx)(g.Qv,{}),(0,d.jsx)(g.Qv,{})]});if(!a4)return(0,d.jsxs)("div",{className:"py-20 text-center",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(Link,{href:"/dashboard/providers",className:"mt-4 inline-block text-primary",children:"Back to Providers"})]});let bP=(0,m.k)(a4.id,a4.apiType);return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,d.jsx)(A,{providerInfo:a4,providerId:c,connections:p,modelCount:a9.length,headerIconPath:bP,headerImgError:ac,setHeaderImgError:ad}),bd&&z&&(0,d.jsx)(g.Zp,{children:(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:bc?"Anthropic Compatible":"OpenAI Compatible"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bc?"Messages API":"responses"===z.apiType?"Responses API":"Chat Completions"," \xb7 ",(z.baseUrl||"").replace(/\/$/,""),"/",bc?"messages":"responses"===z.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(g.$n,{size:"sm",icon:"add",onClick:()=>{M(""),K(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>T(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:()=>{aL({title:"Delete Compatible Node",message:`Delete this ${bc?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aL(null);try{(await fetch(`/api/provider-nodes/${c}`,{method:"DELETE"})).ok&&b.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),(0,d.jsx)(C,{title:"Connections",icon:"cable",count:p.length,defaultExpanded:!0,children:(0,d.jsx)(O,{providerId:c,isOAuth:a6,isCompatible:bd,isFreeNoAuth:a8,hasDualAuthModes:be,oauthConnectionLabel:bf,apiKeyConnectionLabel:bg,thinkingConfig:bh,AUTO_PING_SETTINGS_KEYS:W,connections:p,proxyPools:D,selectedConnectionIds:aq,selectedConnections:bI,allSelected:bJ,oneByOneRunning:aO,oneByOneStopping:aQ,oneByOneCurrentConnectionId:aS,oneByOneResults:aU,oneByOneSummary:aW,providerStrategy:aw,providerStickyLimit:ay,thinkingMode:aA,autoPing:aC,showBulkProxyModal:U,bulkUpdatingProxy:au,activePools:bM,selectedProxySummary:bK,handleSwapPriority:bH,handleUpdateConnectionStatus:bG,handleDelete:bC,handleBulkDelete:()=>{let a=aq.length;0!==a&&aL({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aL(null);let a=0,b=[...aq];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}t(a=>a.filter(a=>!b.includes(a.id))),ar([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},handleRunOneByOneTest:bB,handleStopOneByOneTest:()=>{aO&&(aY.current=!0,aR(!0))},handleRoundRobinToggle:a=>{let b=a?"round-robin":null,c=a?ay||"1":ay;a&&!ay&&az("1"),ax(b),bt(b,c)},handleStickyLimitChange:a=>{az(a),bt("round-robin",a)},handleThinkingModeChange:a=>{aB(a),bu(a)},handleAutoPingConnection:(a,b)=>{bv({...aC,connections:{...aC.connections,[a]:b}})},triggerOAuthConnection:a2,triggerApiKeyConnection:a3,triggerAddConnection:()=>{a6?a2():a3()},toggleSelectConnection:a=>{ar(b=>b.includes(a)?b.filter(b=>b!==a):[...b,a])},toggleSelectAllConnections:()=>{bJ?ar([]):ar(p.map(a=>a.id))},openBulkProxyModal:()=>{if(0===bI.length)return;let a=[...new Set(bI.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"))];at(1===a.length?a[0]:"__none__"),X(!0)},closeBulkProxyModal:()=>{au||X(!1)},applyProxyAssignments:bL,handleApplySinglePool:a=>bL(p.map(b=>({connectionId:b.id,proxyPoolId:a}))),handleApplyOneToOne:()=>{let a=D.filter(a=>!0===a.isActive);return 0===a.length?void alert("No active proxy pools available."):bL(p.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},fetchConnections:br,setSelectedConnection:Z,setShowEditModal:R,setShowBulkProxyModal:X,setShowIFlowCookieModal:I,setShowBulkImportCodex:P,setConnections:t})}),(0,d.jsx)(C,{title:"Health",icon:"monitoring",defaultExpanded:!1,children:(0,d.jsx)("div",{className:"px-4 py-3",children:(0,d.jsx)(v,{providerId:c})})}),(0,d.jsx)(C,{title:"Models",icon:"apps",count:a9.length,defaultExpanded:!0,children:(0,d.jsx)(V,{providerId:c,isCompatible:bd,isAnthropicCompatible:bc,isFreeNoAuth:a8,providerStorageAlias:bi,providerDisplayAlias:bj,models:a9,kiloFreeModels:aG,modelAliases:$,customModels:aa,disabledModelIds:aI,modelTestResults:ae,testingModelIds:ai,testingAllModels:am,modelsTestError:ag,modelSearchQuery:ak,connections:p,suggestedModels:aE,importingQoderModels:aZ,copied:a_,getCaps:n,copy:a0,handleTestModel:bN,handleTestAllModels:bO,handleDisableModel:bl,handleEnableModel:bm,handleDisableAll:bn,handleEnableAll:bo,handleSetAlias:bw,handleDeleteAlias:bx,handleAddCustomModel:by,handleDeleteCustomModel:bz,handleImportQoderModels:bA,setModelSearchQuery:al,setShowAddCustomModel:ap})}),"kiro"===c?(0,d.jsx)(g.Mh,{isOpen:F,providerInfo:a4,onSuccess:bD,onClose:()=>G(!1)}):"cursor"===c?(0,d.jsx)(g.G9,{isOpen:F,onSuccess:bD,onClose:()=>G(!1)}):"gitlab"===c?(0,d.jsx)(g.vj,{isOpen:F,providerInfo:a4,onSuccess:bD,onClose:()=>G(!1)}):(0,d.jsx)(g.LF,{isOpen:F,provider:c,providerInfo:a4,onSuccess:bD,onClose:()=>G(!1)}),"iflow"===c&&(0,d.jsx)(g.vE,{isOpen:H,onSuccess:()=>{br(),I(!1)},onClose:()=>I(!1)}),(0,d.jsx)(q,{isOpen:J,provider:c,providerName:a4.name,isCompatible:bd,isAnthropic:bc,authType:a4?.authType,authHint:a4?.authHint,website:a4?.website,proxyPools:D,error:L,onSave:bE,onBulkDone:br,onClose:()=>{M(""),K(!1)}}),(0,d.jsx)(g.wI,{isOpen:Q,connection:Y,proxyPools:D,onSave:bF,onClose:()=>R(!1)}),bd&&(0,d.jsx)(r,{isOpen:S,node:z,onSave:bs,onClose:()=>T(!1),isAnthropic:bc}),!bd&&(0,d.jsx)(s,{isOpen:ao,providerAlias:bi,providerDisplayAlias:bj,onSave:async a=>{await by(a,"llm",bi),ap(!1)},onClose:()=>ap(!1)}),"codex"===c&&(0,d.jsx)(u,{isOpen:N,onClose:()=>P(!1),onSuccess:br}),(0,d.jsx)(g.uo,{isOpen:aM,onClose:()=>aN(!1),onConfirm:()=>{(aN(!1),a6)?a1():a3()},title:"Risk Notice",message:a4?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(g.uo,{isOpen:!!aK,onClose:()=>aL(null),onConfirm:aK?.onConfirm,title:aK?.title||"Confirm",message:aK?.message,variant:"danger"})]})}},48161:a=>{"use strict";a.exports=require("node:os")},50963:(a,b,c)=>{Promise.resolve().then(c.bind(c,46616))},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},56796:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,93110)),"C:\\Users\\Administrator\\Desktop\\Projects\\ExtremeRouter\\src\\app\\(dashboard)\\dashboard\\providers\\[id]\\page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,30508)),"C:\\Users\\Administrator\\Desktop\\Projects\\ExtremeRouter\\src\\app\\(dashboard)\\layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,50385)),"C:\\Users\\Administrator\\Desktop\\Projects\\ExtremeRouter\\src\\app\\layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next-cli-build",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/(dashboard)/dashboard/providers/[id]/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
|
|
11
|
-
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},83997:a=>{"use strict";a.exports=require("tty")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"C:\\\\Users\\\\Administrator\\\\Desktop\\\\Projects\\\\ExtremeRouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\providers\\\\[id]\\\\page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"C:\\Users\\Administrator\\Desktop\\Projects\\ExtremeRouter\\src\\app\\(dashboard)\\dashboard\\providers\\[id]\\page.js","default")},94735:a=>{"use strict";a.exports=require("events")},97819:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7774,1260,6935,4013,5573,319,7152,8e3,6591,1220,9703,9422,964,6070,6306,212,2701,1173,318,8895,6182,6457,8271,7872,6316,6777,412,788],()=>b(b.s=56796));module.exports=c})();
|
|
10
|
+
]`;function u({isOpen:a,onClose:b,onSuccess:c}){let[f,h]=(0,e.useState)(""),[i,j]=(0,e.useState)(!1),[k,m]=(0,e.useState)(""),[n,o]=(0,e.useState)(null),p=()=>{i||(h(""),m(""),o(null),b())},q=async()=>{var a;let b;m(""),o(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){m(`${(0,l.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a=b)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void m((0,l.Tl)("No accounts found in input"));j(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void m(b?.error||`Request failed: ${a.status}`);o(b),b.success>0&&"function"==typeof c&&c()}catch(a){m(a.message||(0,l.Tl)("Request failed"))}finally{j(!1)}},r=n?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(g.aF,{isOpen:a,title:(0,l.Tl)("Bulk Add Codex Accounts"),onClose:p,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,l.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,d.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:t,value:f,onChange:a=>h(a.target.value),disabled:i}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),n&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:`text-sm font-medium ${n.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",n.success," ",(0,l.Tl)("added"),n.failed>0?`, ✗ ${n.failed} ${(0,l.Tl)("failed")}`:""]}),r.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:r.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(g.$n,{onClick:q,fullWidth:!0,disabled:i||!f.trim(),children:i?(0,l.Tl)("Importing..."):(0,l.Tl)("Import All")}),(0,d.jsx)(g.$n,{onClick:p,variant:"ghost",fullWidth:!0,disabled:i,children:(0,l.Tl)("Close")})]})]})})}function v({providerId:a,hours:b=24}){let[c,f]=(0,e.useState)(null);if(!c)return(0,d.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-pulse",children:"monitor_heart"}),"Loading health timeline..."]});if(0===c.length||c.every(a=>0===a.ok&&0===a.err))return(0,d.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"monitor_heart"}),"No request history yet."]});let g=c.length,h=c.reduce((a,b)=>a+b.ok+b.err,0),i=c.reduce((a,b)=>a+b.err,0),j=Math.max(...c.map(a=>a.ok+a.err),1),k=Math.max(...c.map(a=>a.latency),1),l=Math.max(6*g,120),m=Math.max(l/g-1,2),n=c.filter(a=>a.latency>0).map((a,b)=>{let c=b/Math.max(g-1,1)*l,d=32-a.latency/k*19.2-2;return`${c.toFixed(1)},${d.toFixed(1)}`}),o=n.length>1?`M${n.join(" L")}`:"",p=h>0?Math.round((h-i)/h*100):null;return(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Health (24h)"}),null!==p&&(0,d.jsxs)("span",{className:`text-[10px] font-bold ${p>=90?"text-success":p>=70?"text-warning":"text-danger"}`,children:[p,"% success \xb7 ",h," requests \xb7 ",i," errors"]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-text-muted",children:[(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block size-2 rounded-sm bg-success"})," OK"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block size-2 rounded-sm bg-danger"})," Error"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block h-0.5 w-3 bg-info"})," Latency"]})]})]}),(0,d.jsxs)("svg",{width:l,height:32,className:"overflow-visible",children:[c.map((a,b)=>{let c=l/g*b;if(0===a.ok+a.err)return null;let e=a.ok/j*32,f=a.err/j*32;return(0,d.jsxs)("g",{children:[(0,d.jsx)("rect",{x:c,y:32-e-f,width:m,height:f,rx:.5,className:"fill-danger/60"}),(0,d.jsx)("rect",{x:c,y:32-e,width:m,height:e,rx:.5,className:"fill-success/60"})]},b)}),o&&(0,d.jsx)("path",{d:o,fill:"none",strokeWidth:1,className:"stroke-info",strokeDasharray:"2 2"})]})]})}u.propTypes={isOpen:o().bool.isRequired,onClose:o().func.isRequired,onSuccess:o().func};var w=c(82214),x=c(2116),y=c.n(x),z=c(81220);function A({providerInfo:a,providerId:b,connections:c,modelCount:e,headerIconPath:f,headerImgError:g,setHeaderImgError:h}){let i=a.notice?.apiKeyUrl||a.notice?.signupUrl||a.website,j=[a.authModes?a.authModes.includes("oauth")&&a.authModes.includes("apikey")?"OAuth + API Key":"oauth"===a.authModes[0]?"OAuth":"cookie"===a.authModes[0]?"Cookie":"API Key":"oauth"===a.authType?"OAuth":"cookie"===a.authType?"Cookie":"API Key"];c.length>0&&j.push(`${c.length} connection${1===c.length?"":"s"}`),e>0&&j.push(`${e} model${1===e?"":"s"}`);let k=a.color||"#6366f1";return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(y(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-primary",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"mt-4 flex min-w-0 items-center gap-4",children:[(0,d.jsx)("div",{className:"flex size-14 shrink-0 items-center justify-center rounded-xl",style:{backgroundColor:`${k}15`},children:g?(0,d.jsx)("span",{className:"text-base font-bold",style:{color:k},children:a.textIcon||a.id?.slice(0,2).toUpperCase()}):(0,d.jsx)(z.default,{src:f,alt:a.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>h(!0)})}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight text-text-main",children:a.name}),i&&(0,d.jsxs)("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),a.notice?.apiKeyUrl?"Get API Key":"Sign up"]}),"moonshot"===b&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"celebration"}),"Get KIMI K3 For Free"]})]}),(0,d.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs text-text-muted",children:j.map((a,b)=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-2",children:[b>0&&(0,d.jsx)("span",{className:"text-text-muted/40",children:"\xb7"}),a]},b))})]})]}),a.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined mt-0.5 shrink-0 text-[16px] text-yellow-500",children:"warning"}),(0,d.jsx)("p",{className:"text-xs leading-relaxed text-red-600 dark:text-yellow-400",children:a.deprecationNotice})]}),a.notice?.text&&!a.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[16px] text-info",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-info",children:a.notice.text}),a.notice.apiKeyUrl&&(0,d.jsx)("a",{href:a.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 B=c(71404);function C({title:a,icon:b,count:c,defaultExpanded:f=!0,actions:g=null,children:h,className:i}){let[j,k]=(0,e.useState)(f);return(0,d.jsxs)("div",{className:(0,B.cn)("overflow-hidden rounded-panel border border-border-subtle bg-panel shadow-[var(--shadow-soft)]",i),children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 px-4 py-3",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>k(a=>!a),className:"flex min-w-0 items-center gap-2 text-left","aria-expanded":j,children:[b&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted",children:b}),(0,d.jsx)("h2",{className:"truncate text-sm font-semibold text-text-main",children:a}),null!=c&&(0,d.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:c}),(0,d.jsx)("span",{className:(0,B.cn)("material-symbols-outlined text-[18px] text-text-muted transition-transform",j&&"rotate-180"),children:"expand_more"})]}),g&&(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-1.5",children:g})]}),j&&(0,d.jsx)("div",{className:"border-t border-border-subtle",children:h})]})}var D=c(74875);function E({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function F({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:h,onMoveUp:i,onMoveDown:j,onToggleActive:k,onUpdateProxy:l,onEdit:m,onDelete:n,oneByOneStatus:o=null,autoPing:p=null}){let[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),u=(0,e.useRef)(null),v=new Map((b||[]).map(a=>[a.id,a])),w=a.providerSpecificData?.proxyPoolId||null,x=w?v.get(w):null,y=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,z=!!w||y,A=x?`Pool: ${x.name}`:w?`Pool: ${w} (inactive/missing)`:y?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",B=p?.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.",C="";if(x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);C=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{C=b}}let G=x?.noProxy||a.providerSpecificData?.connectionNoProxy||"",H="default";x?.isActive===!0?H="success":(w||y)&&(H="error");let I=async a=>{t(!0);try{await l("__none__"===a?null:a)}finally{t(!1),r(!1)}},J=a.authType||(c?"oauth":"apikey"),K="oauth"===J,L="cookie"===J,M=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(K?"OAuth Account":L?"Cookie Account":"API Key"),N=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[O,P]=(0,e.useState)(!1),Q=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,R="unavailable"!==a.testStatus||O?a.testStatus:"active",S=()=>o?"queued"===o.state?"queued":"testing"===o.state?"testing":"success"===o.state?"success":"failed"===o.state?o.error?`failed: ${o.error}`:"failed":null:null;return(0,d.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===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:i,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:j,disabled:h,className:`p-0.5 rounded ${h?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:L?"cookie":K?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:M}),N&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:N}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(g.Ex,{variant:(0,D.g)(a.isActive,R),size:"sm",dot:!0,children:!1===a.isActive?"disabled":R||"Unknown"}),(0,d.jsx)(g.Ex,{variant:"default",size:"sm",children:K?"OAuth":L?"Cookie":"API Key"}),z&&(0,d.jsx)(g.Ex,{variant:H,size:"sm",children:"Proxy"}),O&&!1!==a.isActive&&(0,d.jsx)(E,{until:Q}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),S()&&(0,d.jsx)(g.Ex,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:S()})]}),z&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:A,children:A}),C&&(0,d.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:C}),G&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:G,children:["no_proxy: ",G]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{className:"relative",ref:u,children:[(0,d.jsxs)("button",{onClick:()=>r(a=>!a),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${z?"text-primary":"text-text-muted hover:text-primary"}`,disabled:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),q&&(0,d.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,d.jsx)("button",{onClick:()=>I("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>I(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),p&&(0,d.jsx)(g.m_,{text:B,children:(0,d.jsxs)("button",{onClick:()=>p.onToggle(!p.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 ${p.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick:m,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(g.lM,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}E.propTypes={until:o().string.isRequired},F.propTypes={connection:o().shape({id:o().string,name:o().string,email:o().string,displayName:o().string,modelLockUntil:o().string,testStatus:o().string,isActive:o().bool,lastError:o().string,priority:o().number,globalPriority:o().number}).isRequired,proxyPools:o().arrayOf(o().shape({id:o().string,name:o().string,proxyUrl:o().string,noProxy:o().string,isActive:o().bool})),isOAuth:o().bool.isRequired,isFirst:o().bool.isRequired,isLast:o().bool.isRequired,onMoveUp:o().func.isRequired,onMoveDown:o().func.isRequired,onToggleActive:o().func.isRequired,onUpdateProxy:o().func,onEdit:o().func.isRequired,onDelete:o().func.isRequired,oneByOneStatus:o().shape({state:o().string,error:o().string}),autoPing:o().shape({on:o().bool,onToggle:o().func,provider:o().string})};let G={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 H({providerId:a}){let[b,c]=(0,e.useState)(null);if(!b||!b.hasPool)return null;let f=G[b.status]||G.healthy;return(0,d.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,d.jsx)(g.Ex,{variant:f.variant,size:"sm",icon:f.icon,children:f.label}),(0,d.jsxs)(g.Ex,{variant:"info",size:"sm",icon:"key",children:[b.total," pool keys"]}),(0,d.jsxs)(g.Ex,{variant:"success",size:"sm",icon:"check_circle",children:[b.available," available"]}),b.rateLimited>0&&(0,d.jsxs)(g.Ex,{variant:"warning",size:"sm",icon:"schedule",children:[b.rateLimited," cooling"]})]})}function I({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,h]=(0,e.useState)(!0);if(f)return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!b)return null;let i=b.expires?new Date(b.expires):null,j=i?Math.ceil((i.getTime()-Date.now())/864e5):null,k=null!==j&&j<=3;return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"F"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),i&&(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-muted",children:"schedule"}),(0,d.jsxs)("span",{className:"text-[11px] text-text-muted",children:["Session expires ",i.toLocaleDateString()]}),null!==j&&(0,d.jsxs)(g.Ex,{variant:k?"warning":"success",size:"sm",children:[j,"d left"]})]})]})]})}function J({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,h]=(0,e.useState)(!0);if(f)return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!b?.profile&&!b?.balance)return null;let{profile:i,balance:j}=b;return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[i?.image?(0,d.jsx)("img",{src:i.image,alt:i.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:i?.name?.charAt(0)?.toUpperCase()||"v"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:i?.name||"User"}),i?.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:i.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[i?.plan&&(0,d.jsx)(g.Ex,{variant:"v0-free"===i.plan?"default":"primary",size:"sm",children:"v0-free"===i.plan?"Free":i.plan}),i?.teamName&&(0,d.jsx)("span",{className:"truncate text-[11px] text-text-muted",children:i.teamName})]})]}),j&&(0,d.jsxs)("div",{className:"flex shrink-0 flex-col items-end",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"bolt"}),(0,d.jsx)("span",{className:"font-mono text-sm font-bold text-text-main",children:j.remaining}),(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:["/",j.total||"?"]})]}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"credits left"})]})]})}function K({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,h]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"Q"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[b.channelId&&(0,d.jsxs)(g.Ex,{variant:"info",size:"sm",children:["Region: ",b.channelId]}),b.uid&&(0,d.jsxs)("span",{className:"text-[11px] text-text-muted",children:["UID: ",b.uid]})]})]})]}):null}function L({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,h]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"I"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[b.plan&&(0,d.jsx)(g.Ex,{variant:"FREE"===b.plan?"default":"primary",size:"sm",children:b.plan}),!1===b.isActive&&(0,d.jsx)(g.Ex,{variant:"danger",size:"sm",children:"Inactive"})]})]})]}):null}function M({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,h]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"1M"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:"1min.ai"}),b.plan&&(0,d.jsx)(g.Ex,{variant:"primary",size:"sm",children:b.plan})]}),null!=b.credits&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Credits: ",Number(b.credits).toLocaleString(void 0,{maximumFractionDigits:2})]})]})]}):null}function N({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,h]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"1M"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:"1min.ai (API)"}),b.plan&&(0,d.jsx)(g.Ex,{variant:"primary",size:"sm",children:b.plan})]}),null!=b.credits&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Credits: ",Number(b.credits).toLocaleString(void 0,{maximumFractionDigits:2})]})]})]}):null}function O({connectionId:a,cookie:b,currentPlan:c="free",onPlanChanged:f}){let h,[i,j]=(0,e.useState)([]),[k,l]=(0,e.useState)(c),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null);h=String(b||"").match(/ctoken=([^;]+)/),h?.[1];let u=async b=>{let d=b.target.value;l(d),r(!0),t(null);try{if(!(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{zenmuxPlan:d}})})).ok)throw Error("Failed to save plan");f?.(d)}catch(a){t(a.message),l(c)}finally{r(!1)}},v=m&&m===k;return 0===i.length?(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,d.jsx)("select",{value:k,onChange:u,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,d.jsxs)("option",{value:k,children:[k," (loading…)"]})})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("select",{value:k,onChange:u,disabled:q,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:i.map(a=>(0,d.jsxs)("option",{value:a.planKey,children:[a.name," (",a.modelCount," models",a.price>0?`, $${a.price}/mo`:", free",")"]},a.planKey))}),(0,d.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),o&&(0,d.jsx)(g.Ex,{variant:"info",size:"sm",children:"Detecting…"}),v&&!o&&(0,d.jsx)(g.Ex,{variant:"success",size:"sm",icon:"check_circle",dot:!0,children:"Auto-detected"}),q&&(0,d.jsx)(g.Ex,{variant:"info",size:"sm",children:"Saving…"}),s&&(0,d.jsx)(g.Ex,{variant:"error",size:"sm",icon:"error",children:s})]}),(0,d.jsx)("p",{className:"text-[11px] text-text-muted",children:m?`Plan auto-detected from your ctoken: ${m}. You can override manually if needed.`:"Select your ZenMux subscription plan. Models available depend on your plan."})]})}let P=[{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 Q({connectionId:a,currentWindow:b="now",onWindowChanged:c}){let[f,h]=(0,e.useState)(b),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(null),m=async d=>{let e=d.target.value;h(e),j(!0),l(null);try{if(!(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{completionWindow:e}})})).ok)throw Error("Failed to save window");c?.(e)}catch(a){l(a.message),h(b)}finally{j(!1)}},n=P.find(a=>a.key===f)||P[0],o="now"!==f;return(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Completion Window"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("select",{value:f,onChange:m,disabled:i,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:P.map(a=>(0,d.jsxs)("option",{value:a.key,children:[a.label," (",a.savings," off)"]},a.key))}),(0,d.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),o&&(0,d.jsx)(g.Ex,{variant:"info",size:"sm",icon:"schedule",dot:!0,children:"Async"}),i&&(0,d.jsx)(g.Ex,{variant:"info",size:"sm",children:"Saving…"}),k&&(0,d.jsx)(g.Ex,{variant:"error",size:"sm",icon:"error",children:k})]}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted",children:[n.desc,o&&" — results polled automatically with keep-alive heartbeats."]})]})}var R=c(50585);function S({providerId:a,isOAuth:b,isCompatible:c,isFreeNoAuth:e,hasDualAuthModes:f,oauthConnectionLabel:h,apiKeyConnectionLabel:i,thinkingConfig:j,AUTO_PING_SETTINGS_KEYS:k,connections:m,proxyPools:n,selectedConnectionIds:o,selectedConnections:p,allSelected:q,oneByOneRunning:r,oneByOneStopping:s,oneByOneCurrentConnectionId:t,oneByOneResults:u,oneByOneSummary:v,providerStrategy:w,providerStickyLimit:x,thinkingMode:y,autoPing:z,showBulkProxyModal:A,bulkUpdatingProxy:B,activePools:C,selectedProxySummary:D,handleSwapPriority:E,handleUpdateConnectionStatus:G,handleDelete:P,handleBulkDelete:T,handleRunOneByOneTest:U,handleStopOneByOneTest:V,handleRoundRobinToggle:W,handleStickyLimitChange:X,handleThinkingModeChange:Y,handleAutoPingConnection:Z,triggerOAuthConnection:$,triggerApiKeyConnection:_,triggerAddConnection:aa,toggleSelectConnection:ab,toggleSelectAllConnections:ac,openBulkProxyModal:ad,closeBulkProxyModal:ae,applyProxyAssignments:af,handleApplySinglePool:ag,handleApplyOneToOne:ah,fetchConnections:ai,setSelectedConnection:aj,setShowEditModal:ak,setShowBulkProxyModal:al,setShowIFlowCookieModal:am,setShowBulkImportCodex:an,setConnections:ao}){return e?(0,d.jsx)(R.default,{providerId:a}):(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.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,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Connections"}),m.length>0&&(0,d.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:m.length})]}),(0,d.jsx)(H,{providerId:a}),"freebuff-web"===a&&m.length>0&&(0,d.jsx)(I,{connectionId:m[0].id}),"v0-vercel-web"===a&&m.length>0&&(0,d.jsx)(J,{connectionId:m[0].id}),"qwencloud"===a&&m.length>0&&(0,d.jsx)(K,{connectionId:m[0].id}),"inxorastudio-web"===a&&m.length>0&&(0,d.jsx)(L,{connectionId:m[0].id}),"1min"===a&&m.length>0&&(0,d.jsx)(M,{connectionId:m[0].id}),"1min-api"===a&&m.length>0&&(0,d.jsx)(N,{connectionId:m[0].id})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[m.length>0&&n.length>0&&(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:ad,children:"Apply Proxy"}),m.length>0&&o.length>0&&(0,d.jsxs)(g.$n,{size:"sm",variant:"danger",icon:"delete",onClick:T,children:["Delete (",o.length,")"]}),m.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:r?"progress_activity":"sync",onClick:U,disabled:r,className:r?"animate-pulse":"",children:r?"Testing...":"Test All"}),r&&(0,d.jsx)(g.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:V,disabled:s,children:s?"Stopping":"Stop"})]}),j&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Thinking"}),(0,d.jsx)("select",{value:y,onChange:a=>Y(a.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:j.options.map(a=>(0,d.jsx)("option",{value:a,children:a.charAt(0).toUpperCase()+a.slice(1)},a))})]}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Round Robin"}),(0,d.jsx)(g.lM,{checked:"round-robin"===w,onChange:W}),"round-robin"===w&&(0,d.jsx)("input",{type:"number",min:1,value:x,onChange:a=>X(a.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"===a&&m.length>0&&(0,d.jsx)(O,{connectionId:m[0].id,cookie:m[0].apiKey||"",currentPlan:m[0].providerSpecificData?.zenmuxPlan||"free",onPlanChanged:ai}),"marathon"===a&&m.length>0&&(0,d.jsx)(Q,{connectionId:m[0].id,currentWindow:m[0].providerSpecificData?.completionWindow||"now",onWindowChanged:ai})]})]}),0===m.length?(0,d.jsxs)("div",{className:"flex flex-col items-center gap-3 px-4 py-8 text-center",children:[(0,d.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:b?"lock":"key"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium text-text-main",children:"No connections yet"}),f&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Choose ",h," or ",i]})]}),(0,d.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:$,children:h}),(0,d.jsx)(g.$n,{size:"sm",icon:"key",onClick:_,children:i})]}):(0,d.jsxs)(d.Fragment,{children:[!c&&"iflow"===a&&(0,d.jsx)(g.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>am(!0),children:"Cookie"}),"codex"===a&&(0,d.jsx)(g.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>an(!0),children:(0,l.Tl)("Bulk Add")}),(0,d.jsx)(g.$n,{size:"sm",icon:"add",onClick:aa,children:c?"Add API Key":"iflow"===a?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)("div",{className:"flex flex-col",children:[v&&(0,d.jsxs)("div",{className:"border-b border-border-subtle px-4 py-2.5",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"checklist"}),(0,d.jsxs)("span",{className:"font-medium text-text-main",children:[v.completed,"/",v.total]})]}),v.passed>0&&(0,d.jsxs)("span",{className:"text-success",children:["✓ ",v.passed]}),v.failed>0&&(0,d.jsxs)("span",{className:"text-danger",children:["✗ ",v.failed]}),v.stopped&&(0,d.jsx)("span",{className:"text-warning",children:"Stopped"}),r&&t&&(0,d.jsxs)("span",{className:"truncate text-text-muted",children:["Testing: ",m.find(a=>a.id===t)?.name||t]})]}),v.total>0&&(0,d.jsx)("div",{className:"mt-1.5 h-1 overflow-hidden rounded-full bg-surface-2",children:(0,d.jsx)("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${v.completed/v.total*100}%`}})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle px-4 py-2",children:[(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:q,onChange:ac,className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]}),o.length>0&&(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:[o.length," selected"]})]}),(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-border-subtle",children:m.map((c,e)=>{let f;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-2 sm:pl-3",children:(0,d.jsx)("input",{type:"checkbox",checked:(f=c.id,o.includes(f)),onChange:()=>ab(c.id),className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"min-w-0 flex-1",children:(0,d.jsx)(F,{connection:c,proxyPools:n,isOAuth:b,isFirst:0===e,isLast:e===m.length-1,onMoveUp:()=>E(e,e-1),onMoveDown:()=>E(e,e+1),onToggleActive:a=>G(c.id,a),autoPing:k[a]&&"oauth"===c.authType?{on:!0===z.connections[c.id],onToggle:a=>Z(c.id,a),provider:a}:null,onUpdateProxy:async a=>{try{(await fetch(`/api/providers/${c.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a||null})})).ok&&ao(b=>b.map(b=>b.id===c.id?{...b,providerSpecificData:{...b.providerSpecificData,proxyPoolId:a||null}}:b))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{aj(c),ak(!0)},onDelete:()=>P(c.id),oneByOneStatus:u[c.id]||null})})]},c.id)})}),!c&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-border-subtle px-4 py-3",children:["iflow"===a&&(0,d.jsx)(g.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>am(!0),children:"Cookie"}),"codex"===a&&(0,d.jsx)(g.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>an(!0),children:(0,l.Tl)("Bulk Add")}),f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:$,children:h}),(0,d.jsx)(g.$n,{size:"sm",icon:"key",onClick:_,children:i})]}):(0,d.jsx)(g.$n,{size:"sm",icon:"add",onClick:aa,children:"Add"})]})]}),(0,d.jsx)(g.aF,{isOpen:A,onClose:ae,title:`Apply Proxy (${m.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[D&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:D}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:ah,disabled:B||0===C.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,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>ag(null),disabled:B,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),n.map(a=>(0,d.jsxs)("button",{onClick:()=>ag(a.id),disabled:B||!0!==a.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,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"lan"}),(0,d.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),B&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(g.$n,{onClick:ae,variant:"ghost",fullWidth:!0,disabled:B,children:"Cancel"})]})})]})}let T=[{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 U({caps:a,selectedLevel:b,onSelect:c}){let[f,g]=(0,e.useState)(!1),h=(0,e.useRef)(null),i=T.filter(b=>"auto"===b.value||("none"===b.value?a?.thinkingCanDisable!==!1:"max"!==b.value||a?.thinkingMaxEffort===!0)),j=i.find(a=>a.value===b)||i[0];return(0,d.jsxs)("div",{className:"relative",ref:h,children:[(0,d.jsx)("button",{onClick:()=>g(a=>!a),title:`Thinking: ${j.label}${j.hint?` (${j.hint})`:""}`,className:`rounded p-0.5 transition-colors ${"auto"!==b?"text-primary":"text-text-muted hover:bg-sidebar hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"psychology"})}),f&&(0,d.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,d.jsx)("div",{className:"px-2 py-1.5 border-b border-border-subtle",children:(0,d.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-text-muted",children:"Thinking Level"})}),i.map(a=>(0,d.jsxs)("button",{onClick:()=>{c(a.value),g(!1)},className:`flex w-full items-center justify-between gap-2 px-2.5 py-1.5 text-xs transition-colors hover:bg-sidebar ${a.value===b?"text-primary font-semibold":"text-text-main"}`,children:[(0,d.jsx)("span",{children:a.label}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:a.hint})]},a.value))]})]})}function V({model:a,fullModel:b,alias:c,copied:f,onCopy:h,testStatus:i,isCustom:j,isFree:k,onDeleteAlias:l,onTest:m,isTesting:n,onDisable:o,caps:p}){let[q,r]=(0,e.useState)("auto"),s="ok"===i?"#22c55e":"error"===i?"#ef4444":void 0,t=!!p?.reasoning,u="auto"!==q&&"none"!==q?`${b}(${q})`:"none"===q?`${b}(none)`:b;return(0,d.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===i?"border-green-500/40":"error"===i?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:s?{color:s}:void 0,children:"ok"===i?"check_circle":"error"===i?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.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:u}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,d.jsx)(g.nh,{caps:p,colorOverride:"text-text-muted/70",size:12})]})]}),t&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)(U,{caps:p,selectedLevel:q,onSelect:r}),(0,d.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"})]}),m&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:m,disabled:n,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${n?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:n?{animation:"spin 1s linear infinite"}:void 0,children:n?"progress_activity":"science"})}),(0,d.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:n?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>h(u,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:f===`model-${a.id}`?"check":"content_copy"})}),(0,d.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:f===`model-${a.id}`?"Copied!":"Copy"})]}),j?(0,d.jsx)("button",{onClick:l,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):o?(0,d.jsx)("button",{onClick:o,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function W({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:d=[],type:e="llm",includeLegacyAliases:f=!0}){let g=new Set(d.map(a=>a.id)),h=new Set,i=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(e&&a!==e||g.has(b.id))continue;let d=`${c}/${b.id}`;h.has(d)||(h.add(d),i.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a}))}if(!f)return i;let j=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(j))continue;let b=c.slice(j.length);!b||g.has(b)||h.has(c)||(h.add(c),i.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:e||"llm"}))}return i}function X({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.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:c===`model-${a}`?"Copied!":"Copy"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.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:i?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function Y({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:h,onCopy:i,onDeleteAlias:j,onAddCustomModel:k,onDeleteCustomModel:l,connections:m,isAnthropic:n}){let[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)({}),y=async b=>{if(!u){v(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();x(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{x(a=>({...a,[b]:"error"}))}finally{v(null)}}},z=W({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),A=async()=>{if(!o.trim()||q)return;let a=o.trim();if(z.some(b=>b.id===a))return void alert("Model already exists for this provider.");r(!0);try{await k(a),p("")}catch(a){console.log("Error adding model:",a)}finally{r(!1)}},B=async()=>{if(s)return;let a=m.find(a=>!1!==a.isActive);if(a){t(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void alert("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(z.some(a=>a.id===b)||(await k(b),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{t(!1)}}},C=m.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",n?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&A(),placeholder:n?"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,d.jsx)(g.$n,{size:"sm",icon:"add",onClick:A,disabled:!o.trim()||q,children:q?"Adding...":"Add"}),(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"download",onClick:B,disabled:!C||s,children:s?"Importing...":"Import from /models"})]}),!C&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),z.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:z.map(({id:c,alias:e,source:f})=>(0,d.jsx)(X,{modelId:c,fullModel:`${b}/${c}`,copied:h,onCopy:i,onDeleteAlias:()=>"custom"===f?l(c):j(e),onTest:m.length>0?()=>y(c):void 0,testStatus:w[c],isTesting:u===c},`${f}-${a}/${c}`))})]})}function Z({providerId:a,isCompatible:b,isAnthropicCompatible:c,isFreeNoAuth:e,providerStorageAlias:f,providerDisplayAlias:h,models:j,kiloFreeModels:k,modelAliases:m,customModels:n,disabledModelIds:o,modelTestResults:p,testingModelIds:q,testingAllModels:r,modelsTestError:s,modelSearchQuery:t,connections:u,suggestedModels:v,importingQoderModels:w,copied:x,getCaps:y,copy:z,handleTestModel:A,handleTestAllModels:B,handleDisableModel:C,handleEnableModel:D,handleDisableAll:E,handleEnableAll:F,handleSetAlias:G,handleDeleteAlias:H,handleAddCustomModel:I,handleDeleteCustomModel:J,handleImportQoderModels:K,setModelSearchQuery:L,setShowAddCustomModel:M}){let N,O,P;if(b)return(0,d.jsx)("div",{className:"px-4 py-3",children:(0,d.jsx)(Y,{providerStorageAlias:f,providerDisplayAlias:h,modelAliases:m,customModels:n,copied:x,onCopy:z,onSetAlias:G,onDeleteAlias:H,onAddCustomModel:a=>I(a,"llm",f),onDeleteCustomModel:a=>J(a,"llm",f),connections:u,isAnthropic:c})});let Q=[...j,...k.filter(a=>!j.some(b=>b.id===a.id))].filter(a=>{let b=(0,i.CP)(a);return!b||"llm"===b}),R=new Set(o),S=Q.filter(a=>!R.has(a.id)),T=Q.filter(a=>R.has(a.id)),U=W({customModels:n,modelAliases:m,providerAlias:f,builtInModels:j,type:"llm"}),X=t.trim().toLowerCase(),$=(a,b="")=>!X||a.toLowerCase().includes(X)||String(b).toLowerCase().includes(X),_=S.filter(a=>$(a.id,a.name)),aa=U.filter(a=>$(a.id,a.name)),ab=Q.map(a=>a.id).filter(a=>!o.includes(a)),ac=ab.filter(a=>!X||a.toLowerCase().includes(X));return(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.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,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[o.length>0&&(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:F,children:"Active All"}),ab.length>0&&(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>E(ab),children:"Disable All"}),(u.length>0||e)&&ac.length>0&&(0,d.jsx)(g.$n,{size:"sm",variant:"primary",icon:r?"progress_activity":"play_arrow",onClick:()=>B(ac),disabled:r,className:r?"animate-pulse":"",children:r?"Testing...":`Test All (${ac.length})`})]}),(0,d.jsx)("div",{className:"sm:w-56",children:(0,d.jsx)(g.pd,{type:"search",placeholder:"Search models...",value:t,onChange:a=>L(a.target.value),className:"w-full"})})]}),(0,d.jsxs)("div",{className:"px-4 py-3",children:[!!s&&(0,d.jsx)("p",{className:"mb-3 break-words text-xs text-danger",children:s}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:[aa.map(b=>(0,d.jsx)(V,{model:{id:b.id,name:b.name},fullModel:`${h}/${b.id}`,alias:b.alias,copied:x,onCopy:z,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===b.source?J(b.id,"llm",f):H(b.alias)},testStatus:p[b.id],onTest:u.length>0||e?()=>A(b.id):void 0,isTesting:q.has(b.id),isCustom:!0,isFree:!1,caps:y(`${a}/${b.id}`)},`${b.source}-${b.fullModel}`)),_.map(b=>{let c=`${f}/${b.id}`,g=`${a}/${b.id}`,i=Object.entries(m).find(([,a])=>a===c||a===g)?.[0];return(0,d.jsx)(V,{model:b,fullModel:`${h}/${b.id}`,alias:i,copied:x,onCopy:z,onSetAlias:a=>G(b.id,a,f),onDeleteAlias:()=>H(i),testStatus:p[b.id],onTest:u.length>0||e?()=>A(b.id):void 0,isTesting:q.has(b.id),isFree:b.isFree,onDisable:()=>C(b.id),caps:y(`${a}/${b.id}`)},b.id)})]}),t.trim()&&0===_.length&&0===aa.length&&(0,d.jsxs)("p",{className:"w-full py-4 text-center text-sm text-text-muted",children:["No models match “",t,"”"]}),(0,d.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,d.jsxs)("button",{onClick:()=>M(!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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===a&&u.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:K,disabled:w,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:w?{animation:"spin 1s linear infinite"}:void 0,children:w?"progress_activity":"download"}),w?(0,l.Tl)("Fetching..."):(0,l.Tl)("Fetch Qoder Models")]})]}),v.length>0&&(N=new Set([...Object.values(m),...U.map(a=>a.fullModel)]),O=new Set(j.map(a=>a.id)),0===(P=v.filter(a=>!N.has(`${f}/${a.id}`)&&!O.has(a.id))).length?null:(0,d.jsxs)("div",{className:"mt-3 w-full",children:[(0,d.jsx)("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-text-muted",children:"Suggested free models"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:P.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await I(a.id,"llm",f)},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:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),T.length>0&&(0,d.jsxs)("div",{className:"mt-3 w-full",children:[(0,d.jsxs)("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-text-muted",children:["Disabled (",T.length,")"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:T.map(a=>(0,d.jsxs)("button",{onClick:()=>D(a.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,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})]})}V.propTypes={model:o().shape({id:o().string.isRequired}).isRequired,fullModel:o().string.isRequired,alias:o().string,copied:o().string,onCopy:o().func.isRequired,testStatus:o().oneOf(["ok","error"]),isCustom:o().bool,isFree:o().bool,onDeleteAlias:o().func,onTest:o().func,isTesting:o().bool,onDisable:o().func,caps:o().object},Y.propTypes={providerStorageAlias:o().string.isRequired,providerDisplayAlias:o().string.isRequired,modelAliases:o().object.isRequired,customModels:o().arrayOf(o().object),copied:o().string,onCopy:o().func.isRequired,onDeleteAlias:o().func.isRequired,onAddCustomModel:o().func.isRequired,onDeleteCustomModel:o().func.isRequired,connections:o().arrayOf(o().shape({id:o().string,isActive:o().bool})).isRequired,isAnthropic:o().bool};let $={claude:"claudeAutoPing",codex:"codexAutoPing"};function _(){let a=(0,f.useParams)(),b=(0,f.useRouter)(),c=a.id,{getCaps:n}=(0,k.y)(),{markSeen:o}=(0,w.P)("providers"),[p,t]=(0,e.useState)([]),[x,y]=(0,e.useState)(!0),[z,B]=(0,e.useState)(null),[D,E]=(0,e.useState)([]),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)(""),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)(!1),[R,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(null),[Y,_]=(0,e.useState)({}),[aa,ab]=(0,e.useState)([]),[ac,ad]=(0,e.useState)(!1),[ae,af]=(0,e.useState)({}),[ag,ah]=(0,e.useState)(""),[ai,aj]=(0,e.useState)(()=>new Set),[ak,al]=(0,e.useState)(""),[am,an]=(0,e.useState)(!1),[ao,ap]=(0,e.useState)(!1),[aq,ar]=(0,e.useState)([]),[as,at]=(0,e.useState)("__none__"),[au,av]=(0,e.useState)(!1),[aw,ax]=(0,e.useState)(null),[ay,az]=(0,e.useState)(""),[aA,aB]=(0,e.useState)("auto"),[aC,aD]=(0,e.useState)({enabled:!1,connections:{}}),[aE,aF]=(0,e.useState)([]),[aG,aH]=(0,e.useState)([]),[aI,aJ]=(0,e.useState)([]),[aK,aL]=(0,e.useState)(null),[aM,aN]=(0,e.useState)(!1),[aO,aP]=(0,e.useState)(!1),[aQ,aR]=(0,e.useState)(!1),[aS,aT]=(0,e.useState)(null),[aU,aV]=(0,e.useState)({}),[aW,aX]=(0,e.useState)(null),aY=(0,e.useRef)(!1),[aZ,a$]=(0,e.useState)(!1),{copied:a_,copy:a0}=(0,j.C)(),a1=()=>{G(!0)},a2=()=>{a6?a1():(M(""),K(!0))},a3=()=>{M(""),K(!0)},a4=z?{id:z.id,name:z.name||("anthropic-compatible"===z.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===z.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===z.type?"AC":"OC",apiType:z.apiType,baseUrl:z.baseUrl,type:z.type}:h.zN[c]||h.fg[c]||h.IS[c]||h.nJ[c]||h.br[c],a5=a4?.authModes||[],a6=(!!h.zN[c]||!!h.IS[c]||a5.includes("oauth"))&&a4?.hasOAuth!==!1,a7=!!h.fg[c]||a5.includes("apikey")||a4?.hasOAuth===!1,a8=!!h.IS[c]?.noAuth,a9=(0,i.KC)(c),ba=(0,h.wG)(c),bb=(0,h.mq)(c),bc=(0,h.gb)(c),bd=bb||bc,be=!bd&&a6&&a7,bf="xai"===c?"Grok Build OAuth":"OAuth",bg="xai"===c?"xAI API Key":"API Key",bh=h.Q2[c]?.thinkingConfig||h.s9.extended,bi=bd?c:ba,bj=bd?z?.prefix||c:ba,bk=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bi)}`,{cache:"no-store"}),b=await a.json();a.ok&&aJ(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bi]),bl=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bi,ids:[a]})})).ok&&await bk()}catch(a){console.log("Error disabling model:",a)}},bm=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bi)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bk()}catch(a){console.log("Error enabling model:",a)}},bn=async a=>{a.length&&aL({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aL(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bi,ids:a})})).ok&&await bk()}catch(a){console.log("Error disabling all models:",a)}}})},bo=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bi)}`,{method:"DELETE"})).ok&&await bk()}catch(a){console.log("Error enabling all models:",a)}},bp=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&_(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bq=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ab(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),br=(0,e.useCallback)(async()=>{try{let[a,b,d,e]=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"})]),f=await a.json(),g=await b.json(),h=await d.json(),i=e.ok?await e.json():{};if(a.ok){let a=(f.connections||[]).filter(a=>a.provider===c);t(a)}d.ok&&E(h.proxyPools||[]);let j=(i.providerStrategies||{})[c]||{};ax(j.fallbackStrategy||null),az(null!=j.stickyRoundRobinLimit?String(j.stickyRoundRobinLimit):"1");let k=(i.providerThinking||{})[c]||{};aB(k.mode||"auto");let l=$[c],m=l&&i[l]||{};if(aD({enabled:!0===m.enabled,connections:m.connections||{}}),b.ok){let a=(g.nodes||[]).find(a=>a.id===c)||null;if(!a&&bd)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===c)||null))break}B(a)}}catch(a){console.log("Error fetching connections:",a)}finally{y(!1)}},[c,bd]),bs=async a=>{try{let b=await fetch(`/api/provider-nodes/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),d=await b.json();b.ok&&(B(d.node),await br(),T(!1))}catch(a){console.log("Error updating provider node:",a)}},bt=async(a,b)=>{try{let d=await fetch("/api/settings",{cache:"no-store"}),e=(d.ok?await d.json():{}).providerStrategies||{},f={};a&&(f.fallbackStrategy=a),"round-robin"===a&&""!==b&&(f.stickyRoundRobinLimit=Number(b)||3);let g={...e};0===Object.keys(f).length?delete g[c]:g[c]=f,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:g})})}catch(a){console.log("Error saving provider strategy:",a)}},bu=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),d={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?d[c]={mode:a}:delete d[c],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:d})})}catch(a){console.log("Error saving thinking config:",a)}},bv=async a=>{let b=$[c];if(b){aD(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},bw=async(a,b,c=ba)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await bp();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bx=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bp()}catch(a){console.log("Error deleting alias:",a)}},by=async(a,b="llm",c=bi)=>{try{let d=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b})});if(d.ok)await bq();else{let a=await d.json();alert(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bz=async(a,b="llm",c=bi)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bq()}catch(a){console.log("Error deleting custom model:",a)}},bA=async()=>{if(aZ)return;let a=p.find(a=>!1!==a.isActive);if(!a)return void alert((0,l.Tl)("Please add an active Qoder connection first"));a$(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,l.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,l.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;if(!b)continue;let c=b.replace(/^qoder\//,"");aa.some(a=>a.providerAlias===bi&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(Y).includes(`${bi}/${c}`)||(await by(c,"llm",bi),e+=1)}0===e?alert((0,l.Tl)("All models already exist, no new models added")):alert((0,l.Tl)("Successfully added")+` ${e} `+(0,l.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),alert((0,l.Tl)("Error fetching models")+": "+a.message)}finally{a$(!1)}},bB=async()=>{if(aO||0===p.length)return;let a=Object.fromEntries(p.map(a=>[a.id,{state:"queued",error:null}]));aY.current=!1,aP(!0),aR(!1),aT(null),aV(a),aX({total:p.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<p.length;a+=1){if(aY.current){aX({total:p.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=p[a];aT(d.id),aV(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,aV(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,aV(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}aX({total:p.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<p.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aT(null),aP(!1),aR(!1),aY.current=!1}},bC=async a=>{aL({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aL(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&t(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bD=()=>{br(),G(!1)},bE=async a=>{M("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:c,...a})}),d=null;try{d=await b.json()}catch{d=null}if(b.ok){await br(),K(!1);return}M(d?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),M("Failed to save connection")}},bF=async a=>{try{(await fetch(`/api/providers/${W.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await br(),Q(!1))}catch(a){console.log("Error updating connection:",a)}},bG=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&t(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},bH=async(a,b)=>{let c=[...p];[c[a],c[b]]=[c[b],c[a]],t(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await br()}},bI=p.filter(a=>aq.includes(a.id)),bJ=p.length>0&&aq.length===p.length,bK=(()=>{if(0===bI.length)return"";let a=new Set(bI.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return"All selected currently unbound";let c=D.find(a=>a.id===b);return`All selected currently bound to ${c?.name||b}`}return"Selected connections have mixed proxy bindings"})(),bL=async a=>{av(!0);try{let b=0;for(let{connectionId:c,proxyPoolId:d}of a)try{(await fetch(`/api/providers/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:d})})).ok||(b+=1)}catch(a){console.log("Error applying proxy for",c,a),b+=1}b>0&&alert(`Updated with ${b} failed request(s).`),await br(),V(!1)}finally{av(!1)}},bM=D.filter(a=>!0===a.isActive),bN=async a=>{if(!ai.has(a)){aj(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bi}/${a}`})}),c=await b.json();af(b=>({...b,[a]:c.ok?"ok":"error"})),ah(c.ok?"":c.error||"Model not reachable")}catch{af(b=>({...b,[a]:"error"})),ah("Network error")}finally{aj(b=>{let c=new Set(b);return c.delete(a),c})}}},bO=async a=>{am||0===a.length||(an(!0),ah(""),await Promise.all(a.map(a=>bN(a))),an(!1))};if(x)return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,d.jsx)(g.Qv,{}),(0,d.jsx)(g.Qv,{})]});if(!a4)return(0,d.jsxs)("div",{className:"py-20 text-center",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(Link,{href:"/dashboard/providers",className:"mt-4 inline-block text-primary",children:"Back to Providers"})]});let bP=(0,m.k)(a4.id,a4.apiType);return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,d.jsx)(A,{providerInfo:a4,providerId:c,connections:p,modelCount:a9.length,headerIconPath:bP,headerImgError:ac,setHeaderImgError:ad}),bd&&z&&(0,d.jsx)(g.Zp,{children:(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:bc?"Anthropic Compatible":"OpenAI Compatible"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bc?"Messages API":"responses"===z.apiType?"Responses API":"Chat Completions"," \xb7 ",(z.baseUrl||"").replace(/\/$/,""),"/",bc?"messages":"responses"===z.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(g.$n,{size:"sm",icon:"add",onClick:()=>{M(""),K(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>T(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(g.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:()=>{aL({title:"Delete Compatible Node",message:`Delete this ${bc?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aL(null);try{(await fetch(`/api/provider-nodes/${c}`,{method:"DELETE"})).ok&&b.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),(0,d.jsx)(C,{title:"Connections",icon:"cable",count:p.length,defaultExpanded:!0,children:(0,d.jsx)(S,{providerId:c,isOAuth:a6,isCompatible:bd,isFreeNoAuth:a8,hasDualAuthModes:be,oauthConnectionLabel:bf,apiKeyConnectionLabel:bg,thinkingConfig:bh,AUTO_PING_SETTINGS_KEYS:$,connections:p,proxyPools:D,selectedConnectionIds:aq,selectedConnections:bI,allSelected:bJ,oneByOneRunning:aO,oneByOneStopping:aQ,oneByOneCurrentConnectionId:aS,oneByOneResults:aU,oneByOneSummary:aW,providerStrategy:aw,providerStickyLimit:ay,thinkingMode:aA,autoPing:aC,showBulkProxyModal:U,bulkUpdatingProxy:au,activePools:bM,selectedProxySummary:bK,handleSwapPriority:bH,handleUpdateConnectionStatus:bG,handleDelete:bC,handleBulkDelete:()=>{let a=aq.length;0!==a&&aL({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aL(null);let a=0,b=[...aq];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}t(a=>a.filter(a=>!b.includes(a.id))),ar([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},handleRunOneByOneTest:bB,handleStopOneByOneTest:()=>{aO&&(aY.current=!0,aR(!0))},handleRoundRobinToggle:a=>{let b=a?"round-robin":null,c=a?ay||"1":ay;a&&!ay&&az("1"),ax(b),bt(b,c)},handleStickyLimitChange:a=>{az(a),bt("round-robin",a)},handleThinkingModeChange:a=>{aB(a),bu(a)},handleAutoPingConnection:(a,b)=>{bv({...aC,connections:{...aC.connections,[a]:b}})},triggerOAuthConnection:a2,triggerApiKeyConnection:a3,triggerAddConnection:()=>{a6?a2():a3()},toggleSelectConnection:a=>{ar(b=>b.includes(a)?b.filter(b=>b!==a):[...b,a])},toggleSelectAllConnections:()=>{bJ?ar([]):ar(p.map(a=>a.id))},openBulkProxyModal:()=>{if(0===bI.length)return;let a=[...new Set(bI.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"))];at(1===a.length?a[0]:"__none__"),V(!0)},closeBulkProxyModal:()=>{au||V(!1)},applyProxyAssignments:bL,handleApplySinglePool:a=>bL(p.map(b=>({connectionId:b.id,proxyPoolId:a}))),handleApplyOneToOne:()=>{let a=D.filter(a=>!0===a.isActive);return 0===a.length?void alert("No active proxy pools available."):bL(p.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},fetchConnections:br,setSelectedConnection:X,setShowEditModal:Q,setShowBulkProxyModal:V,setShowIFlowCookieModal:I,setShowBulkImportCodex:O,setConnections:t})}),(0,d.jsx)(C,{title:"Health",icon:"monitoring",defaultExpanded:!1,children:(0,d.jsx)("div",{className:"px-4 py-3",children:(0,d.jsx)(v,{providerId:c})})}),(0,d.jsx)(C,{title:"Models",icon:"apps",count:a9.length,defaultExpanded:!0,children:(0,d.jsx)(Z,{providerId:c,isCompatible:bd,isAnthropicCompatible:bc,isFreeNoAuth:a8,providerStorageAlias:bi,providerDisplayAlias:bj,models:a9,kiloFreeModels:aG,modelAliases:Y,customModels:aa,disabledModelIds:aI,modelTestResults:ae,testingModelIds:ai,testingAllModels:am,modelsTestError:ag,modelSearchQuery:ak,connections:p,suggestedModels:aE,importingQoderModels:aZ,copied:a_,getCaps:n,copy:a0,handleTestModel:bN,handleTestAllModels:bO,handleDisableModel:bl,handleEnableModel:bm,handleDisableAll:bn,handleEnableAll:bo,handleSetAlias:bw,handleDeleteAlias:bx,handleAddCustomModel:by,handleDeleteCustomModel:bz,handleImportQoderModels:bA,setModelSearchQuery:al,setShowAddCustomModel:ap})}),"kiro"===c?(0,d.jsx)(g.Mh,{isOpen:F,providerInfo:a4,onSuccess:bD,onClose:()=>G(!1)}):"cursor"===c?(0,d.jsx)(g.G9,{isOpen:F,onSuccess:bD,onClose:()=>G(!1)}):"zed"===c?(0,d.jsx)(g.TE,{isOpen:F,onSuccess:bD,onClose:()=>G(!1)}):"gitlab"===c?(0,d.jsx)(g.vj,{isOpen:F,providerInfo:a4,onSuccess:bD,onClose:()=>G(!1)}):(0,d.jsx)(g.LF,{isOpen:F,provider:c,providerInfo:a4,onSuccess:bD,onClose:()=>G(!1)}),"iflow"===c&&(0,d.jsx)(g.vE,{isOpen:H,onSuccess:()=>{br(),I(!1)},onClose:()=>I(!1)}),(0,d.jsx)(q,{isOpen:J,provider:c,providerName:a4.name,isCompatible:bd,isAnthropic:bc,authType:a4?.authType,authHint:a4?.authHint,website:a4?.website,proxyPools:D,error:L,onSave:bE,onBulkDone:br,onClose:()=>{M(""),K(!1)}}),(0,d.jsx)(g.wI,{isOpen:P,connection:W,proxyPools:D,onSave:bF,onClose:()=>Q(!1)}),bd&&(0,d.jsx)(r,{isOpen:R,node:z,onSave:bs,onClose:()=>T(!1),isAnthropic:bc}),!bd&&(0,d.jsx)(s,{isOpen:ao,providerAlias:bi,providerDisplayAlias:bj,onSave:async a=>{await by(a,"llm",bi),ap(!1)},onClose:()=>ap(!1)}),"codex"===c&&(0,d.jsx)(u,{isOpen:N,onClose:()=>O(!1),onSuccess:br}),(0,d.jsx)(g.uo,{isOpen:aM,onClose:()=>aN(!1),onConfirm:()=>{(aN(!1),a6)?a1():a3()},title:"Risk Notice",message:a4?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(g.uo,{isOpen:!!aK,onClose:()=>aL(null),onConfirm:aK?.onConfirm,title:aK?.title||"Confirm",message:aK?.message,variant:"danger"})]})}},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30714:a=>{"use strict";a.exports=require("node:vm")},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},50963:(a,b,c)=>{Promise.resolve().then(c.bind(c,17945))},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},83997:a=>{"use strict";a.exports=require("tty")},85127:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,93110)),"C:\\Users\\Administrator\\Desktop\\Projects\\ExtremeRouter\\src\\app\\(dashboard)\\dashboard\\providers\\[id]\\page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,30508)),"C:\\Users\\Administrator\\Desktop\\Projects\\ExtremeRouter\\src\\app\\(dashboard)\\layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,50385)),"C:\\Users\\Administrator\\Desktop\\Projects\\ExtremeRouter\\src\\app\\layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next-cli-build",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/(dashboard)/dashboard/providers/[id]/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
|
|
11
|
+
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"C:\\\\Users\\\\Administrator\\\\Desktop\\\\Projects\\\\ExtremeRouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\providers\\\\[id]\\\\page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"C:\\Users\\Administrator\\Desktop\\Projects\\ExtremeRouter\\src\\app\\(dashboard)\\dashboard\\providers\\[id]\\page.js","default")},94735:a=>{"use strict";a.exports=require("events")},97819:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7774,1260,6935,4013,5573,319,7152,8e3,6591,1220,9703,9422,8084,6070,6306,212,2701,2926,318,8895,6182,6457,8271,7872,6316,6777,412,1914],()=>b(b.s=85127));module.exports=c})();
|