vansrouter 0.9.97 → 0.9.99
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 +12 -12
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +3 -3
- package/app/.next-cli-build/react-loadable-manifest.json +7 -7
- 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.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.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.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.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.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/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.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.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.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.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/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/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 +1 -1
- 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.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.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-fitness/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-fitness/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +4 -4
- 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/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- 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.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/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.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.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.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 +2 -2
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +2 -2
- 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 +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 +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- 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/auth/check/route.js.nft.json +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.nft.json +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.nft.json +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.nft.json +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/cli-tools/all-statuses/route.js +5 -5
- 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.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 +2 -2
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +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/devin-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- 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/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +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.nft.json +1 -1
- 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/route.js.nft.json +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.nft.json +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.nft.json +1 -1
- 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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +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/pricing/route.js.nft.json +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.nft.json +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]/gcp-projects/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]/route.js.nft.json +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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/circuit-breakers/[name]/reset/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/circuit-breakers/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.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.nft.json +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]/fitness/clear/route.js.nft.json +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.nft.json +1 -1
- 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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/fitness/clear-all/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/fitness/route.js.nft.json +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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- 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/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +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.nft.json +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.nft.json +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.nft.json +1 -1
- 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.nft.json +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.nft.json +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.nft.json +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.nft.json +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 +2 -2
- 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.nft.json +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/logs/route.js.nft.json +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/[id]/route.js.nft.json +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.nft.json +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.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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.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.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/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/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.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.nft.json +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.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 +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- 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/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard/proxy-fitness/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard/proxy-fitness.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +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 +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- 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/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- 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 +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- 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.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 +5 -5
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- 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.nft.json +1 -1
- package/app/.next-cli-build/server/app/masuk/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/masuk/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +12 -12
- package/app/.next-cli-build/server/chunks/1248.js +1 -1
- package/app/.next-cli-build/server/chunks/127.js +1 -1
- package/app/.next-cli-build/server/chunks/1632.js +1 -1
- package/app/.next-cli-build/server/chunks/1685.js +1 -1
- package/app/.next-cli-build/server/chunks/2764.js +1 -1
- package/app/.next-cli-build/server/chunks/4105.js +1 -1
- package/app/.next-cli-build/server/chunks/4574.js +2 -2
- package/app/.next-cli-build/server/chunks/5006.js +1 -1
- package/app/.next-cli-build/server/chunks/5050.js +1 -1
- package/app/.next-cli-build/server/chunks/5300.js +1 -0
- package/app/.next-cli-build/server/chunks/5302.js +1 -1
- package/app/.next-cli-build/server/chunks/6385.js +1 -1
- package/app/.next-cli-build/server/chunks/6415.js +10 -0
- package/app/.next-cli-build/server/chunks/6685.js +1 -1
- package/app/.next-cli-build/server/chunks/7104.js +1 -1
- package/app/.next-cli-build/server/chunks/7502.js +1 -1
- package/app/.next-cli-build/server/chunks/8524.js +1 -1
- package/app/.next-cli-build/server/chunks/88.js +1 -1
- package/app/.next-cli-build/server/chunks/8857.js +1 -1
- package/app/.next-cli-build/server/chunks/8941.js +1 -1
- package/app/.next-cli-build/server/chunks/9984.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-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/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/2884.80ed08ba28ed9dc3.js +1 -0
- package/app/.next-cli-build/static/chunks/3257.d8154293f6c3befa.js +1 -0
- package/app/.next-cli-build/static/chunks/{4385-523f8ad37beda677.js → 4385-c87cdb3beb184733.js} +1 -1
- package/app/.next-cli-build/static/chunks/5560.e2ab1ca9979178f3.js +1 -0
- package/app/.next-cli-build/static/chunks/6474.05cd6a7a0760c2a1.js +1 -0
- package/app/.next-cli-build/static/chunks/6909.20637e0929ccd959.js +1 -0
- package/app/.next-cli-build/static/chunks/9146.7174fc5feff1bf58.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-4e73c3bf9b393b12.js → page-19b29a55b52a2ed9.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-c8a179ca8b3961a1.js +4 -0
- package/app/.next-cli-build/static/chunks/{webpack-ae0d2579e88dabcc.js → webpack-a93413593916815e.js} +1 -1
- package/app/.next-cli-build/static/css/170aaccd50e74dd7.css +1 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/8734.js +0 -10
- package/app/.next-cli-build/static/chunks/2884.d5538f4fb96995c4.js +0 -1
- package/app/.next-cli-build/static/chunks/3257.87d6a61b9e5f6a92.js +0 -1
- package/app/.next-cli-build/static/chunks/5560.8286d410d8bda0da.js +0 -1
- package/app/.next-cli-build/static/chunks/6474.06effe2dc57f25fb.js +0 -1
- package/app/.next-cli-build/static/chunks/6909.38877fab8673c355.js +0 -1
- package/app/.next-cli-build/static/chunks/9146.cf59a3c6b6d8c735.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-6bed0a11900ab240.js +0 -4
- package/app/.next-cli-build/static/css/7ca8ae8bdf3b39ab.css +0 -1
- /package/app/.next-cli-build/static/{YuMtvFzXHJJRdiMbSi-hq → DEvbhZaKhFHleOIAerxk2}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{YuMtvFzXHJJRdiMbSi-hq → DEvbhZaKhFHleOIAerxk2}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5560],{65560:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var s=r(15102),a=r(82030),n=r(92940),l=r(21577);function c(e,t){switch(t.type){case"INIT":return{...e,error:null,step:"loading"};case"AUTH_READY":return{...e,step:"input",authUrl:t.authUrl,authData:t.data};case"AUTH_ERROR":return{...e,step:"error",error:t.error};case"SET_CALLBACK":return{...e,callbackUrl:t.value};case"CLEAR_ERROR":return{...e,error:null};case"GO_INPUT":return{...e,step:"input",error:null};case"SUCCESS":return{...e,step:"success"};default:return e}}function i({isOpen:e,provider:t,onSuccess:r,onClose:o}){let[u,d]=(0,a.useReducer)(c,{step:"loading",authUrl:"",authData:null,callbackUrl:"",error:null}),{step:h,authUrl:x,authData:m,callbackUrl:p,error:f}=u,{copied:j,copy:g}=(0,l.C)(),y=(0,a.useRef)(!1),b=(0,a.useRef)(!1),N=(0,a.useRef)(0);(0,a.useEffect)(()=>{if(e&&!b.current&&t){let r=++N.current;y.current=!1,(async()=>{try{d({type:"INIT"});let s=await fetch(`/api/oauth/kiro/social-authorize?provider=${t}`),a=await s.json();if(!s.ok)throw Error(a.error);if(r!==N.current||!e)return;d({type:"AUTH_READY",authUrl:a.authUrl,data:a}),y.current||(y.current=!0,window.open(a.authUrl,"_blank"))}catch(t){r===N.current&&e&&d({type:"AUTH_ERROR",error:t.message})}})()}else!e&&b.current&&(N.current+=1,y.current=!1);b.current=e},[e,t]);let v=async()=>{let s=N.current;try{let a;d({type:"CLEAR_ERROR"});try{a=new URL(p)}catch(e){throw Error("Invalid callback URL format")}let n=a.searchParams.get("code"),l=a.searchParams.get("state"),c=a.searchParams.get("error");if(c)throw Error(a.searchParams.get("error_description")||c);if(!n)throw Error("No authorization code found in URL");if(!m?.state||l!==m.state)throw Error("Invalid or expired authorization state");let i=await fetch("/api/oauth/kiro/social-exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n,codeVerifier:m.codeVerifier,provider:t})}),o=await i.json();if(!i.ok)throw Error(o.error);if(s!==N.current||!e)return;d({type:"SUCCESS"}),r?.()}catch(t){s===N.current&&e&&d({type:"AUTH_ERROR",error:t.message})}},C="google"===t?"Google":"GitHub";return(0,s.jsx)(n.Modal,{isOpen:e,title:`Connect Kiro via ${C}`,onClose:o,size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:["loading"===h&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Initializing..."}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Setting up ",C," authentication"]})]}),"input"===h&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(n.Input,{value:x,readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,s.jsx)(n.Button,{variant:"secondary",icon:"auth_url"===j?"check":"content_copy",onClick:()=>g(x,"auth_url"),children:"Copy"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser address bar."}),(0,s.jsx)(n.Input,{value:p,onChange:e=>d({type:"SET_CALLBACK",value:e.target.value}),placeholder:"kiro://kiro.kiroAgent/authenticate-success?code=...",className:"font-mono text-xs"})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(n.Button,{onClick:v,fullWidth:!0,disabled:!p,children:"Connect"}),(0,s.jsx)(n.Button,{onClick:o,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===h&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your Kiro account via ",C," has been connected."]}),(0,s.jsx)(n.Button,{onClick:o,fullWidth:!0,children:"Done"})]}),"error"===h&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,s.jsx)("p",{className:"text-sm text-red-600 mb-4",children:f}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(n.Button,{onClick:()=>d({type:"GO_INPUT"}),variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,s.jsx)(n.Button,{onClick:o,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6474],{76474:(e,t,s)=>{s.r(t),s.d(t,{default:()=>i});var r=s(15102),a=s(82030),l=s(92940);function i({isOpen:e,onMethodSelect:t,onClose:s}){let[d,n]=(0,a.useState)(null),[o,c]=(0,a.useState)(""),[m,x]=(0,a.useState)("us-east-1"),[u,h]=(0,a.useState)(""),[b,p]=(0,a.useState)(""),[f,j]=(0,a.useState)(""),[g,N]=(0,a.useState)("us-east-1"),[k,y]=(0,a.useState)(null),[v,C]=(0,a.useState)(!1),[I,S]=(0,a.useState)(!1),[A,P]=(0,a.useState)(!1),[w,W]=(0,a.useState)(null),B=(0,a.useRef)(0);(0,a.useEffect)(()=>{if("import"!==d||!e)return;let t=++B.current;(async()=>{S(!0),y(null),P(!1),W(null);try{let s=await fetch("/api/oauth/kiro/auto-import"),r=await s.json();if(t!==B.current||!e||"import"!==d)return;r.found?(h(r.refreshToken),P(!0),r.clientId&&r.clientSecret&&W({clientId:r.clientId,clientSecret:r.clientSecret,region:r.region,authMethod:r.authMethod,profileArn:r.profileArn})):y(r.error||"Could not auto-detect token")}catch(s){t===B.current&&e&&"import"===d&&y("Failed to auto-detect token")}finally{t===B.current&&S(!1)}})()},[d,e]);let _=e=>{B.current+=1,n(e),y(null)},O=()=>{B.current+=1,n(null),y(null)},L=async()=>{if(!u.trim())return void y("Please enter a refresh token");let s=++B.current;C(!0),y(null);try{let r=await fetch("/api/oauth/kiro/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:u.trim(),...w||{}})}),a=await r.json();if(!r.ok)throw Error(a.error||"Import failed");if(s!==B.current||!e)return;t("import")}catch(t){s===B.current&&e&&y(t.message)}finally{s===B.current&&C(!1)}},K=async()=>{if(!b.trim())return void y("Please paste CLIProxyAPI auth JSON");C(!0),y(null);try{let e=await fetch("/api/oauth/kiro/import-cli-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({json:b.trim()})}),s=await e.json();if(!e.ok)throw Error(s.error||"CLIProxyAPI import failed");t("import-cli-proxy")}catch(e){y(e.message)}finally{C(!1)}},R=async()=>{if(!f.trim())return void y("Please enter an API key");C(!0),y(null);try{let e=await fetch("/api/oauth/kiro/api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:f.trim(),region:g.trim()||"us-east-1"})}),s=await e.json();if(!e.ok)throw Error(s.error||"Import failed");t("api-key")}catch(e){y(e.message)}finally{C(!1)}},T=e=>{t("social",{provider:e})};return(0,r.jsx)(l.Modal,{isOpen:e,title:"Connect Kiro",onClose:s,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[!d&&(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Choose your authentication method:"}),(0,r.jsx)("button",{onClick:()=>t("builder-id"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"shield"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"AWS Builder ID"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Recommended for most users. Free AWS account required."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("idc"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"business"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"AWS IAM Identity Center"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"For enterprise users with custom AWS IAM Identity Center."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("api-key"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"key"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"API Key"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Use a long-lived Kiro/CodeWhisperer API key (headless auth)."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("social-google"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"account_circle"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"Google Account"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your Google account (manual callback)."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("social-github"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"code"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"GitHub Account"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your GitHub account (manual callback)."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("import"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"file_upload"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"Import Token"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Paste refresh token from Kiro IDE."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("import-cli-proxy"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"data_object"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"Import CLIProxyAPI JSON"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Paste external_idp auth JSON from CLIProxyAPI/Kiro Microsoft login."})]})]})})]}),"idc"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["IDC Start URL ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(l.Input,{value:o,onChange:e=>c(e.target.value),placeholder:"https://your-org.awsapps.com/start",className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Your organization's AWS IAM Identity Center URL"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,r.jsx)(l.Input,{value:m,onChange:e=>x(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for your Identity Center (default: us-east-1)"})]}),k&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:k}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:()=>{o.trim()?t("idc",{startUrl:o.trim(),region:m}):y("Please enter your IDC start URL")},fullWidth:!0,children:"Continue"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"api-key"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,r.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Paste a long-lived Kiro/CodeWhisperer API key. It is validated against AWS and stored directly as a bearer credential (no refresh)."})]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["API Key ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(l.Input,{value:f,onChange:e=>j(e.target.value),placeholder:"Paste your Kiro API key...",className:"font-mono text-sm"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,r.jsx)(l.Input,{value:g,onChange:e=>N(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for the key (default: us-east-1)"})]}),k&&(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,r.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:R,fullWidth:!0,disabled:v||!f.trim(),children:v?"Validating...":"Add API Key"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-google"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,r.jsxs)("div",{className:"flex-1 text-sm",children:[(0,r.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,r.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:()=>T("google"),fullWidth:!0,children:"Continue with Google"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-github"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,r.jsxs)("div",{className:"flex-1 text-sm",children:[(0,r.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,r.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:()=>T("github"),fullWidth:!0,children:"Continue with GitHub"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"import"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[I&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting token..."}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from AWS SSO cache"})]}),!I&&(0,r.jsxs)(r.Fragment,{children:[A&&(0,r.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,r.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Token auto-detected from Kiro IDE successfully!"})]})}),!A&&!k&&(0,r.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,r.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Kiro IDE not detected. Please paste your refresh token manually."})]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Refresh Token ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(l.Input,{value:u,onChange:e=>h(e.target.value),placeholder:"Token will be auto-filled...",className:"font-mono text-sm"})]}),k&&(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,r.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:L,fullWidth:!0,disabled:v||!u.trim(),children:v?"Importing...":"Import Token"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]}),"import-cli-proxy"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,r.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Paste the Kiro CLIProxyAPI auth JSON containing auth_method=external_idp. Only Microsoft login token endpoints are accepted."})]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["CLIProxyAPI Auth JSON ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("textarea",{value:b,onChange:e=>p(e.target.value),placeholder:'{"auth_method":"external_idp","access_token":"...","refresh_token":"...","client_id":"...","token_endpoint":"https://login.microsoftonline.com/.../oauth2/v2.0/token","profile_arn":"...","scopes":"..."}',className:"min-h-40 w-full rounded-md border border-border bg-background p-3 font-mono text-sm outline-none focus:border-primary"})]}),k&&(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,r.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:K,fullWidth:!0,disabled:v||!b.trim(),children:v?"Importing...":"Import CLIProxyAPI JSON"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6909],{46909:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});var a=t(15102),s=t(82030),n=t(92940);function l(e,r){switch(r.type){case"SET_TOKEN":return{...e,accessToken:r.value};case"SET_MACHINE_ID":return{...e,machineId:r.value};case"AUTO_DETECT_START":return{...e,autoDetecting:!0,error:null,autoDetected:!1,windowsManual:!1};case"AUTO_DETECT_DONE":return{...e,autoDetecting:!1,autoDetected:r.found||!1,accessToken:r.accessToken||e.accessToken,machineId:r.machineId||e.machineId,windowsManual:r.windowsManual||!1,error:r.error||null};case"IMPORT_START":return{...e,importing:!0,error:null};case"IMPORT_DONE":return{...e,importing:!1,error:r.error||null};case"ERROR":return{...e,error:r.error};default:return e}}function o({isOpen:e,onSuccess:r,onClose:t}){let[c,d]=(0,s.useReducer)(l,{accessToken:"",machineId:"",error:null,importing:!1,autoDetecting:!1,autoDetected:!1,windowsManual:!1}),{accessToken:i,machineId:u,error:m,importing:x,autoDetecting:h,autoDetected:b,windowsManual:p}=c,f=(0,s.useRef)(0),T=async()=>{let r=++f.current;d({type:"AUTO_DETECT_START"});try{let t=await fetch("/api/oauth/cursor/auto-import"),a=await t.json();if(r!==f.current||!e)return;a.found?d({type:"AUTO_DETECT_DONE",found:!0,accessToken:a.accessToken,machineId:a.machineId}):a.windowsManual?d({type:"AUTO_DETECT_DONE",windowsManual:!0}):d({type:"AUTO_DETECT_DONE",error:a.error||"Could not auto-detect tokens"})}catch(t){r===f.current&&e&&d({type:"AUTO_DETECT_DONE",error:"Failed to auto-detect tokens"})}};(0,s.useEffect)(()=>{if(!e){f.current+=1;return}T()},[e]);let g=async()=>{if(!i.trim())return void d({type:"ERROR",error:"Please enter an access token"});if(!u.trim())return void d({type:"ERROR",error:"Please enter a machine ID"});let a=f.current;d({type:"IMPORT_START"});try{let s=await fetch("/api/oauth/cursor/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:i.trim(),machineId:u.trim()})}),n=await s.json();if(!s.ok)throw Error(n.error||"Import failed");if(a!==f.current||!e)return;r?.(),t()}catch(r){a===f.current&&e&&d({type:"IMPORT_DONE",error:r.message})}};return(0,a.jsx)(n.Modal,{isOpen:e,title:"Connect Cursor IDE",onClose:t,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[h&&(0,a.jsxs)("div",{className:"text-center py-6",children:[(0,a.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting tokens..."}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Cursor IDE database"})]}),!h&&(0,a.jsxs)(a.Fragment,{children:[b&&(0,a.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,a.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Tokens auto-detected from Cursor IDE successfully!"})]})}),p&&(0,a.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800 flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,a.jsx)("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:"Could not read Cursor database automatically."})]}),(0,a.jsxs)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:["Make sure Cursor IDE has been opened at least once, then click ",(0,a.jsx)("strong",{children:"Retry"}),". If the problem persists, paste your tokens manually below."]}),(0,a.jsx)(n.Button,{onClick:T,variant:"outline",fullWidth:!0,children:"Retry"})]}),!b&&!p&&!m&&(0,a.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,a.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Cursor IDE not detected. Please paste your tokens manually."})]})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"cursor-access-token",className:"block text-sm font-medium mb-2",children:["Access Token ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("textarea",{id:"cursor-access-token",value:i,onChange:e=>d({type:"SET_TOKEN",value:e.target.value}),placeholder:"Access token will be auto-filled...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"cursor-machine-id",className:"block text-sm font-medium mb-2",children:["Machine ID ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)(n.Input,{id:"cursor-machine-id",value:u,onChange:e=>d({type:"SET_MACHINE_ID",value:e.target.value}),placeholder:"Machine ID will be auto-filled...",className:"font-mono text-sm"})]}),m&&(0,a.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,a.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:m})}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.Button,{onClick:g,fullWidth:!0,disabled:x||!i.trim()||!u.trim(),children:x?"Importing...":"Import Token"}),(0,a.jsx)(n.Button,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9146],{9146:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var s=r(15102),i=r(82030),l=r(92940);function o({isOpen:e,onSuccess:t,onClose:r}){let[a,n]=(0,i.useState)(""),[c,d]=(0,i.useState)(!1),[u,x]=(0,i.useState)(null),[m,h]=(0,i.useState)(!1),p=(0,i.useRef)(0);(0,i.useEffect)(()=>{e||(p.current+=1)},[e]);let f=async()=>{if(!a.trim())return void x("Please paste your cookie");let r=++p.current;d(!0),x(null);try{let s=await fetch("/api/oauth/iflow/cookie",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cookie:a.trim()})}),i=await s.json();if(!s.ok)throw Error(i.error||"Authentication failed");if(r!==p.current||!e)return;h(!0),setTimeout(()=>{r===p.current&&e&&(t?.(),y())},1500)}catch(t){r===p.current&&e&&x(t.message)}finally{r===p.current&&d(!1)}},y=()=>{p.current+=1,n(""),x(null),h(!1),r?.()};return(0,s.jsx)(l.Modal,{isOpen:e,onClose:y,title:"iFlow Cookie Authentication",children:(0,s.jsx)("div",{className:"space-y-4",children:m?(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)("div",{className:"text-6xl mb-4",children:"✅"}),(0,s.jsx)("p",{className:"text-lg font-medium text-text-primary",children:"Authentication Successful!"}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Fresh API key obtained"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["To get a fresh API key, paste your browser cookie from"," ",(0,s.jsx)("a",{href:"https://platform.iflow.cn",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"platform.iflow.cn"})]}),(0,s.jsxs)("div",{className:"bg-surface-secondary p-3 rounded-lg text-xs space-y-2",children:[(0,s.jsx)("p",{className:"font-medium text-text-primary",children:"How to get cookie:"}),(0,s.jsxs)("ol",{className:"list-decimal list-inside space-y-1 text-text-muted",children:[(0,s.jsx)("li",{children:"Open platform.iflow.cn in your browser"}),(0,s.jsx)("li",{children:"Login to your account"}),(0,s.jsx)("li",{children:"Open DevTools (F12) → Application/Storage → Cookies"}),(0,s.jsx)("li",{children:"Copy the entire cookie string (must include BXAuth)"}),(0,s.jsx)("li",{children:"Paste it below"})]})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{htmlFor:"iflow-cookie-string",className:"block text-sm font-medium text-text-primary",children:"Cookie String"}),(0,s.jsx)("textarea",{id:"iflow-cookie-string",value:a,onChange:e=>n(e.target.value),placeholder:"BXAuth=xxx; ...",className:"w-full px-3 py-2 bg-surface-secondary border border-border rounded-lg text-sm text-text-primary placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-primary resize-none",rows:4,disabled:c})]}),u&&(0,s.jsx)("div",{className:"p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,s.jsx)("p",{className:"text-sm text-error",children:u})}),(0,s.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,s.jsx)(l.Button,{variant:"secondary",onClick:y,disabled:c,fullWidth:!0,children:"Cancel"}),(0,s.jsx)(l.Button,{onClick:f,loading:c,fullWidth:!0,children:"Authenticate"})]})]})})})}}}]);
|
|
@@ -9,4 +9,4 @@ sk-key-only-auto-named`:O,[J,q]=(0,i.useState)("single"),[W,H]=(0,i.useState)(""
|
|
|
9
9
|
"idToken": "eyJhbGc...",
|
|
10
10
|
"email": "user@example.com"
|
|
11
11
|
}
|
|
12
|
-
]`;function R({isOpen:e,onClose:t,onSuccess:a}){let[l,o]=(0,i.useState)(""),[r,n]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[p,x]=(0,i.useState)(null),u=()=>{r||(o(""),m(""),x(null),t())},h=async()=>{var e;let t;m(""),x(null);let s=l.trim();if(!s)return;try{t=JSON.parse(s)}catch(e){m(`${(0,j.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void m((0,j.Tl)("No accounts found in input"));n(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:i})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof a&&a()}catch(e){m(e.message||(0,j.Tl)("Request failed"))}finally{n(!1)}},f=p?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(d.Modal,{isOpen:e,title:(0,j.Tl)("Bulk Add Codex Accounts"),onClose:u,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,j.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,s.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:M,value:l,onChange:e=>o(e.target.value),disabled:r}),c&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),p&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,j.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,j.Tl)("failed")}`:""]}),f.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:h,fullWidth:!0,disabled:r||!l.trim(),children:r?(0,j.Tl)("Importing..."):(0,j.Tl)("Import All")}),(0,s.jsx)(d.Button,{onClick:u,variant:"ghost",fullWidth:!0,disabled:r,children:(0,j.Tl)("Close")})]})]})})}let K={claude:"claudeAutoPing",codex:"codexAutoPing"};function L(){let e,t=(0,l.useParams)(),a=(0,l.useRouter)(),o=t.id,{getCaps:p}=(0,v.y)(),[x,u]=(0,i.useState)([]),[h,f]=(0,i.useState)(!0),[g,w]=(0,i.useState)(null),[S,T]=(0,i.useState)([]),[I,$]=(0,i.useState)(!1),[E,O]=(0,i.useState)(!1),[_,z]=(0,i.useState)(!1),[M,L]=(0,i.useState)(""),[F,J]=(0,i.useState)(!1),[q,W]=(0,i.useState)(!1),[H,V]=(0,i.useState)(!1),[G,Q]=(0,i.useState)(!1),[X,Y]=(0,i.useState)(null),[Z,ee]=(0,i.useState)({}),[et,ea]=(0,i.useState)([]),[es,ei]=(0,i.useState)(!1),[el,eo]=(0,i.useState)({}),[er,en]=(0,i.useState)(""),[ed,ec]=(0,i.useState)(()=>new Set),[em,ep]=(0,i.useState)(!1),[ex,eu]=(0,i.useState)([]),[eh,ef]=(0,i.useState)(1),[eg,ey]=(0,i.useState)("__none__"),[eb,ev]=(0,i.useState)(!1),[ej,ew]=(0,i.useState)(null),[ek,eN]=(0,i.useState)(""),[eC,eS]=(0,i.useState)("auto"),[eA,eT]=(0,i.useState)({enabled:!1,connections:{}}),[eI,eP]=(0,i.useState)([]),[e$,eE]=(0,i.useState)([]),[eO,eD]=(0,i.useState)([]),[e_,eU]=(0,i.useState)([]),[ez,eB]=(0,i.useState)(null),[eM,eR]=(0,i.useState)(!1),[eK,eL]=(0,i.useState)(!1),[eF,eJ]=(0,i.useState)(!1),[eq,eW]=(0,i.useState)(null),[eH,eV]=(0,i.useState)({}),[eG,eQ]=(0,i.useState)(null),eX=(0,i.useRef)(!1),[eY,eZ]=(0,i.useState)(!1),{copied:e0,copy:e1}=(0,b.C)(),e2="ag_risk_confirmed",e5=()=>{$(!0)},e3=()=>{"antigravity"===o&&"true"!==window.localStorage.getItem(e2)?eR(!0):e9?e5():(L(""),z(!0))},e4=()=>{L(""),z(!0)},e6=()=>{e9?e3():e4()},e8=g?{id:g.id,name:g.name||("anthropic-compatible"===g.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===g.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===g.type?"AC":"OC",apiType:g.apiType,baseUrl:g.baseUrl,type:g.type}:c.zN[o]||c.fg[o]||c.IS[o]||c.nJ[o]||c.br[o],e7=e8?.authModes||[],e9=!!c.zN[o]||!!c.IS[o]||e7.includes("oauth"),te=!!c.fg[o]||e7.includes("apikey"),tt=!!c.IS[o]?.noAuth,ta=(0,m.KC)(o),ts="cursor"===o&&e$.length>0?e$:ta,ti=(0,c.wG)(o),tl=(0,c.mq)(o),to=(0,c.gb)(o),tr=tl||to,tn=!tr&&e9&&te,td="xai"===o?"Grok Build OAuth":"grok-cli"===o?"Grok CLI Device Login":"kimi"===o?"Kimi Coding OAuth":"OAuth",tc="xai"===o?"xAI API Key":"kimi"===o?"Kimi API Key":"API Key",tm=e=>{if(!eC||"auto"===eC)return null;let t=y(o,e);return t&&t.includes(eC)?eC:null},tp=tr?o:ti,tx=(()=>{let e=new Set,t=new Set,a=a=>{if(!a||t.has(a))return;t.add(a);let s=y(o,a);s&&s.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of ts)a(e.id);for(let e of eO)a(e.id);for(let e of et)e.providerAlias===tp&&"llm"===(e.kind||e.type||"llm")&&a(e.id);return e.size?["auto",...e]:null})(),tu=tr?g?.prefix||o:ti,th=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tp)}`,{cache:"no-store"}),t=await e.json();e.ok&&eU(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tp]),tf=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tp,ids:[e]})})).ok&&await th()}catch(e){console.log("Error disabling model:",e)}},tg=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tp)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await th()}catch(e){console.log("Error enabling model:",e)}},ty=async e=>{e.length&&eB({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eB(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tp,ids:e})})).ok&&await th()}catch(e){console.log("Error disabling all models:",e)}}})},tb=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tp)}`,{method:"DELETE"})).ok&&await th()}catch(e){console.log("Error enabling all models:",e)}},tv=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ee(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tj=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ea(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===o&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eD(e.models)}).catch(()=>{})},[o]);let tw=(0,i.useCallback)(async()=>{try{let[e,t,a,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),i=await e.json(),l=await t.json(),r=await a.json(),n=s.ok?await s.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===o);u(e)}a.ok&&T(r.proxyPools||[]);let d=(n.providerStrategies||{})[o]||{};ew(d.fallbackStrategy||null),eN(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(n.providerThinking||{})[o]||{};eS(c.mode||"auto");let m=K[o],p=m&&n[m]||{};if(eT({enabled:!0===p.enabled,connections:p.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===o)||null;if(!e&&tr)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===o)||null))break}w(e)}}catch(e){console.log("Error fetching connections:",e)}finally{f(!1)}},[o,tr]),tk=async e=>{try{let t=await fetch(`/api/provider-nodes/${o}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(w(a.node),await tw(),V(!1))}catch(e){console.log("Error updating provider node:",e)}},tN=async(e,t)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),s=(a.ok?await a.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...s};0===Object.keys(i).length?delete l[o]:l[o]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tC=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?a[o]={mode:e}:delete a[o],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:a})})}catch(e){console.log("Error saving thinking config:",e)}},tS=async e=>{let t=K[o];if(t){eT(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,i.useEffect)(()=>{tw(),tv(),tj(),th()},[tw,tv,tj,th]),(0,i.useEffect)(()=>{if("cursor"!==o)return void eE([]);let e=x.find(e=>!1!==e.isActive);if(!e?.id)return void eE([]);let t=!1;return fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json()})).then(({ok:e,data:a})=>{!t&&e&&Array.isArray(a.models)&&a.models.length>0&&eE(a.models)}).catch(()=>{}),()=>{t=!0}},[o,x]),(0,i.useEffect)(()=>{let e=(c.zN[o]||c.fg[o]||c.IS[o]||c.nJ[o])?.modelsFetcher;e&&k(e).then(eP)},[o]);let tA=async(e,t,a=ti)=>{let s=`${a}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await tv();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tT=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tv()}catch(e){console.log("Error deleting alias:",e)}},tI=async(e,t="llm",a=tp)=>{try{let s=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:a,id:e,type:t})});if(s.ok)await tj(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await s.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tP=async(e,t="llm",a=tp)=>{try{let s=new URLSearchParams({providerAlias:a,id:e,type:t});(await fetch(`/api/models/custom?${s}`,{method:"DELETE"})).ok&&(await tj(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},t$=async()=>{if(eY)return;let e=x.find(e=>!1!==e.isActive);if(!e)return void alert((0,j.Tl)("Please add an active Qoder connection first"));eZ(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||(0,j.Tl)("Failed to fetch models"));let s=a.models||[];if(0===s.length)return void alert((0,j.Tl)("No models returned"));let i=0;for(let e of s){let t=e.id||e.name;if(!t)continue;let a=t.replace(/^qoder\//,"");et.some(e=>e.providerAlias===tp&&e.id===a&&"llm"===(e.kind||e.type||"llm"))||Object.values(Z).includes(`${tp}/${a}`)||(await tI(a,"llm",tp),i+=1)}0===i?alert((0,j.Tl)("All models already exist, no new models added")):alert((0,j.Tl)("Successfully added")+` ${i} `+(0,j.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,j.Tl)("Error fetching models")+": "+e.message)}finally{eZ(!1)}},tE=async()=>{if(eK||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eX.current=!1,eL(!0),eJ(!1),eW(null),eV(e),eQ({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,a=0;try{for(let e=0;e<x.length;e+=1){if(eX.current){eQ({total:x.length,completed:e,passed:t,failed:a,stopped:!0});break}let s=x[e];eW(s.id),eV(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:a+=1,eV(e=>({...e,[s.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){a+=1,eV(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}eQ({total:x.length,completed:e+1,passed:t,failed:a,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eW(null),eL(!1),eJ(!1),eX.current=!1}},tO=async e=>{eB({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eB(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&u(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tD=()=>{tw(),$(!1)},t_=async e=>{L("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:o,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok){await tw(),z(!1);return}L(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),L("Failed to save connection")}},tU=async e=>{try{(await fetch(`/api/providers/${X.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tw(),W(!1))}catch(e){console.log("Error updating connection:",e)}},tz=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&u(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("Error updating connection status:",e)}},tB=async(e,t)=>{let a=[...x];[a[e],a[t]]=[a[t],a[e]],u(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tw()}},tM=x.filter(e=>ex.includes(e.id)),{currentPage:tR,totalPages:tK,items:tL,start:tF}=function(e=[],t=1){let a=Array.isArray(e)?e:[],s=a.length,i=Math.max(1,Math.ceil(s/10)),l=Math.floor(Number(t)),o=Math.min(Number.isFinite(l)&&l>0?l:1,i),r=(o-1)*10,n=a.slice(r,r+10);return{currentPage:o,totalPages:i,totalItems:s,start:r,items:n,pageSize:10}}(x,eh),tJ=x.length>0&&ex.length===x.length;(0,i.useEffect)(()=>{eu(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tM.length)return;let e=new Set(tM.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let a=S.find(e=>e.id===t);return a?.name}})();let tq=()=>{eb||Q(!1)},tW=async e=>{ev(!0);try{let t=0;for(let{connectionId:a,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",a,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tw(),Q(!1)}finally{ev(!1)}},tH=e=>tW(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tV=(0,s.jsxs)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:[tL.map((e,t)=>{let a,i=tF+t;return(0,s.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,s.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,s.jsx)("input",{type:"checkbox",checked:(a=e.id,ex.includes(a)),onChange:()=>{var t;return t=e.id,void eu(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(P,{connection:e,proxyPools:S,isOAuth:e9,isFirst:0===i,isLast:i===x.length-1,onMoveUp:()=>tB(i,i-1),onMoveDown:()=>tB(i,i+1),onToggleActive:t=>tz(e.id,t),autoPing:K[o]&&"oauth"===e.authType?{on:!0===eA.connections[e.id],onToggle:t=>{var a;return a=e.id,void tS({...eA,connections:{...eA.connections,[a]:t}})},provider:o}:null,onUpdateProxy:async t=>{try{let a="object"==typeof t?t:{proxyPoolId:t||null};if((await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok){let t={...e.providerSpecificData};a.proxyPoolIds?(t.proxyPoolIds=a.proxyPoolIds,t.proxyRotationStrategy=a.proxyRotationStrategy,delete t.proxyPoolId):(a.proxyPoolId?t.proxyPoolId=a.proxyPoolId:delete t.proxyPoolId,delete t.proxyPoolIds,delete t.proxyRotationStrategy),u(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:t}:a))}}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{Y(e),W(!0)},onDelete:()=>tO(e.id),oneByOneStatus:eH[e.id]||null})})]},e.id)}),x.length>10&&(0,s.jsx)(d.Pagination,{currentPage:tR,pageSize:10,totalItems:x.length,onPageChange:ef})]}),tG=S.filter(e=>!0===e.isActive),tQ=(0,s.jsx)(d.Modal,{isOpen:G,onClose:tq,title:`Apply Proxy (${x.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=S.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tW(x.map((t,a)=>({connectionId:t.id,proxyPoolId:e[a%e.length].id})))},disabled:eb||0===tG.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>tH(null),disabled:eb,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),S.map(e=>(0,s.jsxs)("button",{onClick:()=>tH(e.id),disabled:eb||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eb&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(d.Button,{onClick:tq,variant:"ghost",fullWidth:!0,disabled:eb,children:"Cancel"})]})}),tX=async e=>{if(!ed.has(e)){ec(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tp}/${e}`})}),a=await t.json();eo(t=>({...t,[e]:a.ok?"ok":"error"})),en(a.ok?"":a.error||"Model not reachable")}catch{eo(t=>({...t,[e]:"error"})),en("Network error")}finally{ec(t=>{let a=new Set(t);return a.delete(e),a})}}};return h?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(d.CardSkeleton,{}),(0,s.jsx)(d.CardSkeleton,{})]}):e8?(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)(r(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)(n.A,{providerId:e8.id,size:48,alt:e8.name,className:"shrink-0 rounded-lg",fallbackText:e8.textIcon||e8.id.slice(0,2).toUpperCase(),fallbackColor:e8.color}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e8.name}),(e8.notice?.apiKeyUrl||e8.notice?.signupUrl||e8.website)&&(0,s.jsxs)("a",{href:e8.notice?.apiKeyUrl||e8.notice?.signupUrl||e8.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e8.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),e8.deprecated&&(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e8.deprecationNotice})]}),e8.notice?.text&&!e8.deprecated&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e8.notice.text}),e8.notice.apiKeyUrl&&(0,s.jsx)("a",{href:e8.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 →"})]}),tr&&g&&(0,s.jsx)(d.Card,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:to?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[to?"Messages API":"responses"===g.apiType?"Responses API":"Chat Completions"," \xb7 ",(g.baseUrl||"").replace(/\/$/,""),"/",to?"messages":"responses"===g.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:()=>{L(""),z(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>V(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eB({title:"Delete Compatible Node",message:`Delete this ${to?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eB(null);try{(await fetch(`/api/provider-nodes/${o}`,{method:"DELETE"})).ok&&a.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tt?(0,s.jsx)(d.NoAuthProxyCard,{providerId:o}):(0,s.jsxs)(d.Card,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[x.length>0&&S.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>Q(!0),children:"Apply Proxy"}),x.length>0&&(0,s.jsxs)(s.Fragment,{children:[ex.length>0&&(0,s.jsxs)(d.Button,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=ex.length;0!==e&&eB({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eB(null);let e=0,t=[...ex];for(let a of t)try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}u(e=>e.filter(e=>!t.includes(e.id))),eu([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",ex.length,")"]}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"sync",onClick:tE,disabled:eK,children:eK?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eK&&(0,s.jsx)(d.Button,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eK&&(eX.current=!0,eJ(!0))},disabled:eF,children:eF?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,s.jsx)(d.Toggle,{checked:"round-robin"===ej,onChange:e=>{let t=e?"round-robin":null,a=e?ek||"1":ek;e&&!ek&&eN("1"),ew(t),tN(t,a)}}),"round-robin"===ej&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:ek,onChange:e=>{var t;eN(t=e.target.value),tN("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===x.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e9?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tn&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",td," or ",tc,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:tn?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:e3,children:td}),(0,s.jsx)(d.Button,{size:"sm",icon:"key",onClick:e4,children:tc})]}):(0,s.jsxs)(s.Fragment,{children:[!tr&&"iflow"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>O(!0),children:"Cookie"}),"codex"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>J(!0),children:(0,j.Tl)("Bulk Add")}),(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:e6,children:tr?"Add API Key":"iflow"===o?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[eG&&(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",eG.total]}),(0,s.jsxs)("span",{children:["Completed: ",eG.completed]}),(0,s.jsxs)("span",{children:["Passed: ",eG.passed]}),(0,s.jsxs)("span",{children:["Failed: ",eG.failed]}),eG.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eK&&eq&&(0,s.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eq)?.name||eq]})]})}),x.length>0&&(0,s.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("input",{type:"checkbox",checked:tJ,onChange:()=>{tJ?eu([]):eu(x.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),tV,!tr&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>O(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>J(!0),title:(0,j.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,j.Tl)("Bulk Add")}),tn?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:e3,className:"w-full sm:w-auto",children:td}),(0,s.jsx)(d.Button,{size:"sm",icon:"key",onClick:e4,className:"w-full sm:w-auto",children:tc})]}):(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:e6,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsxs)(d.Card,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),tx&&(0,s.jsx)("select",{value:eC,onChange:e=>{var t;eS(t=e.target.value),tC(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:tx.map(e=>(0,s.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!tr&&(e=[...ts,...eO.filter(e=>!ts.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!e_.includes(e)),(0,s.jsxs)("div",{className:"flex gap-2",children:[e_.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tb,children:"Active All"}),e.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"block",onClick:()=>ty(e),children:"Disable All"})]}))]}),!!er&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:er}),(()=>{let e,t,a;if(tr)return(0,s.jsx)(A,{providerStorageAlias:tp,providerDisplayAlias:tu,modelAliases:Z,customModels:et,copied:e0,onCopy:e1,onSetAlias:tA,onDeleteAlias:tT,onAddCustomModel:e=>tI(e,"llm",tp),onDeleteCustomModel:e=>tP(e,"llm",tp),connections:x,isAnthropic:to});let i=[...ts,...eO.filter(e=>!ts.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),l=new Set(e_),r=i.filter(e=>!l.has(e.id)),n=i.filter(e=>l.has(e.id)),d=N({customModels:et,modelAliases:Z,providerAlias:tp,builtInModels:ts,type:"llm"});return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,s.jsx)(C,{model:{id:e.id,name:e.name},fullModel:`${tu}/${e.id}`,alias:e.alias,copied:e0,onCopy:e1,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tP(e.id,"llm",tp):tT(e.alias)},testStatus:el[e.id],onTest:x.length>0||tt?()=>tX(e.id):void 0,isTesting:ed.has(e.id),isCustom:!0,isFree:!1,caps:p(`${o}/${e.id}`),thinkingSuffix:tm(e.id)},`${e.source}-${e.fullModel}`)),r.map(e=>{let t=`${tp}/${e.id}`,a=`${o}/${e.id}`,i=Object.entries(Z).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(C,{model:e,fullModel:`${tu}/${e.id}`,alias:i,copied:e0,onCopy:e1,onSetAlias:t=>tA(e.id,t,tp),onDeleteAlias:()=>tT(i),testStatus:el[e.id],onTest:x.length>0||tt?()=>tX(e.id):void 0,isTesting:ed.has(e.id),isFree:e.isFree,onDisable:()=>tf(e.id),caps:p(`${o}/${e.id}`),thinkingSuffix:tm(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>ep(!0),className:"flex w-full items-center justify-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 sm:w-auto",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===o&&x.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:t$,disabled:eY,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:eY?{animation:"spin 1s linear infinite"}:void 0,children:eY?"progress_activity":"download"}),eY?(0,j.Tl)("Fetching..."):(0,j.Tl)("Fetch Qoder Models")]}),eI.length>0&&(e=new Set([...Object.values(Z),...d.map(e=>e.fullModel)]),t=new Set(ts.map(e=>e.id)),0===(a=eI.filter(a=>!e.has(`${tp}/${a.id}`)&&!t.has(a.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>(0,s.jsxs)("button",{onClick:async()=>{await tI(e.id,"llm",tp)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),n.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",n.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,s.jsxs)("button",{onClick:()=>tg(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tQ,"kiro"===o?(0,s.jsx)(d.KiroOAuthWrapper,{isOpen:I,providerInfo:e8,onSuccess:tD,onClose:()=>$(!1)}):"cursor"===o?(0,s.jsx)(d.CursorAuthModal,{isOpen:I,onSuccess:tD,onClose:()=>$(!1)}):"gitlab"===o?(0,s.jsx)(d.GitLabAuthModal,{isOpen:I,providerInfo:e8,onSuccess:tD,onClose:()=>$(!1)}):(0,s.jsx)(d.OAuthModal,{isOpen:I,provider:o,providerInfo:e8,onSuccess:tD,onClose:()=>$(!1)}),"iflow"===o&&(0,s.jsx)(d.IFlowCookieModal,{isOpen:E,onSuccess:()=>{tw(),O(!1)},onClose:()=>O(!1)}),(0,s.jsx)(D,{isOpen:_,provider:o,providerName:e8.name,isCompatible:tr,isAnthropic:to,authType:e8?.authType,authHint:e8?.authHint,website:e8?.website,proxyPools:S,error:M,existingNames:x.map(e=>e.name).filter(Boolean),onSave:t_,onBulkDone:tw,onClose:()=>{L(""),z(!1)}}),(0,s.jsx)(d.EditConnectionModal,{isOpen:q,connection:X,proxyPools:S,onSave:tU,onClose:()=>W(!1)}),tr&&(0,s.jsx)(U,{isOpen:H,node:g,onSave:tk,onClose:()=>V(!1),isAnthropic:to}),!tr&&(0,s.jsx)(B,{isOpen:em,providerAlias:tp,providerDisplayAlias:tu,onSave:async e=>{await tI(e,"llm",tp),ep(!1)},onClose:()=>ep(!1)}),"codex"===o&&(0,s.jsx)(R,{isOpen:F,onClose:()=>J(!1),onSuccess:tw}),(0,s.jsx)(d.ConfirmModal,{isOpen:eM,onClose:()=>eR(!1),onConfirm:()=>{(window.localStorage.setItem(e2,"true"),eR(!1),e9)?e5():e4()},title:"Risk Notice",message:e8?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(d.ConfirmModal,{isOpen:!!ez,onClose:()=>eB(null),onConfirm:ez?.onConfirm,title:ez?.title||"Confirm",message:ez?.message,variant:"danger"})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(r(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},21863:(e,t,a)=>{"use strict";function s(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}a.d(t,{g:()=>s})},68810:(e,t,a)=>{Promise.resolve().then(a.bind(a,6))}},e=>{e.O(0,[3885,2318,4385,2940,7236,5479,2147,3204,7358],()=>e(e.s=68810)),_N_E=e.O()}]);
|
|
12
|
+
]`;function R({isOpen:e,onClose:t,onSuccess:a}){let[l,o]=(0,i.useState)(""),[r,n]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[p,x]=(0,i.useState)(null),u=()=>{r||(o(""),m(""),x(null),t())},h=async()=>{var e;let t;m(""),x(null);let s=l.trim();if(!s)return;try{t=JSON.parse(s)}catch(e){m(`${(0,j.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void m((0,j.Tl)("No accounts found in input"));n(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:i})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof a&&a()}catch(e){m(e.message||(0,j.Tl)("Request failed"))}finally{n(!1)}},f=p?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(d.Modal,{isOpen:e,title:(0,j.Tl)("Bulk Add Codex Accounts"),onClose:u,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,j.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,s.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:M,value:l,onChange:e=>o(e.target.value),disabled:r}),c&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),p&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,j.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,j.Tl)("failed")}`:""]}),f.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:h,fullWidth:!0,disabled:r||!l.trim(),children:r?(0,j.Tl)("Importing..."):(0,j.Tl)("Import All")}),(0,s.jsx)(d.Button,{onClick:u,variant:"ghost",fullWidth:!0,disabled:r,children:(0,j.Tl)("Close")})]})]})})}let K={claude:"claudeAutoPing",codex:"codexAutoPing"};function L(){let e,t=(0,l.useParams)(),a=(0,l.useRouter)(),o=t.id,{getCaps:p}=(0,v.y)(),[x,u]=(0,i.useState)([]),[h,f]=(0,i.useState)(!0),[g,w]=(0,i.useState)(null),[S,T]=(0,i.useState)([]),[I,$]=(0,i.useState)(!1),[E,O]=(0,i.useState)(!1),[_,z]=(0,i.useState)(!1),[M,L]=(0,i.useState)(""),[F,J]=(0,i.useState)(!1),[q,W]=(0,i.useState)(!1),[H,V]=(0,i.useState)(!1),[G,Q]=(0,i.useState)(!1),[X,Y]=(0,i.useState)(null),[Z,ee]=(0,i.useState)({}),[et,ea]=(0,i.useState)([]),[es,ei]=(0,i.useState)(!1),[el,eo]=(0,i.useState)({}),[er,en]=(0,i.useState)(""),[ed,ec]=(0,i.useState)(()=>new Set),[em,ep]=(0,i.useState)(!1),[ex,eu]=(0,i.useState)([]),[eh,ef]=(0,i.useState)(1),[eg,ey]=(0,i.useState)("__none__"),[eb,ev]=(0,i.useState)(!1),[ej,ew]=(0,i.useState)(null),[ek,eN]=(0,i.useState)(""),[eC,eS]=(0,i.useState)("auto"),[eA,eT]=(0,i.useState)({enabled:!1,connections:{}}),[eI,eP]=(0,i.useState)([]),[e$,eE]=(0,i.useState)([]),[eO,eD]=(0,i.useState)([]),[e_,eU]=(0,i.useState)([]),[ez,eB]=(0,i.useState)(null),[eM,eR]=(0,i.useState)(!1),[eK,eL]=(0,i.useState)(!1),[eF,eJ]=(0,i.useState)(!1),[eq,eW]=(0,i.useState)(null),[eH,eV]=(0,i.useState)({}),[eG,eQ]=(0,i.useState)(null),eX=(0,i.useRef)(!1),[eY,eZ]=(0,i.useState)(!1),{copied:e0,copy:e1}=(0,b.C)(),e2="ag_risk_confirmed",e5=()=>{$(!0)},e3=()=>{"antigravity"===o&&"true"!==window.localStorage.getItem(e2)?eR(!0):e9?e5():(L(""),z(!0))},e4=()=>{L(""),z(!0)},e6=()=>{e9?e3():e4()},e8=g?{id:g.id,name:g.name||("anthropic-compatible"===g.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===g.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===g.type?"AC":"OC",apiType:g.apiType,baseUrl:g.baseUrl,type:g.type}:c.zN[o]||c.fg[o]||c.IS[o]||c.nJ[o]||c.br[o],e7=e8?.authModes||[],e9=!!c.zN[o]||!!c.IS[o]||e7.includes("oauth"),te=!!c.fg[o]||e7.includes("apikey"),tt=!!c.IS[o]?.noAuth,ta=(0,m.KC)(o),ts="cursor"===o&&e$.length>0?e$:ta,ti=(0,c.wG)(o),tl=(0,c.mq)(o),to=(0,c.gb)(o),tr=tl||to,tn=!tr&&e9&&te,td="xai"===o?"Grok Build OAuth":"grok-cli"===o?"Grok CLI Device Login":"kimi"===o?"Kimi Coding OAuth":"OAuth",tc="xai"===o?"xAI API Key":"kimi"===o?"Kimi API Key":"qoder"===o?"PAT":"API Key",tm=e=>{if(!eC||"auto"===eC)return null;let t=y(o,e);return t&&t.includes(eC)?eC:null},tp=tr?o:ti,tx=(()=>{let e=new Set,t=new Set,a=a=>{if(!a||t.has(a))return;t.add(a);let s=y(o,a);s&&s.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of ts)a(e.id);for(let e of eO)a(e.id);for(let e of et)e.providerAlias===tp&&"llm"===(e.kind||e.type||"llm")&&a(e.id);return e.size?["auto",...e]:null})(),tu=tr?g?.prefix||o:ti,th=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tp)}`,{cache:"no-store"}),t=await e.json();e.ok&&eU(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tp]),tf=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tp,ids:[e]})})).ok&&await th()}catch(e){console.log("Error disabling model:",e)}},tg=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tp)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await th()}catch(e){console.log("Error enabling model:",e)}},ty=async e=>{e.length&&eB({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eB(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tp,ids:e})})).ok&&await th()}catch(e){console.log("Error disabling all models:",e)}}})},tb=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tp)}`,{method:"DELETE"})).ok&&await th()}catch(e){console.log("Error enabling all models:",e)}},tv=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ee(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tj=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ea(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===o&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eD(e.models)}).catch(()=>{})},[o]);let tw=(0,i.useCallback)(async()=>{try{let[e,t,a,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),i=await e.json(),l=await t.json(),r=await a.json(),n=s.ok?await s.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===o);u(e)}a.ok&&T(r.proxyPools||[]);let d=(n.providerStrategies||{})[o]||{};ew(d.fallbackStrategy||null),eN(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(n.providerThinking||{})[o]||{};eS(c.mode||"auto");let m=K[o],p=m&&n[m]||{};if(eT({enabled:!0===p.enabled,connections:p.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===o)||null;if(!e&&tr)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===o)||null))break}w(e)}}catch(e){console.log("Error fetching connections:",e)}finally{f(!1)}},[o,tr]),tk=async e=>{try{let t=await fetch(`/api/provider-nodes/${o}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(w(a.node),await tw(),V(!1))}catch(e){console.log("Error updating provider node:",e)}},tN=async(e,t)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),s=(a.ok?await a.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...s};0===Object.keys(i).length?delete l[o]:l[o]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tC=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?a[o]={mode:e}:delete a[o],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:a})})}catch(e){console.log("Error saving thinking config:",e)}},tS=async e=>{let t=K[o];if(t){eT(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,i.useEffect)(()=>{tw(),tv(),tj(),th()},[tw,tv,tj,th]),(0,i.useEffect)(()=>{if("cursor"!==o)return void eE([]);let e=x.find(e=>!1!==e.isActive);if(!e?.id)return void eE([]);let t=!1;return fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json()})).then(({ok:e,data:a})=>{!t&&e&&Array.isArray(a.models)&&a.models.length>0&&eE(a.models)}).catch(()=>{}),()=>{t=!0}},[o,x]),(0,i.useEffect)(()=>{let e=(c.zN[o]||c.fg[o]||c.IS[o]||c.nJ[o])?.modelsFetcher;e&&k(e).then(eP)},[o]);let tA=async(e,t,a=ti)=>{let s=`${a}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await tv();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tT=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tv()}catch(e){console.log("Error deleting alias:",e)}},tI=async(e,t="llm",a=tp)=>{try{let s=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:a,id:e,type:t})});if(s.ok)await tj(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await s.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tP=async(e,t="llm",a=tp)=>{try{let s=new URLSearchParams({providerAlias:a,id:e,type:t});(await fetch(`/api/models/custom?${s}`,{method:"DELETE"})).ok&&(await tj(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},t$=async()=>{if(eY)return;let e=x.find(e=>!1!==e.isActive);if(!e)return void alert((0,j.Tl)("Please add an active Qoder connection first"));eZ(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||(0,j.Tl)("Failed to fetch models"));let s=a.models||[];if(0===s.length)return void alert((0,j.Tl)("No models returned"));let i=0;for(let e of s){let t=e.id||e.name;if(!t)continue;let a=t.replace(/^qoder\//,"");et.some(e=>e.providerAlias===tp&&e.id===a&&"llm"===(e.kind||e.type||"llm"))||Object.values(Z).includes(`${tp}/${a}`)||(await tI(a,"llm",tp),i+=1)}0===i?alert((0,j.Tl)("All models already exist, no new models added")):alert((0,j.Tl)("Successfully added")+` ${i} `+(0,j.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,j.Tl)("Error fetching models")+": "+e.message)}finally{eZ(!1)}},tE=async()=>{if(eK||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eX.current=!1,eL(!0),eJ(!1),eW(null),eV(e),eQ({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,a=0;try{for(let e=0;e<x.length;e+=1){if(eX.current){eQ({total:x.length,completed:e,passed:t,failed:a,stopped:!0});break}let s=x[e];eW(s.id),eV(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:a+=1,eV(e=>({...e,[s.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){a+=1,eV(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}eQ({total:x.length,completed:e+1,passed:t,failed:a,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eW(null),eL(!1),eJ(!1),eX.current=!1}},tO=async e=>{eB({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eB(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&u(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tD=()=>{tw(),$(!1)},t_=async e=>{L("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:o,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok){await tw(),z(!1);return}L(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),L("Failed to save connection")}},tU=async e=>{try{(await fetch(`/api/providers/${X.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tw(),W(!1))}catch(e){console.log("Error updating connection:",e)}},tz=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&u(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("Error updating connection status:",e)}},tB=async(e,t)=>{let a=[...x];[a[e],a[t]]=[a[t],a[e]],u(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tw()}},tM=x.filter(e=>ex.includes(e.id)),{currentPage:tR,totalPages:tK,items:tL,start:tF}=function(e=[],t=1){let a=Array.isArray(e)?e:[],s=a.length,i=Math.max(1,Math.ceil(s/10)),l=Math.floor(Number(t)),o=Math.min(Number.isFinite(l)&&l>0?l:1,i),r=(o-1)*10,n=a.slice(r,r+10);return{currentPage:o,totalPages:i,totalItems:s,start:r,items:n,pageSize:10}}(x,eh),tJ=x.length>0&&ex.length===x.length;(0,i.useEffect)(()=>{eu(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tM.length)return;let e=new Set(tM.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let a=S.find(e=>e.id===t);return a?.name}})();let tq=()=>{eb||Q(!1)},tW=async e=>{ev(!0);try{let t=0;for(let{connectionId:a,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",a,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tw(),Q(!1)}finally{ev(!1)}},tH=e=>tW(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tV=(0,s.jsxs)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:[tL.map((e,t)=>{let a,i=tF+t;return(0,s.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,s.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,s.jsx)("input",{type:"checkbox",checked:(a=e.id,ex.includes(a)),onChange:()=>{var t;return t=e.id,void eu(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(P,{connection:e,proxyPools:S,isOAuth:e9,isFirst:0===i,isLast:i===x.length-1,onMoveUp:()=>tB(i,i-1),onMoveDown:()=>tB(i,i+1),onToggleActive:t=>tz(e.id,t),autoPing:K[o]&&"oauth"===e.authType?{on:!0===eA.connections[e.id],onToggle:t=>{var a;return a=e.id,void tS({...eA,connections:{...eA.connections,[a]:t}})},provider:o}:null,onUpdateProxy:async t=>{try{let a="object"==typeof t?t:{proxyPoolId:t||null};if((await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok){let t={...e.providerSpecificData};a.proxyPoolIds?(t.proxyPoolIds=a.proxyPoolIds,t.proxyRotationStrategy=a.proxyRotationStrategy,delete t.proxyPoolId):(a.proxyPoolId?t.proxyPoolId=a.proxyPoolId:delete t.proxyPoolId,delete t.proxyPoolIds,delete t.proxyRotationStrategy),u(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:t}:a))}}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{Y(e),W(!0)},onDelete:()=>tO(e.id),oneByOneStatus:eH[e.id]||null})})]},e.id)}),x.length>10&&(0,s.jsx)(d.Pagination,{currentPage:tR,pageSize:10,totalItems:x.length,onPageChange:ef})]}),tG=S.filter(e=>!0===e.isActive),tQ=(0,s.jsx)(d.Modal,{isOpen:G,onClose:tq,title:`Apply Proxy (${x.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=S.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tW(x.map((t,a)=>({connectionId:t.id,proxyPoolId:e[a%e.length].id})))},disabled:eb||0===tG.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>tH(null),disabled:eb,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),S.map(e=>(0,s.jsxs)("button",{onClick:()=>tH(e.id),disabled:eb||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eb&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(d.Button,{onClick:tq,variant:"ghost",fullWidth:!0,disabled:eb,children:"Cancel"})]})}),tX=async e=>{if(!ed.has(e)){ec(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tp}/${e}`})}),a=await t.json();eo(t=>({...t,[e]:a.ok?"ok":"error"})),en(a.ok?"":a.error||"Model not reachable")}catch{eo(t=>({...t,[e]:"error"})),en("Network error")}finally{ec(t=>{let a=new Set(t);return a.delete(e),a})}}};return h?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(d.CardSkeleton,{}),(0,s.jsx)(d.CardSkeleton,{})]}):e8?(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)(r(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)(n.A,{providerId:e8.id,size:48,alt:e8.name,className:"shrink-0 rounded-lg",fallbackText:e8.textIcon||e8.id.slice(0,2).toUpperCase(),fallbackColor:e8.color}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e8.name}),(e8.notice?.apiKeyUrl||e8.notice?.signupUrl||e8.website)&&(0,s.jsxs)("a",{href:e8.notice?.apiKeyUrl||e8.notice?.signupUrl||e8.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e8.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),e8.deprecated&&(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e8.deprecationNotice})]}),e8.notice?.text&&!e8.deprecated&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e8.notice.text}),e8.notice.apiKeyUrl&&(0,s.jsx)("a",{href:e8.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 →"})]}),tr&&g&&(0,s.jsx)(d.Card,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:to?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[to?"Messages API":"responses"===g.apiType?"Responses API":"Chat Completions"," \xb7 ",(g.baseUrl||"").replace(/\/$/,""),"/",to?"messages":"responses"===g.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:()=>{L(""),z(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>V(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eB({title:"Delete Compatible Node",message:`Delete this ${to?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eB(null);try{(await fetch(`/api/provider-nodes/${o}`,{method:"DELETE"})).ok&&a.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tt?(0,s.jsx)(d.NoAuthProxyCard,{providerId:o}):(0,s.jsxs)(d.Card,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[x.length>0&&S.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>Q(!0),children:"Apply Proxy"}),x.length>0&&(0,s.jsxs)(s.Fragment,{children:[ex.length>0&&(0,s.jsxs)(d.Button,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=ex.length;0!==e&&eB({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eB(null);let e=0,t=[...ex];for(let a of t)try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}u(e=>e.filter(e=>!t.includes(e.id))),eu([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",ex.length,")"]}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"sync",onClick:tE,disabled:eK,children:eK?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eK&&(0,s.jsx)(d.Button,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eK&&(eX.current=!0,eJ(!0))},disabled:eF,children:eF?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,s.jsx)(d.Toggle,{checked:"round-robin"===ej,onChange:e=>{let t=e?"round-robin":null,a=e?ek||"1":ek;e&&!ek&&eN("1"),ew(t),tN(t,a)}}),"round-robin"===ej&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:ek,onChange:e=>{var t;eN(t=e.target.value),tN("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===x.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e9?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tn&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",td," or ",tc,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:tn?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:e3,children:td}),(0,s.jsx)(d.Button,{size:"sm",icon:"key",onClick:e4,children:tc})]}):(0,s.jsxs)(s.Fragment,{children:[!tr&&"iflow"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>O(!0),children:"Cookie"}),"codex"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>J(!0),children:(0,j.Tl)("Bulk Add")}),(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:e6,children:tr?"Add API Key":"iflow"===o?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[eG&&(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",eG.total]}),(0,s.jsxs)("span",{children:["Completed: ",eG.completed]}),(0,s.jsxs)("span",{children:["Passed: ",eG.passed]}),(0,s.jsxs)("span",{children:["Failed: ",eG.failed]}),eG.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eK&&eq&&(0,s.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eq)?.name||eq]})]})}),x.length>0&&(0,s.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("input",{type:"checkbox",checked:tJ,onChange:()=>{tJ?eu([]):eu(x.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),tV,!tr&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>O(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===o&&(0,s.jsx)(d.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>J(!0),title:(0,j.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,j.Tl)("Bulk Add")}),tn?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:e3,className:"w-full sm:w-auto",children:td}),(0,s.jsx)(d.Button,{size:"sm",icon:"key",onClick:e4,className:"w-full sm:w-auto",children:tc})]}):(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:e6,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsxs)(d.Card,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),tx&&(0,s.jsx)("select",{value:eC,onChange:e=>{var t;eS(t=e.target.value),tC(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:tx.map(e=>(0,s.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!tr&&(e=[...ts,...eO.filter(e=>!ts.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!e_.includes(e)),(0,s.jsxs)("div",{className:"flex gap-2",children:[e_.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tb,children:"Active All"}),e.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"block",onClick:()=>ty(e),children:"Disable All"})]}))]}),!!er&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:er}),(()=>{let e,t,a;if(tr)return(0,s.jsx)(A,{providerStorageAlias:tp,providerDisplayAlias:tu,modelAliases:Z,customModels:et,copied:e0,onCopy:e1,onSetAlias:tA,onDeleteAlias:tT,onAddCustomModel:e=>tI(e,"llm",tp),onDeleteCustomModel:e=>tP(e,"llm",tp),connections:x,isAnthropic:to});let i=[...ts,...eO.filter(e=>!ts.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),l=new Set(e_),r=i.filter(e=>!l.has(e.id)),n=i.filter(e=>l.has(e.id)),d=N({customModels:et,modelAliases:Z,providerAlias:tp,builtInModels:ts,type:"llm"});return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,s.jsx)(C,{model:{id:e.id,name:e.name},fullModel:`${tu}/${e.id}`,alias:e.alias,copied:e0,onCopy:e1,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tP(e.id,"llm",tp):tT(e.alias)},testStatus:el[e.id],onTest:x.length>0||tt?()=>tX(e.id):void 0,isTesting:ed.has(e.id),isCustom:!0,isFree:!1,caps:p(`${o}/${e.id}`),thinkingSuffix:tm(e.id)},`${e.source}-${e.fullModel}`)),r.map(e=>{let t=`${tp}/${e.id}`,a=`${o}/${e.id}`,i=Object.entries(Z).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(C,{model:e,fullModel:`${tu}/${e.id}`,alias:i,copied:e0,onCopy:e1,onSetAlias:t=>tA(e.id,t,tp),onDeleteAlias:()=>tT(i),testStatus:el[e.id],onTest:x.length>0||tt?()=>tX(e.id):void 0,isTesting:ed.has(e.id),isFree:e.isFree,onDisable:()=>tf(e.id),caps:p(`${o}/${e.id}`),thinkingSuffix:tm(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>ep(!0),className:"flex w-full items-center justify-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 sm:w-auto",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===o&&x.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:t$,disabled:eY,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:eY?{animation:"spin 1s linear infinite"}:void 0,children:eY?"progress_activity":"download"}),eY?(0,j.Tl)("Fetching..."):(0,j.Tl)("Fetch Qoder Models")]}),eI.length>0&&(e=new Set([...Object.values(Z),...d.map(e=>e.fullModel)]),t=new Set(ts.map(e=>e.id)),0===(a=eI.filter(a=>!e.has(`${tp}/${a.id}`)&&!t.has(a.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>(0,s.jsxs)("button",{onClick:async()=>{await tI(e.id,"llm",tp)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),n.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",n.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,s.jsxs)("button",{onClick:()=>tg(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tQ,"kiro"===o?(0,s.jsx)(d.KiroOAuthWrapper,{isOpen:I,providerInfo:e8,onSuccess:tD,onClose:()=>$(!1)}):"cursor"===o?(0,s.jsx)(d.CursorAuthModal,{isOpen:I,onSuccess:tD,onClose:()=>$(!1)}):"gitlab"===o?(0,s.jsx)(d.GitLabAuthModal,{isOpen:I,providerInfo:e8,onSuccess:tD,onClose:()=>$(!1)}):(0,s.jsx)(d.OAuthModal,{isOpen:I,provider:o,providerInfo:e8,onSuccess:tD,onClose:()=>$(!1)}),"iflow"===o&&(0,s.jsx)(d.IFlowCookieModal,{isOpen:E,onSuccess:()=>{tw(),O(!1)},onClose:()=>O(!1)}),(0,s.jsx)(D,{isOpen:_,provider:o,providerName:e8.name,isCompatible:tr,isAnthropic:to,authType:e8?.authType,authHint:e8?.authHint,website:e8?.website,proxyPools:S,error:M,existingNames:x.map(e=>e.name).filter(Boolean),onSave:t_,onBulkDone:tw,onClose:()=>{L(""),z(!1)}}),(0,s.jsx)(d.EditConnectionModal,{isOpen:q,connection:X,proxyPools:S,onSave:tU,onClose:()=>W(!1)}),tr&&(0,s.jsx)(U,{isOpen:H,node:g,onSave:tk,onClose:()=>V(!1),isAnthropic:to}),!tr&&(0,s.jsx)(B,{isOpen:em,providerAlias:tp,providerDisplayAlias:tu,onSave:async e=>{await tI(e,"llm",tp),ep(!1)},onClose:()=>ep(!1)}),"codex"===o&&(0,s.jsx)(R,{isOpen:F,onClose:()=>J(!1),onSuccess:tw}),(0,s.jsx)(d.ConfirmModal,{isOpen:eM,onClose:()=>eR(!1),onConfirm:()=>{(window.localStorage.setItem(e2,"true"),eR(!1),e9)?e5():e4()},title:"Risk Notice",message:e8?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(d.ConfirmModal,{isOpen:!!ez,onClose:()=>eB(null),onConfirm:ez?.onConfirm,title:ez?.title||"Confirm",message:ez?.message,variant:"danger"})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(r(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},21863:(e,t,a)=>{"use strict";function s(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}a.d(t,{g:()=>s})},68810:(e,t,a)=>{Promise.resolve().then(a.bind(a,6))}},e=>{e.O(0,[3885,2318,4385,2940,7236,5479,2147,3204,7358],()=>e(e.s=68810)),_N_E=e.O()}]);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6812],{4101:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>g});var r=l(15102),o=l(82030),a=l(92940),s=l(25795);async function i(e,t,l){let r=[];for(let o of e){try{r.push(await t(o))}catch{r.push("fail")}l?.(r.length,e.length)}return r}function n(e){return e.reduce((e,t)=>(e[t]=(e[t]||0)+1,e),{})}function c(e={}){return{name:e.name||"",proxyUrl:e.proxyUrl||"",noProxy:e.noProxy||"",isActive:!1!==e.isActive,strictProxy:!0===e.strictProxy}}let d=(0,r.jsxs)(r.Fragment,{children:["Token is used once for deployment and not stored. ",(0,r.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),x=(0,r.jsxs)(r.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,r.jsx)("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]});function p({isOpen:e,editingProxyPool:t,formData:l,saving:o,onClose:s,onSave:i,onChange:n}){return(0,r.jsx)(a.Modal,{isOpen:e,title:t?"Edit Proxy Pool":"Add Proxy Pool",onClose:s,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(a.Input,{label:"Name",value:l.name,onChange:e=>n("name",e.target.value),placeholder:"Office Proxy"}),(0,r.jsx)(a.Input,{label:"Proxy URL",value:l.proxyUrl,onChange:e=>n("proxyUrl",e.target.value),placeholder:"http://127.0.0.1:7897"}),(0,r.jsx)(a.Input,{label:"No Proxy",value:l.noProxy,onChange:e=>n("noProxy",e.target.value),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,r.jsx)(m,{label:"Active",description:"Inactive pools are ignored by runtime resolution.",checked:l.isActive,onChange:()=>n("isActive",!l.isActive),disabled:o}),(0,r.jsx)(m,{label:"Strict Proxy",description:"Fail request if proxy is unreachable instead of falling back to direct.",checked:l.strictProxy,onChange:()=>n("strictProxy",!l.strictProxy),disabled:o}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.Button,{fullWidth:!0,onClick:i,disabled:!l.name.trim()||!l.proxyUrl.trim()||o,children:o?"Saving...":"Save"}),(0,r.jsx)(a.Button,{fullWidth:!0,variant:"ghost",onClick:s,disabled:o,children:"Cancel"})]})]})})}function m({label:e,description:t,checked:l,onChange:o,disabled:s}){return(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:e}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:t})]}),(0,r.jsx)(a.Toggle,{checked:!0===l,onChange:o,disabled:s})]})}function u({isOpen:e,text:t,importing:l,onChange:o,onImport:s,onClose:i}){return(0,r.jsx)(a.Modal,{isOpen:e,title:"Batch Import Proxies",onClose:i,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"proxy-batch-import",className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,r.jsx)("textarea",{id:"proxy-batch-import",value:t,onChange:e=>o(e.target.value),placeholder:"http://user:pass@127.0.0.1:7897\n127.0.0.1:7897:user:pass",className:"w-full min-h-[180px] py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.Button,{fullWidth:!0,onClick:s,disabled:!t.trim()||l,children:l?"Importing...":"Import"}),(0,r.jsx)(a.Button,{fullWidth:!0,variant:"ghost",onClick:i,disabled:l,children:"Cancel"})]})]})})}function h({isOpen:e,title:t,onClose:l,children:o}){return(0,r.jsx)(a.Modal,{isOpen:e,title:t,onClose:l,children:o})}function y({pool:e,selected:t,testing:l,onSelect:o,onToggle:s,onTest:i,onEdit:n,onDelete:c}){var d;return(0,r.jsxs)("div",{className:"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,r.jsx)("input",{type:"checkbox",checked:t,onChange:o,"aria-label":`Select proxy ${e.name||e.id}`,className:"mt-1 size-4 shrink-0 rounded border-black/20 dark:border-white/20"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-medium sm:max-w-[18rem]",children:e.name}),(0,r.jsx)(a.Badge,{variant:"active"===(d=e.testStatus)?"success":"error"===d?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,r.jsx)(a.Badge,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,r.jsx)(a.Badge,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,r.jsx)(a.Badge,{variant:"default",size:"sm",children:"cloudflare relay"}),(0,r.jsxs)(a.Badge,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted truncate mt-1",children:e.proxyUrl}),e.noProxy?(0,r.jsxs)("p",{className:"text-xs text-text-muted truncate",children:["No proxy: ",e.noProxy]}):null,(0,r.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["Last tested: ",function(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}(e.lastTestedAt),e.lastError?` \xb7 ${e.lastError}`:""]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,r.jsx)(a.Toggle,{size:"sm",checked:!0===e.isActive,onChange:s,title:e.isActive?"Disable":"Enable"}),(0,r.jsx)("button",{type:"button",onClick:i,className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Test proxy",disabled:l,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:l?{animation:"spin 1s linear infinite"}:void 0,children:l?"progress_activity":"science"})}),(0,r.jsx)("button",{type:"button",onClick:n,className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Edit",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,r.jsx)("button",{type:"button",onClick:c,className:"p-2 rounded hover:bg-red-500/10 text-red-500",title:"Delete",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]})}function g(){let[e,t]=(0,o.useState)([]),[l,m]=(0,o.useState)(!0),[g,f]=(0,o.useState)(!1),[b,j]=(0,o.useState)(!1),[v,k]=(0,o.useState)(!1),[N,w]=(0,o.useState)(!1),[C,P]=(0,o.useState)(!1),[D,S]=(0,o.useState)(!1),[T,$]=(0,o.useState)(null),[A,I]=(0,o.useState)(()=>c()),[U,E]=(0,o.useState)(""),[O,B]=(0,o.useState)({vercelToken:"",projectName:"vercel-relay"}),[z,W]=(0,o.useState)({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),[R,_]=(0,o.useState)({denoToken:"",orgDomain:"",projectName:""}),[F,L]=(0,o.useState)(!1),[q,V]=(0,o.useState)(!1),[M,J]=(0,o.useState)(!1),[G,H]=(0,o.useState)(null),[Y,K]=(0,o.useState)([]),[Q,X]=(0,o.useState)(!1),[Z,ee]=(0,o.useState)({current:0,total:0}),[et,el]=(0,o.useState)(!1),[er,eo]=(0,o.useState)({label:"",current:0,total:0}),[ea,es]=(0,o.useState)(null),ei=(0,o.useRef)(null),en=(0,s.i)();(0,o.useEffect)(()=>{let e=e=>{ei.current&&!ei.current.contains(e.target)&&S(!1)};return D&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[D]);let ec=(0,o.useCallback)(async()=>{try{let e=await fetch("/api/proxy-pools?includeUsage=true",{cache:"no-store"}),l=await e.json();e.ok&&t(l.proxyPools||[])}catch(e){console.log("Error fetching proxy pools:",e)}finally{m(!1)}},[]);(0,o.useEffect)(()=>{ec()},[ec]);let ed=()=>{$(null),I(c())},ex=()=>{ed(),f(!0)},ep=()=>{f(!1),ed()},em=async()=>{let e={name:A.name.trim(),proxyUrl:A.proxyUrl.trim(),noProxy:A.noProxy.trim(),isActive:!0===A.isActive,strictProxy:!0===A.strictProxy};if(e.name&&e.proxyUrl){L(!0);try{let t=!!T,l=await fetch(t?`/api/proxy-pools/${T.id}`:"/api/proxy-pools",{method:t?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(l.ok)await ec(),ep(),en.success(T?"Proxy pool updated":"Proxy pool created");else{let e=await l.json();en.error(e.error||"Failed to save proxy pool")}}catch(e){console.log("Error saving proxy pool:",e)}finally{L(!1)}}},eu=async e=>{es({title:"Delete Proxy Pool",message:`Delete proxy pool "${e.name}"?`,onConfirm:async()=>{es(null);try{let l=await fetch(`/api/proxy-pools/${e.id}`,{method:"DELETE"});if(l.ok){t(t=>t.filter(t=>t.id!==e.id)),en.success("Proxy pool deleted");return}let r=await l.json();409===l.status?en.warning(`Cannot delete: ${r.boundConnectionCount||0} connection(s) are still using this pool.`):en.error(r.error||"Failed to delete proxy pool")}catch(e){console.log("Error deleting proxy pool:",e),en.error("Failed to delete proxy pool")}}})},eh=async e=>{H(e);try{let t=await fetch(`/api/proxy-pools/${e}/test`,{method:"POST"}),l=await t.json();if(!t.ok)return void en.error(l.error||"Failed to test proxy");await ec(),en.success(l.ok?"Proxy test passed":"Proxy test failed")}catch(e){console.log("Error testing proxy pool:",e),en.error("Failed to test proxy")}finally{H(null)}},ey=async e=>{let l=!e.isActive;t(t=>t.map(t=>t.id===e.id?{...t,isActive:l}:t));try{(await fetch(`/api/proxy-pools/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:l})})).ok||(t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t)),en.error("Failed to update active state"))}catch(l){console.log("Error toggling active:",l),t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t))}},eg=Y.filter(t=>e.some(e=>e.id===t)),ef=e.length>0&&eg.length===e.length,eb=()=>K([]),ej=async t=>{let l=Y.length>0?Y:e.map(e=>e.id);if(0!==l.length){el(!0),eo({label:t?"Activating":"Deactivating",current:0,total:l.length});try{let e=await i(l,async e=>(await fetch(`/api/proxy-pools/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok?"ok":"fail",e=>eo(t=>({...t,current:e}))),{ok:r=0,fail:o=0}=n(e);await ec(),en.success(`${t?"Activated":"Deactivated"} ${r}${o?`, failed ${o}`:""}`)}finally{eo({label:"",current:0,total:0}),el(!1)}}},ev=async()=>{0!==Y.length&&es({title:"Delete Proxy Pools",message:`Delete ${Y.length} proxy pool(s)?`,onConfirm:async()=>{es(null),el(!0);let e=[...Y];eo({label:"Deleting",current:0,total:e.length});try{let t=await i(e,async e=>{let t=await fetch(`/api/proxy-pools/${e}`,{method:"DELETE"});return t.ok?"ok":409===t.status?"blocked":"fail"},e=>eo(t=>({...t,current:e}))),{ok:l=0,blocked:r=0,fail:o=0}=n(t);await ec(),eb(),en.success(`Deleted ${l}${r?`, ${r} bound`:""}${o?`, ${o} failed`:""}`)}finally{eo({label:"",current:0,total:0}),el(!1)}}})},ek=async()=>{let t=Y.length>0?e.filter(e=>Y.includes(e.id)):e;if(0===t.length)return;X(!0),ee({current:0,total:t.length});let l=0,r=[],o=0,a=[...t],s=async()=>{for(;a.length>0;){let e=a.shift();if(!e)break;try{let t=await fetch(`/api/proxy-pools/${e.id}/test`,{method:"POST"}),o=await t.json();t.ok&&o.ok?l+=1:r.push(e.id)}catch{r.push(e.id)}finally{ee({current:o+=1,total:t.length})}}};await Promise.all(Array.from({length:Math.min(10,t.length)},s)),await ec(),X(!1),ee({current:0,total:0}),r.length>0?es({title:"Disable Dead Proxies",message:`Alive: ${l}, Dead: ${r.length}.
|
|
2
|
+
|
|
3
|
+
Disable ${r.length} dead proxies?`,onConfirm:async()=>{es(null),el(!0);try{await Promise.all(r.map(e=>fetch(`/api/proxy-pools/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:!1})}).catch(()=>{}))),await ec(),en.success(`Disabled ${r.length} dead proxies`)}finally{el(!1)}}}):en.success(`Health check done. Alive: ${l}, Dead: ${r.length}`)},eN=()=>{M||k(!1)},ew=()=>{M||w(!1)},eC=()=>{M||P(!1)},eP=async()=>{if(O.vercelToken.trim()){J(!0);try{let e=await fetch("/api/proxy-pools/vercel-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)}),t=await e.json();e.ok?(await ec(),eN(),en.success(`Deployed: ${t.deployUrl}`)):en.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Vercel relay:",e),en.error("Deploy failed")}finally{J(!1)}}},eD=async()=>{if(z.accountId.trim()&&z.apiToken.trim()){J(!0);try{let e=await fetch("/api/proxy-pools/cloudflare-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)}),t=await e.json();e.ok?(await ec(),ew(),en.success(`Deployed: ${t.deployUrl}`)):en.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Cloudflare relay:",e),en.error("Deploy failed")}finally{J(!1)}}},eS=async()=>{if(R.denoToken.trim()){J(!0);try{let e=await fetch("/api/proxy-pools/deno-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)}),t=await e.json();e.ok?(await ec(),eC(),en.success(`Deployed: ${t.deployUrl}`)):en.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Deno relay:",e),en.error("Deploy failed")}finally{J(!1)}}},eT=async()=>{let t=U.split(/\r?\n/).flatMap(e=>{let t=e.trim();return t?[t]:[]});if(0===t.length)return void en.warning("Please paste at least one proxy line.");let l=[],r=[];if(t.forEach((e,t)=>{try{let r=function(e){let t=e.trim();if(!t)return null;if(t.includes("://")){let e=new URL(t),l=e.port?`${e.hostname}:${e.port}`:e.hostname;return{proxyUrl:e.toString(),name:`Imported ${l}`}}let l=t.split(":");if(4===l.length){let[e,t,r,o]=l;if(!e||!t||!r||!o)throw Error("Invalid host:port:user:pass format");return{proxyUrl:new URL(`http://${encodeURIComponent(r)}:${encodeURIComponent(o)}@${e}:${t}`).toString(),name:`Imported ${e}:${t}`}}throw Error("Unsupported format")}(e);r&&l.push({...r,lineNumber:t+1})}catch(e){r.push(`Line ${t+1}: ${e.message}`)}}),r.length>0)return void en.error(`Invalid proxy format:
|
|
4
|
+
${r.join("\n")}`);V(!0);try{let t=new Set(e.map(e=>`${(e.proxyUrl||"").trim()}|||${(e.noProxy||"").trim()}`)),r=0,o=0,a=0,{accepted:s,skipped:c}=function(e,t){let l=[],r=0;for(let o of e){let e=`${o.proxyUrl}|||`;if(t.has(e)){r+=1;continue}t.add(e),l.push(o)}return{accepted:l,skipped:r}}(l,t);o+=c,eo({label:"Importing",current:0,total:s.length});let d=await i(s,async e=>(await fetch("/api/proxy-pools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,proxyUrl:e.proxyUrl,noProxy:"",isActive:!0})})).ok?"ok":"fail",e=>eo(t=>({...t,current:e}))),x=n(d);r=x.ok||0,a=x.fail||0,await ec(),j(!1),en.success(`Batch import completed: Created ${r}, Skipped ${o}, Failed ${a}`)}catch(e){console.log("Error batch importing proxies:",e),en.error("Batch import failed")}finally{eo({label:"",current:0,total:0}),V(!1)}},e$=(0,o.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return l?(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,r.jsx)(a.CardSkeleton,{}),(0,r.jsx)(a.CardSkeleton,{})]}):(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)("h1",{className:"text-xl font-semibold sm:text-2xl",children:"Proxy Pools"})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,r.jsxs)("div",{className:"relative",ref:ei,children:[(0,r.jsxs)(a.Button,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>S(!D),children:["Deploy Relay",(0,r.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:D?"expand_less":"expand_more"})]}),D&&(0,r.jsxs)("div",{className:"absolute left-0 top-full z-50 mt-1 w-48 rounded-xl border border-black/10 bg-white p-1 shadow-xl dark:border-white/10 dark:bg-zinc-900 sm:left-auto sm:right-0",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>{W({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),w(!0),S(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-orange-500",children:"cloud"}),"Cloudflare Relay"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>{B({vercelToken:"",projectName:"vercel-relay"}),k(!0),S(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-blue-500",children:"cloud_upload"}),"Vercel Relay"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>{_({denoToken:"",orgDomain:"",projectName:""}),P(!0),S(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-green-500",children:"terminal"}),"Deno Relay"]})]})]}),(0,r.jsx)(a.Button,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{E(""),j(!0)},children:"Batch Import"}),(0,r.jsx)(a.Button,{size:"sm",icon:"add",onClick:ex,children:"Add Proxy Pool"})]})]}),(0,r.jsxs)(a.Card,{children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.length>0&&(0,r.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,r.jsx)("input",{type:"checkbox",checked:ef,onChange:()=>K(ef?[]:e.map(e=>e.id)),className:"size-4 rounded border-black/20 dark:border-white/20"}),ef?"Unselect all":"Select all"]}),(0,r.jsxs)(a.Badge,{variant:"default",children:["Total: ",e.length]}),(0,r.jsxs)(a.Badge,{variant:"success",children:["Active: ",e$]})]}),(Y.length>0||Q||er.total>0)&&(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:er.total>0?`${er.label} ${er.current}/${er.total}`:Y.length>0?`${Y.length} selected`:"All pools"}),er.total>0&&(0,r.jsx)("div",{className:"w-full basis-full",role:"progressbar","aria-valuemin":"0","aria-valuemax":er.total,"aria-valuenow":er.current,"aria-label":`${er.label} progress`,children:(0,r.jsx)("div",{className:"h-1.5 overflow-hidden rounded-full bg-primary/15",children:(0,r.jsx)("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${er.current/er.total*100}%`}})})}),(0,r.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,r.jsx)(a.Button,{size:"sm",icon:Q?"progress_activity":"health_and_safety",onClick:ek,disabled:Q||et||0===e.length,children:Q?`Checking ${Z.current}/${Z.total}`:"Health Check"}),Y.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Button,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>ej(!0),disabled:et||Q,children:"Activate"}),(0,r.jsx)(a.Button,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>ej(!1),disabled:et||Q,children:"Deactivate"}),(0,r.jsx)(a.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:ev,disabled:et||Q,children:"Delete"}),(0,r.jsx)(a.Button,{size:"sm",variant:"ghost",onClick:eb,disabled:et||Q,children:"Clear"})]})]})]}),0===e.length?(0,r.jsxs)("div",{className:"text-center py-10",children:[(0,r.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,r.jsx)(a.Button,{icon:"add",onClick:ex,children:"Add Proxy Pool"})]}):(0,r.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.04] dark:divide-white/[0.05]",children:e.map(e=>(0,r.jsx)(y,{pool:e,selected:Y.includes(e.id),testing:G===e.id,onSelect:()=>{let t;return t=e.id,K(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},onToggle:()=>ey(e),onTest:()=>eh(e.id),onEdit:()=>{$(e),I(c(e)),f(!0)},onDelete:()=>eu(e)},e.id))})]}),(0,r.jsx)(u,{isOpen:b,text:U,importing:q,onChange:E,onImport:eT,onClose:()=>{q||j(!1)}}),(0,r.jsx)(h,{isOpen:v,title:"Deploy Vercel Relay",onClose:eN,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys an edge relay function to Vercel. All AI provider requests will be forwarded through Vercel's edge network, masking your real IP from providers."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,r.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,r.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,r.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,r.jsx)(a.Input,{label:"Vercel API Token",value:O.vercelToken,onChange:e=>B(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:d,type:"password"}),(0,r.jsx)(a.Input,{label:"Project Name",value:O.projectName,onChange:e=>B(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Vercel project. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.Button,{fullWidth:!0,onClick:eP,disabled:!O.vercelToken.trim()||M,children:M?"Deploying... (may take ~1 min)":"Deploy"}),(0,r.jsx)(a.Button,{fullWidth:!0,variant:"ghost",onClick:eN,disabled:M,children:"Cancel"})]})]})}),(0,r.jsx)(h,{isOpen:N,title:"Deploy Cloudflare Relay",onClose:ew,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a Cloudflare Worker as a proxy relay. All AI provider requests will be forwarded through Cloudflare's global edge network."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,r.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,r.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"My Profile"})," → ",(0,r.jsx)("b",{children:"API Tokens"})," → ",(0,r.jsx)("b",{children:"Create Token"})]}),(0,r.jsxs)("li",{children:["Scroll down to ",(0,r.jsx)("b",{children:"Custom Token"})," and click ",(0,r.jsx)("b",{children:"Get started"})]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,r.jsx)("i",{children:"Your Account Name"})]}),(0,r.jsxs)("li",{children:["Click ",(0,r.jsx)("b",{children:"Continue to summary"})," → ",(0,r.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,r.jsx)(a.Input,{label:"Account ID",value:z.accountId,onChange:e=>W(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:"Found on the right side of the Cloudflare dashboard overview page."}),(0,r.jsx)(a.Input,{label:"API Token",value:z.apiToken,onChange:e=>W(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:x,type:"password"}),(0,r.jsx)(a.Input,{label:"Worker Name",value:z.projectName,onChange:e=>W(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.Button,{fullWidth:!0,onClick:eD,disabled:!z.accountId.trim()||!z.apiToken.trim()||M,children:M?"Deploying...":"Deploy Worker"}),(0,r.jsx)(a.Button,{fullWidth:!0,variant:"ghost",onClick:ew,disabled:M,children:"Cancel"})]})]})}),(0,r.jsx)(h,{isOpen:C,title:"Deploy Deno Relay",onClose:eC,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 border border-black/10 dark:border-white/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a relay worker to Deno Deploy's global edge network. All AI provider requests are forwarded through Deno's edge, masking your real IP."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,r.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,r.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,r.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,r.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"console.deno.com"})]}),(0,r.jsxs)("li",{children:["Select your ",(0,r.jsx)("b",{children:"Organization"})," → ",(0,r.jsx)("b",{children:"Settings"})," → ",(0,r.jsx)("b",{children:"Organization Tokens"})]}),(0,r.jsxs)("li",{children:["Create a ",(0,r.jsx)("b",{children:"Organization Token"})," (prefix ",(0,r.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,r.jsx)(a.Input,{label:"Deno Deploy API Token",value:R.denoToken,onChange:e=>_(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:"Token is used once for deployment, not stored. Found in Organization Settings.",type:"password"}),(0,r.jsx)(a.Input,{label:"Organization Domain",value:R.orgDomain,onChange:e=>_(t=>({...t,orgDomain:e.target.value})),placeholder:"your-org.deno.net",hint:"Organization's default domain. Your relay URL will be in the format: https://my-relay.your-org.deno.net"}),(0,r.jsx)(a.Input,{label:"App Name",value:R.projectName,onChange:e=>_(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.Button,{fullWidth:!0,onClick:eS,disabled:!R.denoToken.trim()||!R.orgDomain.trim()||M,children:M?"Deploying...":"Deploy Relay"}),(0,r.jsx)(a.Button,{fullWidth:!0,variant:"ghost",onClick:eC,disabled:M,children:"Cancel"})]})]})}),(0,r.jsx)(p,{isOpen:g,editingProxyPool:T,formData:A,saving:F,onClose:ep,onSave:em,onChange:(e,t)=>I(l=>({...l,[e]:t}))}),(0,r.jsx)(a.ConfirmModal,{isOpen:!!ea,onClose:()=>es(null),onConfirm:ea?.onConfirm,title:ea?.title||"Confirm",message:ea?.message,variant:"danger"})]})}},90536:(e,t,l)=>{Promise.resolve().then(l.bind(l,4101))}},e=>{e.O(0,[3885,2318,4385,2940,2147,3204,7358],()=>e(e.s=90536)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t,r,o,n,a,c,
|
|
1
|
+
(()=>{"use strict";var e,t,r,o,n,a,i,c,d,l={},s={};function f(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}},o=!0;try{l[e].call(r.exports,r,r.exports,f),o=!1}finally{o&&delete s[e]}return r.exports}f.m=l,e=[],f.O=(t,r,o,n)=>{if(r){n=n||0;for(var a=e.length;a>0&&e[a-1][2]>n;a--)e[a]=e[a-1];e[a]=[r,o,n];return}for(var i=1/0,a=0;a<e.length;a++){for(var[r,o,n]=e[a],c=!0,d=0;d<r.length;d++)(!1&n||i>=n)&&Object.keys(f.O).every(e=>f.O[e](r[d]))?r.splice(d--,1):(c=!1,n<i&&(i=n));if(c){e.splice(a--,1);var l=o();void 0!==l&&(t=l)}}return t},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);f.r(n);var a={};t=t||[null,r({}),r([]),r(r)];for(var i=2&o&&e;"object"==typeof i&&!~t.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach(t=>a[t]=()=>e[t]);return a.default=()=>e,f.d(n,a),n},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((t,r)=>(f.f[r](e,t),t),[])),f.u=e=>7236===e?"static/chunks/7236-f1e0a36eb81c5151.js":5479===e?"static/chunks/5479-4214d11ddca13cd7.js":5334===e?"static/chunks/5334-4a80ee40870b70ae.js":1399===e?"static/chunks/1399-71db70ab3102530f.js":"static/chunks/"+(7418===e?"642b329c":e)+"."+({406:"7447d162fc1137ef",1049:"adc9916d5a6b95f8",1409:"9d9e122fbb02e985",1567:"380d58c42bf5620c",2673:"e645c662bafae6d3",2884:"80ed08ba28ed9dc3",3124:"945def356dab66f4",3245:"72bf2b81ee2bcca7",3257:"d8154293f6c3befa",3386:"c9a6be6fd4e818a6",3657:"512c2a8e4d8a3378",5331:"049b1512362de1f4",5560:"e2ab1ca9979178f3",6474:"05cd6a7a0760c2a1",6676:"a4b23fc11d3037fd",6909:"20637e0929ccd959",7418:"6470aa395ac1043a",8667:"b22b7da66acd945f",9078:"ea6aeb4af0c25e5d",9146:"7174fc5feff1bf58"})[e]+".js",f.miniCssF=e=>"static/css/008a05b0ad6b854a.css",f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},f.l=(e,t,r,n)=>{if(o[e])return void o[e].push(t);if(void 0!==r)for(var a,i,c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var l=c[d];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")=="_N_E:"+r){a=l;break}}a||(i=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,f.nc&&a.setAttribute("nonce",f.nc),a.setAttribute("data-webpack","_N_E:"+r),a.src=f.tu(e)),o[e]=[t];var s=(t,r)=>{a.onerror=a.onload=null,clearTimeout(u);var n=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach(e=>e(r)),t)return t(r)},u=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),i&&document.head.appendChild(a)},f.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.tt=()=>(void 0===n&&(n={createScriptURL:e=>e},"u">typeof trustedTypes&&trustedTypes.createPolicy&&(n=trustedTypes.createPolicy("nextjs#bundler",n))),n),f.tu=e=>f.tt().createScriptURL(e),f.p="/_next/",a={8068:0},f.f.miniCss=(e,t)=>{if(a[e])t.push(a[e]);else 0!==a[e]&&({2554:1})[e]&&t.push(a[e]=new Promise((t,r)=>{var o=f.miniCssF(e),n=f.p+o;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var n=r[o],a=n.getAttribute("data-href")||n.getAttribute("href");if("stylesheet"===n.rel&&(a===e||a===t))return n}for(var i=document.getElementsByTagName("style"),o=0;o<i.length;o++){var n=i[o],a=n.getAttribute("data-href");if(a===e||a===t)return n}})(o,n))return t();((e,t,r,o)=>{var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.onerror=n.onload=a=>{if(n.onerror=n.onload=null,"load"===a.type)r();else{var i=a&&("load"===a.type?"missing":a.type),c=a&&a.target&&a.target.href||t,d=Error("Loading CSS chunk "+e+" failed.\n("+c+")");d.code="CSS_CHUNK_LOAD_FAILED",d.type=i,d.request=c,n.parentNode.removeChild(n),o(d)}},n.href=t;if("function"==typeof _N_E_STYLE_LOAD){var a=n.href,i=n.onload,c=n.onerror;_N_E_STYLE_LOAD(0===a.indexOf(window.location.origin)?new URL(a).pathname:a).then(function(){i&&i.call(n,{type:"load"})},function(){c&&c.call(n,{})})}else document.head.appendChild(n)})(e,n,t,r)}).then(()=>{a[e]=0},t=>{throw delete a[e],t}))},i={8068:0,6525:0,186:0},f.f.j=(e,t)=>{var r=f.o(i,e)?i[e]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(186|2554|6525|8068)$/.test(e))i[e]=0;else{var o=new Promise((t,o)=>r=i[e]=[t,o]);t.push(r[2]=o);var n=f.p+f.u(e),a=Error();f.l(n,t=>{if(f.o(i,e)&&(0!==(r=i[e])&&(i[e]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,r[1](a)}},"chunk-"+e,e)}},f.O.j=e=>0===i[e],c=(e,t)=>{var r,o,[n,a,c]=t,d=0;if(n.some(e=>0!==i[e])){for(r in a)f.o(a,r)&&(f.m[r]=a[r]);if(c)var l=c(f)}for(e&&e(t);d<n.length;d++)o=n[d],f.o(i,o)&&i[o]&&i[o][0](),i[o]=0;return f.O(l)},(d=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(c.bind(null,0)),d.push=c.bind(null,d.push.bind(d))})();
|