@techysy/10router 1.1.2 → 1.2.0
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/LICENSE +1 -1
- package/README.md +57 -0
- package/README.zh-CN.md +49 -0
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +11 -6
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +51 -23
- package/app/.next-cli-build/react-loadable-manifest.json +1 -1
- package/app/.next-cli-build/routes-manifest.json +30 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- 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 +2 -2
- 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 +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 +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 +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 +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/experimental/page.js +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +5 -5
- 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 +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 +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 +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 +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 +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 +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 +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +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 +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-pools/page.js +2 -2
- 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 +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 +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 +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 +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 +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 +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 +2 -2
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- 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 +18 -17
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +18 -17
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +10 -9
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +2 -2
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
- 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 +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +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 +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +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 +2 -2
- 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 +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 +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 +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 +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +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 +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 +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -0
- package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/models/caps/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/network/egress-region/route.js +1 -1
- package/app/.next-cli-build/server/app/api/network/egress-region/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/codebuddy-cn/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/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 +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 +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/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 +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/security/status/route.js +1 -0
- package/app/.next-cli-build/server/app/api/security/status/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/security/status/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +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 +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/dashboard/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/dashboard/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +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 +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +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 +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 +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 +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 +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +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 +22 -21
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +22 -21
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +10 -9
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +20 -19
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +20 -19
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +21 -20
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +21 -20
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +21 -20
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +21 -20
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/experimental.html +1 -0
- package/app/.next-cli-build/server/app/dashboard/experimental.meta +36 -0
- package/app/.next-cli-build/server/app/dashboard/experimental.rsc +23 -0
- package/app/.next-cli-build/server/app/dashboard/experimental.segments/!KGRhc2hib2FyZCk/dashboard/experimental/__PAGE__.segment.rsc +31 -0
- package/app/.next-cli-build/server/app/dashboard/experimental.segments/_full.segment.rsc +23 -0
- package/app/.next-cli-build/server/app/dashboard/experimental.segments/_tree.segment.rsc +3 -0
- 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 +23 -22
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +20 -19
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +20 -19
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +20 -19
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +20 -19
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +21 -20
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +13 -12
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +21 -20
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- 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 +22 -21
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +22 -21
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +11 -10
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +20 -19
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +20 -19
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +21 -20
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +12 -11
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +21 -20
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +17 -16
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +10 -9
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +17 -16
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing/page.js +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 +22 -21
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +22 -21
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +11 -10
- package/app/.next-cli-build/server/app/login/page.js +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 +22 -21
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +22 -21
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +11 -10
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +11 -6
- package/app/.next-cli-build/server/chunks/112.js +1 -0
- package/app/.next-cli-build/server/chunks/1159.js +3 -3
- package/app/.next-cli-build/server/chunks/1330.js +1 -0
- package/app/.next-cli-build/server/chunks/1531.js +1 -0
- package/app/.next-cli-build/server/chunks/2112.js +1 -1
- package/app/.next-cli-build/server/chunks/2120.js +1 -1
- package/app/.next-cli-build/server/chunks/2132.js +1 -1
- package/app/.next-cli-build/server/chunks/2179.js +1 -1
- package/app/.next-cli-build/server/chunks/241.js +1 -1
- package/app/.next-cli-build/server/chunks/271.js +1 -0
- package/app/.next-cli-build/server/chunks/2812.js +2 -0
- package/app/.next-cli-build/server/chunks/3225.js +1 -6
- package/app/.next-cli-build/server/chunks/{7843.js → 3500.js} +7 -2
- package/app/.next-cli-build/server/chunks/3593.js +1 -1
- package/app/.next-cli-build/server/chunks/3651.js +3 -3
- package/app/.next-cli-build/server/chunks/3943.js +1 -1
- package/app/.next-cli-build/server/chunks/4037.js +1 -1
- package/app/.next-cli-build/server/chunks/4123.js +2 -2
- package/app/.next-cli-build/server/chunks/4125.js +1 -1
- package/app/.next-cli-build/server/chunks/4126.js +1 -0
- package/app/.next-cli-build/server/chunks/4739.js +1 -1
- package/app/.next-cli-build/server/chunks/4780.js +1 -1
- package/app/.next-cli-build/server/chunks/4990.js +9 -0
- package/app/.next-cli-build/server/chunks/507.js +1 -1
- package/app/.next-cli-build/server/chunks/5258.js +2 -2
- package/app/.next-cli-build/server/chunks/5330.js +8 -8
- package/app/.next-cli-build/server/chunks/5485.js +1 -1
- package/app/.next-cli-build/server/chunks/5615.js +1 -1
- package/app/.next-cli-build/server/chunks/5781.js +2 -2
- package/app/.next-cli-build/server/chunks/6051.js +1 -0
- package/app/.next-cli-build/server/chunks/6070.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6212.js +1 -1
- package/app/.next-cli-build/server/chunks/6306.js +1 -1
- package/app/.next-cli-build/server/chunks/6326.js +1 -1
- package/app/.next-cli-build/server/chunks/6520.js +1 -1
- package/app/.next-cli-build/server/chunks/653.js +1 -1
- package/app/.next-cli-build/server/chunks/6756.js +1 -0
- package/app/.next-cli-build/server/chunks/6763.js +1 -1
- package/app/.next-cli-build/server/chunks/6844.js +1 -1
- package/app/.next-cli-build/server/chunks/6871.js +1 -1
- package/app/.next-cli-build/server/chunks/6960.js +2 -2
- package/app/.next-cli-build/server/chunks/698.js +1 -1
- package/app/.next-cli-build/server/chunks/6982.js +1 -0
- package/app/.next-cli-build/server/chunks/7067.js +1 -0
- package/app/.next-cli-build/server/chunks/7122.js +6 -0
- package/app/.next-cli-build/server/chunks/7180.js +6 -0
- package/app/.next-cli-build/server/chunks/7239.js +4 -4
- package/app/.next-cli-build/server/chunks/7247.js +1 -1
- package/app/.next-cli-build/server/chunks/7274.js +33 -0
- package/app/.next-cli-build/server/chunks/7322.js +1 -1
- package/app/.next-cli-build/server/chunks/7365.js +1 -0
- package/app/.next-cli-build/server/chunks/75.js +1 -0
- package/app/.next-cli-build/server/chunks/7965.js +1 -1
- package/app/.next-cli-build/server/chunks/808.js +1 -1
- package/app/.next-cli-build/server/chunks/8145.js +1 -1
- package/app/.next-cli-build/server/chunks/8410.js +1 -1
- package/app/.next-cli-build/server/chunks/8499.js +2 -2
- package/app/.next-cli-build/server/chunks/8520.js +1 -1
- package/app/.next-cli-build/server/chunks/8546.js +1 -1
- package/app/.next-cli-build/server/chunks/8635.js +5 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/8838.js +1 -1
- package/app/.next-cli-build/server/chunks/8895.js +12 -9
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/9539.js +9 -0
- package/app/.next-cli-build/server/chunks/9609.js +1 -1
- package/app/.next-cli-build/server/chunks/9896.js +1 -0
- package/app/.next-cli-build/server/chunks/9927.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +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 +8 -8
- package/app/.next-cli-build/server/middleware.js.nft.json +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/prefetch-hints.json +24 -0
- package/app/.next-cli-build/static/chunks/1243-d0e0b9458266e912.js +3 -0
- package/app/.next-cli-build/static/chunks/1321-23084daf91733d47.js +1 -0
- package/app/.next-cli-build/static/chunks/{3346-0ae97d50d86ac1f7.js → 3346-509e8dd58ea4832d.js} +7 -7
- package/app/.next-cli-build/static/chunks/{3521.3c9be8ed83af460d.js → 3521.3107c4bff48fe566.js} +1 -1
- package/app/.next-cli-build/static/chunks/5497-d050b53817def025.js +7 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-fa4ba47a6bf0da15.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/experimental/page-4dd5e46a2d6f4486.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-9ca09f92fcb7be9f.js +59 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-9a471accf206ea43.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-a2510813ebd64f72.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-48878e82a437e813.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-18da0e8d40af56ac.js +14 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-9ec9a9251e22a7c8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-e84b8de5542a9dc9.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f62700ce9aa54572.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-7833d8a884ba922a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-158175db070fe14c.js → layout-434f2e27f8b21ae1.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/caps/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/qoder/checkin/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/qoder-cn/checkin/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/security/status/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/{page-9170ddf38e76b3cf.js → page-3659ea13d950adc1.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/landing/page-acb1434862d18ac7.js +1 -0
- package/app/.next-cli-build/static/chunks/app/layout-ba8ee035fd3fda5f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/login/page-f1945d5fab85c48f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-45a30f9960975021.js +1 -0
- package/app/.next-cli-build/static/chunks/{webpack-77a7ed7beb6725df.js → webpack-b43a2a1c513882e9.js} +1 -1
- package/app/.next-cli-build/static/css/6e249fe05f9d7227.css +1 -0
- package/app/.next-cli-build/static/css/7a3e1568f247f3d0.css +1 -0
- package/app/.next-cli-build/static/mzc6AVdJokpIsYjtjKON0/_buildManifest.js +1 -0
- package/app/custom-server.js +8 -8
- package/app/package.json +1 -1
- package/app/public/i18n/changelog/en.md +64 -0
- package/app/public/i18n/changelog/zh-CN.md +64 -0
- package/app/public/i18n/changelog/zh-TW.md +64 -0
- package/app/public/i18n/literals/ar.json +4 -4
- package/app/public/i18n/literals/bn.json +4 -4
- package/app/public/i18n/literals/cs.json +4 -4
- package/app/public/i18n/literals/da.json +4 -4
- package/app/public/i18n/literals/de.json +4 -4
- package/app/public/i18n/literals/el.json +4 -4
- package/app/public/i18n/literals/es.json +4 -4
- package/app/public/i18n/literals/fa.json +31 -34
- package/app/public/i18n/literals/fi.json +4 -4
- package/app/public/i18n/literals/fr.json +4 -4
- package/app/public/i18n/literals/he.json +4 -4
- package/app/public/i18n/literals/hi.json +4 -4
- package/app/public/i18n/literals/hu.json +4 -4
- package/app/public/i18n/literals/id.json +4 -4
- package/app/public/i18n/literals/it.json +4 -4
- package/app/public/i18n/literals/ja.json +4 -4
- package/app/public/i18n/literals/km.json +31 -34
- package/app/public/i18n/literals/ko.json +4 -4
- package/app/public/i18n/literals/nl.json +4 -4
- package/app/public/i18n/literals/no.json +4 -4
- package/app/public/i18n/literals/pl.json +4 -4
- package/app/public/i18n/literals/pt-BR.json +12 -12
- package/app/public/i18n/literals/pt-PT.json +4 -4
- package/app/public/i18n/literals/ro.json +4 -4
- package/app/public/i18n/literals/ru.json +4 -4
- package/app/public/i18n/literals/sv.json +4 -4
- package/app/public/i18n/literals/th.json +31 -34
- package/app/public/i18n/literals/tl.json +4 -4
- package/app/public/i18n/literals/tr.json +4 -4
- package/app/public/i18n/literals/uk.json +4 -4
- package/app/public/i18n/literals/ur.json +4 -4
- package/app/public/i18n/literals/vi.json +4 -4
- package/app/public/i18n/literals/zh-CN.json +1857 -1755
- package/app/public/i18n/literals/zh-TW.json +695 -578
- package/app/public/providers/mimo-desktop.png +0 -0
- package/app/public/providers/qoder-cn.png +0 -0
- package/app/public/providers/qoder.png +0 -0
- package/app/public/providers/stepfun.png +0 -0
- package/app/public/providers/xiaomi-tokenplan.png +0 -0
- package/app/src/lib/db/adapters/betterSqliteAdapter.js +6 -2
- package/app/src/lib/db/migrate.js +5 -2
- package/app/src/lib/oauth/services/qoder.js +13 -3
- package/app/src/lib/oauth/xiaomiIdentity.js +50 -41
- package/app/src/lib/updater/updater.js +95 -5
- package/app/src/mitm/server.js +14 -14
- package/app/src/sse/services/qoderCheckin.js +437 -0
- package/cli.js +91 -9
- package/hooks/postinstall.js +11 -1
- package/hooks/sqliteRuntime.js +27 -9
- package/hooks/trayRuntime.js +5 -2
- package/package.json +11 -2
- package/src/cli/doctor.js +525 -0
- package/src/cli/i18n/locales/en/core.json +42 -2
- package/src/cli/i18n/locales/en/settings.json +3 -3
- package/src/cli/i18n/locales/zh-CN/core.json +42 -2
- package/src/cli/i18n/locales/zh-CN/settings.json +3 -3
- package/src/cli/i18n/locales/zh-TW/core.json +42 -2
- package/src/cli/i18n/locales/zh-TW/settings.json +3 -3
- package/src/cli/menus/settings.js +26 -8
- package/src/cli/staleServer.js +216 -0
- package/app/.next-cli-build/server/chunks/1377.js +0 -1
- package/app/.next-cli-build/server/chunks/1937.js +0 -1
- package/app/.next-cli-build/server/chunks/1968.js +0 -1
- package/app/.next-cli-build/server/chunks/2268.js +0 -1
- package/app/.next-cli-build/server/chunks/3395.js +0 -1
- package/app/.next-cli-build/server/chunks/3546.js +0 -1
- package/app/.next-cli-build/server/chunks/4055.js +0 -9
- package/app/.next-cli-build/server/chunks/4531.js +0 -1
- package/app/.next-cli-build/server/chunks/4848.js +0 -1
- package/app/.next-cli-build/server/chunks/4862.js +0 -1
- package/app/.next-cli-build/server/chunks/4985.js +0 -1
- package/app/.next-cli-build/server/chunks/5217.js +0 -9
- package/app/.next-cli-build/server/chunks/7805.js +0 -33
- package/app/.next-cli-build/server/chunks/8910.js +0 -2
- package/app/.next-cli-build/server/chunks/8990.js +0 -1
- package/app/.next-cli-build/static/0UB55QZoHsERFCcuezqF6/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/1243-220f1fd87235cb92.js +0 -3
- package/app/.next-cli-build/static/chunks/1321-c260dcc02a05636e.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-5558a45da400f48e.js +0 -7
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-395c2359af9bc2a9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-b0d4fedb7b84fe8a.js +0 -59
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-502e7efb917191b9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-720b5ab2e46fc6bb.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-df0197fa38b2dd6d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-6fa55fa547594c8c.js +0 -14
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-c44ffd57ebec461e.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-5f5434b22c7f7b73.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c640efd5ea8efb38.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-27bf96f0f2568f09.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/landing/page-3c92a951f3cc5eee.js +0 -1
- package/app/.next-cli-build/static/chunks/app/layout-034acae46f56c420.js +0 -1
- package/app/.next-cli-build/static/chunks/app/login/page-0da5fcc5d841cbb9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f2f9b74f8844db3a.js +0 -1
- package/app/.next-cli-build/static/css/246bebea1dda73a2.css +0 -1
- package/app/.next-cli-build/static/css/8f9ac5a7bd3a79e5.css +0 -1
- /package/app/.next-cli-build/static/{0UB55QZoHsERFCcuezqF6 → mzc6AVdJokpIsYjtjKON0}/_ssgManifest.js +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{70217:(e,t,s)=>{"use strict";function i(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>i})},74325:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>Q});var i=s(95155),l=s(12115),a=s(73321),n=s(98500),r=s.n(n),o=s(5772),d=s(8247),c=s(35497),m=s(88105),p=s(28777),u=s(990),x=s(62630);s(67468);let h=["none","low","medium","high"],f=["none","thinking"],g=["none","low","medium","high","max"],y={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":g,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":h,zai:f,qwen:h,kimi:g,deepseek:["none","high","max"],minimax:f,hunyuan:h,step:h},b=["none","minimal","low","medium","high","xhigh","max"],v=[{provider:"codex",pattern:"*gpt-6*",levels:b},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...b,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...b,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:b},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*preview*",levels:["none","low","medium","high","xhigh"]},{provider:"amd",pattern:"DeepSeek-V4-Flash*",levels:["none","minimal","low","medium","high","xhigh","max"]},{provider:"amd",pattern:"Qwen3.8-Flash-Next",levels:["none","low","medium","xhigh"]},{provider:"codebuddy-cn",pattern:"glm-5.3*",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]}];function j(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let s=t.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!s)return null;let[,i,l]=s,a=Number(i),n=void 0===l?null:Number(l);return a<4||4===a&&(null===n||n<=5||null!==n&&n>=1e3)?null:"output_config"}(t))return null;let s=(0,u.nl)(e,t);if(!s.reasoning)return null;let i=v.find(s=>(!s.provider||s.provider===e)&&(0,x.gH)(s.pattern,t)),l=i?.levels||y[s.thinkingFormat]||h;return!1===s.thinkingCanDisable&&(l=l.filter(e=>"none"!==e)),l}var w=s(11059),k=s(929),N=s(73006),T=s(65921);let C=new Map;async function S(e){if(!e?.url||!e?.type)return[];let t=C.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let i=(await s.json()).data??[];return C.set(e.url,{data:i,expiresAt:Date.now()+6e5}),i}catch{return[]}}function $({customModels:e=[],modelAliases:t={},providerAlias:s,builtInModels:i=[],type:l="llm",includeLegacyAliases:a=!0}){let n=new Set(i.map(e=>e.id)),r=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==s)continue;let e=t?.kind||t?.type||"llm";if(l&&e!==l||n.has(t.id))continue;let i=`${s}/${t.id}`;r.has(i)||(r.add(i),o.push({id:t.id,name:t.name||t.id,fullModel:i,source:"custom",type:e,enabled:!1!==t.enabled,...void 0===t.vision?{}:{vision:t.vision},...void 0===t.reasoning?{}:{reasoning:t.reasoning},...void 0===t.contextWindow?{}:{contextWindow:t.contextWindow},...void 0===t.maxOutput?{}:{maxOutput:t.maxOutput}}))}if(!a)return o;let d=`${s}/`;for(let[e,s]of Object.entries(t||{})){if("string"!=typeof s||!s.startsWith(d))continue;let t=s.slice(d.length);!t||n.has(t)||r.has(s)||(r.add(s),o.push({id:t,alias:e,fullModel:s,source:"legacyAlias",type:l||"llm"}))}return o}let A=/https:\/\/accounts\.google\.com\/signin\/continue[^\s"'<>)\]]+/;function O(e){if("string"!=typeof e)return null;let t=A.exec(e);return t?t[0]:null}function E(e,t){return(0,N.Tl)(e).replace("{n}",String(t))}function P(e){if(!e||"string"!=typeof e)return e??"";let t=(0,N.Tl)(e);if(t&&t!==e)return t;if(/Individual quota reached|QUOTA_EXHAUSTED|RESOURCE_EXHAUSTED/i.test(e)){let t,s,i,l,a,n,r,o,{delay:d,timestamp:c}=(t=String(e||""),s=null,i=null,l=/"quotaResetDelay"\s*:\s*"([^"]+)"/.exec(t),a=/\bResets in\s+([0-9hms.]+)/i.exec(t),s=l&&l[1]||a&&a[1]||null,n=/"quotaResetTimeStamp"\s*:\s*"([^"]+)"/.exec(t),r=/"quotaResetTimeStamp"\s*:\s*(".*?"|\S+)/.exec(t),(i=n&&n[1]||r&&r[1]||null)&&(i=i.replace(/^"|"$/g,"")),{delay:s,timestamp:i}),m=function(e){if(!e)return"";let{h:t,m:s,s:i}=e;i>=60&&(s+=Math.floor(i/60),i%=60),s>=60&&(t+=Math.floor(s/60),s%=60);let l=[];return t>0&&l.push(E("{n}h",t)),s>0&&l.push(E("{n}m",s)),(i>0||0===l.length)&&l.push(E("{n}s",i)),l.join(" ")}((o=/^(?:(\d+(?:\.\d+)?)h)?(?:(\d+(?:\.\d+)?)m)?(?:(\d+(?:\.\d+)?)s)?$/i.exec(String(d||"").trim()))&&(o[1]||o[2]||o[3])?{h:Math.floor(parseFloat(o[1]||0)),m:Math.floor(parseFloat(o[2]||0)),s:Math.round(parseFloat(o[3]||0))}:null),p=c?function(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e||"";try{return t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t.toISOString()}}(c):"",u=(0,N.Tl)("Individual quota reached. Resets at {time} (in {duration}).");return(u=u.replace("{time}",p||(0,N.Tl)("shortly"))).replace("{duration}",m||(0,N.Tl)("a short while"))}return t}var I=s(14051),D=s.n(I);function R({model:e,fullModel:t,alias:s,copied:a,onCopy:n,testStatus:r,isCustom:o,isFree:d,onDeleteAlias:m,onTest:p,isTesting:u,onDisable:x,onEnable:h,caps:f,thinkingSuffix:g}){let y=function(){let[e,t]=(0,l.useState)(()=>new Date().getHours());return(0,l.useEffect)(()=>{let e=setInterval(()=>t(new Date().getHours()),6e4);return()=>clearInterval(e)},[]),e}(),b=g?`${t}(${g})`:t,v="number"==typeof e.rateMultiplier?e.rateMultiplier:null,j=function(e,t){if(!t||"number"!=typeof e||Number.isNaN(e))return!1;let{from:s,to:i}=t;return s<=i?e>=s&&e<i:e>=s||e<i}(y,e.nightFree),w=null!==v&&v>0&&function(e,t=Date.now()){let s=function(e){let t=e?.promoFreeUntil;if("string"!=typeof t||""===t.trim())return null;let s=Date.parse(t);return Number.isFinite(s)?s:null}(e);return null!==s&&t<s}(e),k=w?0:v,T=j||0===k,C="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,i.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:C?{color:C}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,i.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:b}),(0,i.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,i.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,i.jsx)(c.nh,{caps:f,colorOverride:"text-text-muted/70",size:12}),(null!==k||j)&&(0,i.jsx)(c.m_,{text:j?`${(0,N.Tl)("Night-free window")} (23:00–08:00) — ${(0,N.Tl)("rides the free quota")}`:w?(0,N.Tl)("Credit multiplier")+`: ${v}x — `+(0,N.Tl)("promo free until")+` ${e.promoFreeUntil}`:0===k?(0,N.Tl)("Credit multiplier")+": 0x — "+(0,N.Tl)("rides the free quota"):(0,N.Tl)("Credit multiplier")+`: ${k}x`,children:(0,i.jsx)(c.Ex,{size:"sm",variant:T?"success":"default",className:`shrink-0 cursor-help leading-none${T?"":" font-mono"}`,children:T?"free":`${k.toFixed(2)}x`})})]})]}),p&&(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:p,disabled:u,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${u?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:u?{animation:"spin 1s linear infinite"}:void 0,children:u?"progress_activity":"science"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:u?"Testing...":"Test"})]}),(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:()=>n(b,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:a===`model-${e.id}`?"Copied!":"Copy"})]}),o?(0,i.jsx)("button",{onClick:m,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):h?(0,i.jsx)("button",{onClick:h,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-green-500/10 hover:text-green-500",title:(0,N.Tl)("Enable this model"),children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"})}):x?(0,i.jsx)("button",{onClick:x,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function q({modelId:e,fullModel:t,copied:s,onCopy:l,onDeleteAlias:a,onToggle:n,enabled:r=!0,onTest:o,testStatus:d,isTesting:c}){let m="ok"===d?"#22c55e":"error"===d?"#ef4444":void 0;return(0,i.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===d?"border-green-500/40":"error"===d?"border-red-500/40":"border-border"} hover:bg-sidebar/50 ${r?"":"opacity-60"}`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:m?{color:m}:void 0,children:"ok"===d?"check_circle":"error"===d?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,i.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,i.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:()=>l(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),o&&(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:o,disabled:c,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]})]})]}),n&&(0,i.jsx)("button",{onClick:n,className:`p-1 rounded ${r?"text-amber-500 hover:bg-amber-50 dark:hover:bg-amber-500/10":"text-green-600 hover:bg-green-50 dark:hover:bg-green-500/10"}`,title:r?"Disable model":"Activate model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:r?"block":"restart_alt"})}),(0,i.jsx)("button",{onClick:a,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function U({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:a,copied:n,onCopy:r,onDeleteAlias:o,onAddCustomModel:d,onToggleCustomModel:m,onDeleteCustomModel:p,onBulkCustomModels:u,connections:x,isAnthropic:h}){let f=(0,T.i)(),[g,y]=(0,l.useState)(""),[b,v]=(0,l.useState)(!1),[j,w]=(0,l.useState)(!1),[k,C]=(0,l.useState)(null),[S,A]=(0,l.useState)({}),O=async t=>{if(!k){C(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),i=await s.json();A(e=>({...e,[t]:i.ok?"ok":"error"}))}catch{A(e=>({...e,[t]:"error"}))}finally{C(null)}}},E=$({customModels:a,modelAliases:s,providerAlias:e,type:"llm"}),P=E.filter(e=>!1!==e.enabled),I=E.filter(e=>!1===e.enabled),D=async()=>{if(!g.trim()||b)return;let e=g.trim();if(E.some(t=>t.id===e))return void f.warning("Model already exists for this provider.");v(!0);try{await d(e),y("")}catch(e){console.log("Error adding model:",e)}finally{v(!1)}},R=async()=>{if(j)return;let e=x.find(e=>!1!==e.isActive);if(e){w(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void f.error(s.error||"Failed to import models");let i=s.models||[];if(0===i.length)return void f.warning("No models returned from /models.");let l=0;for(let e of i){let t=e.id||e.name||e.model;t&&(E.some(e=>e.id===t)||(await d(t,!1),l+=1))}0===l&&f.warning("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{w(!1)}}},_=x.some(e=>!1!==e.isActive);return(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",h?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,i.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,i.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,i.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,i.jsx)("input",{id:"new-compatible-model-input",type:"text",value:g,onChange:e=>y(e.target.value),onKeyDown:e=>"Enter"===e.key&&D(),placeholder:h?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:D,disabled:!g.trim()||b,children:b?"Adding...":"Add"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:R,disabled:!_||j,children:j?"Importing...":"Import from /models"})]}),!_&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),E.length>0&&u&&(0,i.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,i.jsxs)("span",{children:[E.length," custom model",E.length>1?"s":""]}),(0,i.jsx)("span",{children:"\xb7"}),(0,i.jsx)("button",{onClick:()=>u(!0),className:"text-primary hover:underline",children:(0,N.Tl)("Enable all")}),(0,i.jsx)("span",{children:"\xb7"}),(0,i.jsx)("button",{onClick:()=>u(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,N.Tl)("Disable all")}),(0,i.jsxs)("span",{children:["— ",(0,N.Tl)("bulk actions affect what clients see in /v1/models")]})]}),P.length>0&&(0,i.jsx)("div",{className:"flex flex-col gap-3",children:P.map(({id:s,alias:l,source:a})=>(0,i.jsx)(q,{modelId:s,fullModel:`${t}/${s}`,copied:n,onCopy:r,onDeleteAlias:()=>"custom"===a?p(s):o(l),onToggle:"custom"===a&&m?()=>m(s,!1):void 0,onTest:x.length>0?()=>O(s):void 0,testStatus:S[s],isTesting:k===s},`${a}-${e}/${s}`))}),I.length>0&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Disabled (activate to expose again):"}),I.map(({id:s,alias:l,source:a})=>(0,i.jsx)(q,{modelId:s,fullModel:`${t}/${s}`,copied:n,onCopy:r,enabled:!1,onDeleteAlias:()=>"custom"===a?p(s):o(l),onToggle:"custom"===a&&m?()=>m(s,!0):void 0,onTest:x.length>0?()=>O(s):void 0,testStatus:S[s],isTesting:k===s},`disabled-${a}-${e}/${s}`))]})]})}R.propTypes={model:D().shape({id:D().string.isRequired,rateMultiplier:D().number,nightFree:D().shape({from:D().number,to:D().number})}).isRequired,fullModel:D().string.isRequired,alias:D().string,copied:D().string,onCopy:D().func.isRequired,testStatus:D().oneOf(["ok","error"]),isCustom:D().bool,isFree:D().bool,onDeleteAlias:D().func,onTest:D().func,isTesting:D().bool,onDisable:D().func,onEnable:D().func,caps:D().object,thinkingSuffix:D().string},D().string.isRequired,D().string.isRequired,D().string,D().func.isRequired,D().func.isRequired,D().func,D().oneOf(["ok","error"]),D().bool,D().string.isRequired,D().object.isRequired,D().arrayOf(D().object),D().string,D().func.isRequired,D().func.isRequired,D().func.isRequired,D().func.isRequired,U.propTypes={providerStorageAlias:D().string.isRequired,providerDisplayAlias:D().string.isRequired,modelAliases:D().object.isRequired,customModels:D().arrayOf(D().object),copied:D().string,onCopy:D().func.isRequired,onDeleteAlias:D().func.isRequired,onAddCustomModel:D().func.isRequired,onBulkCustomModels:D().func,onToggleCustomModel:D().func,onDeleteCustomModel:D().func.isRequired,connections:D().arrayOf(D().shape({id:D().string,isActive:D().bool})).isRequired,isAnthropic:D().bool};var _=s(70217);function M({until:e,inline:t=!1}){let[s,a]=(0,l.useState)("");return((0,l.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void a("");let s=Math.floor(t/1e3);if(s<60)a(`${s}s`);else if(s<3600)a(`${Math.floor(s/60)}m ${s%60}s`);else{let e=Math.floor(s/3600),t=Math.floor(s%3600/60);a(`${e}h ${t}m`)}};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),s)?t?(0,i.jsxs)("span",{className:"shrink-0 text-xs text-orange-500 font-mono",children:[(0,i.jsx)("span",{className:"text-[0.85em] leading-none",children:"⏱"})," ",s]}):(0,i.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:[(0,i.jsx)("span",{className:"text-[0.85em] leading-none",children:"⏱"})," ",s]}):null}function F({connection:e,proxyPools:t,isOAuth:s,isFirst:a,isLast:n,onMoveUp:r,onMoveDown:o,onToggleActive:d,onUpdateProxy:m,onEdit:p,onDelete:u,oneByOneStatus:x=null,autoPing:h=null}){let[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),v=(0,l.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),k=e.providerSpecificData?.proxyPoolId||null,T=k?j.get(k):null,C=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,S=!!k||C,$=T?`Pool: ${T.name}`:k?`Pool: ${k} (inactive/missing)`:C?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A=h?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",E="";if(T?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=T?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);E=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{E=t}}let I=T?.noProxy||e.providerSpecificData?.connectionNoProxy||"",D="default";T?.isActive===!0?D="success":(k||C)&&(D="error"),(0,l.useEffect)(()=>{if(!f)return;let e=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let R=async e=>{b(!0);try{await m("__none__"===e?null:e)}finally{b(!1),g(!1)}},q=e.authType||(s?"oauth":"apikey"),U="oauth"===q,z="cookie"===q,K=e.providerSpecificData?.authMethod,J="string"==typeof e.accessToken?e.accessToken:"",L=e.hasDesktopSession??!!e.providerSpecificData?.mimoPassToken,W=e.hasAccessToken??(J.length>0&&!J.startsWith("mimo-desktop-session")),B="desktop-session"===K||L&&!W,H=L&&W,V=!H&&!B&&"oauth"===K,G=B||H?(0,N.Tl)("Desktop Session"):V?(0,N.Tl)("Browser sign-in"):U?"OAuth":z?"Cookie":"API Key",Q=H?(0,N.Tl)("Browser sign-in"):null,Z=e.providerSpecificData?.mimoUserId||e.providerSpecificData?.uid||null,X=("xiaomi-mimo"===e.provider||"xiaomi-tokenplan"===e.provider)&&Z?`MiMo ${Z}`:null,Y=e.name?.trim()||X||e.email?.trim()||e.displayName?.trim()||(U?"OAuth Account":z?"Cookie Account":"API Key"),ee=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()||X&&e.email?.trim()&&e.email.trim()!==X?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[et,es]=(0,l.useState)(!1),ei=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,l.useEffect)(()=>{let t=()=>{es(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=ei?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[ei]);let el="unavailable"!==e.testStatus||et?e.testStatus:"active",ea=!1!==e.isActive?O(e.lastError):null,{copied:en,copy:er}=(0,w.C)(),eo=()=>x?"queued"===x.state?(0,N.Tl)("queued"):"testing"===x.state?(0,N.Tl)("testing"):"success"===x.state?(0,N.Tl)("success"):"failed"===x.state?x.error?`${(0,N.Tl)("failed")}: ${x.error}`:(0,N.Tl)("failed"):null:null;return(0,i.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,i.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,i.jsx)("button",{onClick:r,disabled:a,className:`p-0.5 rounded ${a?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,i.jsx)("button",{onClick:o,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:L?"computer":V?"login":z?"cookie":U?"lock":"key"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:Y}),ee&&(0,i.jsx)("p",{className:"text-xs text-text-muted truncate",children:ee}),(0,i.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,i.jsx)(c.Ex,{variant:(0,_.g)(e.isActive,el),size:"sm",dot:!0,children:!1===e.isActive?(0,N.Tl)("disabled"):el||(0,N.Tl)("Unknown")}),(0,i.jsx)(c.Ex,{variant:"default",size:"sm",children:G}),Q&&(0,i.jsx)(c.Ex,{variant:"default",size:"sm",children:Q}),S&&(0,i.jsx)(c.Ex,{variant:D,size:"sm",children:"Proxy"}),e.earliestPackageExpiry&&(0,i.jsxs)(c.Ex,{variant:"outline",size:"sm",title:`${(0,N.Tl)("Earliest package")}: ${e.earliestPackageName||(0,N.Tl)("Quota package")} (${new Date(e.earliestPackageExpiry).toLocaleString()})`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[12px] mr-1",children:"schedule"}),function(e){if(!e)return"";let t=new Date(e).getTime()-Date.now();if(t<=0)return(0,N.Tl)("expired");let s=Math.floor(t/36e5);if(s<24)return`${s}h`;let i=Math.floor(s/24);return i<30?`${i}d`:new Date(e).toLocaleDateString()}(e.earliestPackageExpiry)]}),et&&!1!==e.isActive&&!e.lastError&&(0,i.jsx)(M,{until:ei}),e.lastError&&!1!==e.isActive&&(0,i.jsxs)("span",{className:"inline-flex items-center gap-1 max-w-full truncate text-xs text-red-500 sm:max-w-[380px]",title:P(e.lastError),children:[et&&(0,i.jsx)(M,{until:ei,inline:!0}),P(e.lastError)]}),ea&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("a",{href:ea,target:"_blank",rel:"noopener noreferrer",title:(0,N.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"shrink-0 text-xs text-blue-500 underline hover:text-blue-400",children:(0,N.Tl)("Verify your account")}),(0,i.jsx)("button",{type:"button",onClick:()=>er(ea,"verification"),title:(0,N.Tl)("Copy link"),className:"shrink-0 text-xs text-text-muted hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm align-middle",children:"verification"===en?"check":"content_copy"})})]}),(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),eo()&&(0,i.jsx)(c.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:eo()})]}),S&&(0,i.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,i.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:$,children:$}),E&&(0,i.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:E}),I&&(0,i.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:I,children:["no_proxy: ",I]})]})]})]}),(0,i.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,i.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,i.jsxs)("div",{className:"relative",ref:v,children:[(0,i.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${S?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,i.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,i.jsx)("button",{onClick:()=>R("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!k?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,i.jsx)("button",{onClick:()=>R(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${k===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,i.jsx)(c.m_,{text:A,children:(0,i.jsxs)("button",{onClick:()=>h.onToggle(!h.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,i.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,i.jsxs)("button",{onClick:u,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,i.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}M.propTypes={until:D().string.isRequired,inline:D().bool},F.propTypes={connection:D().shape({id:D().string,name:D().string,email:D().string,displayName:D().string,modelLockUntil:D().string,testStatus:D().string,isActive:D().bool,lastError:D().string,priority:D().number,globalPriority:D().number}).isRequired,proxyPools:D().arrayOf(D().shape({id:D().string,name:D().string,proxyUrl:D().string,noProxy:D().string,isActive:D().bool})),isOAuth:D().bool.isRequired,isFirst:D().bool.isRequired,isLast:D().bool.isRequired,onMoveUp:D().func.isRequired,onMoveDown:D().func.isRequired,onToggleActive:D().func.isRequired,onUpdateProxy:D().func,onEdit:D().func.isRequired,onDelete:D().func.isRequired,oneByOneStatus:D().shape({state:D().string,error:D().string}),autoPing:D().shape({on:D().bool,onToggle:D().func,provider:D().string})};let z=`name1|sk-key1
|
|
2
|
-
name2|sk-key2
|
|
3
|
-
sk-key-only-auto-named`;function K({isOpen:e,provider:t,providerName:s,isCompatible:a,isAnthropic:n,authType:r,authHint:o,website:d,proxyPools:p,error:u,existingNames:x,onSave:h,onBulkDone:f,onClose:g}){let y="__none__",b="ollama-local"===t,v="cookie"===r,j="xai"===t&&!v,w=v?"Cookie Value":"qoder"===t?"Personal Access Token (PAT)":"API Key",k="azure"===t,T="cloudflare-ai"===t,C=m.Q2?.[t]?.regions||null,S=m.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[$,A]=(0,l.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:y,ollamaHostUrl:""}),[O,E]=(0,l.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[P,I]=(0,l.useState)({accountId:""}),[D,R]=(0,l.useState)(S),[q,U]=(0,l.useState)(!1),[_,M]=(0,l.useState)(null),[F,J]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(e&&C&&!q){let e=!0;return fetch("/api/network/egress-region").then(e=>e.json()).then(s=>{if(!e)return;let i=s?.recommendedRegions?.[t];i&&C.some(e=>e.id===i)&&(R(i),M({country:s.country||s.countryCode,regionId:i}))}).catch(()=>{}),()=>{e=!1}}},[e,t,C,q]);let[L,W]=(0,l.useState)(null),[B,H]=(0,l.useState)(null),[V,G]=(0,l.useState)(!1),[Q,Z]=(0,l.useState)(!1),X=T?`name1|sk-key1|acc123456
|
|
4
|
-
name2|sk-key2|def789012
|
|
5
|
-
sk-key-only-auto-named`:"qoder"===t?`name1|pt-xxxxx
|
|
6
|
-
name2|pt-yyyyy
|
|
7
|
-
pt-only-auto-named`:z,[Y,ee]=(0,l.useState)("single"),[et,es]=(0,l.useState)(""),[ei,el]=(0,l.useState)(null),ea=()=>b&&$.ollamaHostUrl.trim()?{baseUrl:$.ollamaHostUrl.trim()}:k?{azureEndpoint:O.azureEndpoint,apiVersion:O.apiVersion,deployment:O.deployment,organization:O.organization}:T?{accountId:P.accountId}:C&&D?{region:D}:void 0,en=async()=>{J(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:ea()})}),s=await e.json();W(s.valid?"success":"failed"),H(s.valid?null:s.error||null),G(!!s.maintenance)}catch{W("failed"),H(null),G(!1)}finally{J(!1)}},er=async()=>{if(t&&(b||$.apiKey)&&(b||$.name)&&(!a||$.defaultModel.trim())){Z(!0);try{let e=!1;try{J(!0),W(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:ea()})});e=!!(await s.json()).valid,W(e?"success":"failed")}catch{W("failed")}finally{J(!1)}await h({name:$.name||(b?"Ollama Local":""),apiKey:$.apiKey,defaultModel:a?$.defaultModel.trim():void 0,priority:$.priority,proxyPoolId:$.proxyPoolId===y?null:$.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:ea()})}finally{Z(!1)}}},eo=async()=>{let e=et.split("\n");if(!e.length)return;let s=function(e,t,s={}){let{isCloudflareAi:i=!1}=s,l=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),a=[];for(let t of e){let e,s="string"==typeof t?t.trim():"";if(!s)continue;let n=function(e,t={}){let{isCloudflareAi:s=!1}=t,i=e.split("|");if(s&&i.length>=3){let e=i[0].trim();return{baseName:e||"Key",apiKey:i.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:i[i.length-1].trim()}}}return i.length>=2?{baseName:i[0].trim()||"Key",apiKey:i.slice(1).join("|").trim()}:{baseName:"Key",apiKey:i[0].trim()}}(s,{isCloudflareAi:i});if(!n||!n.apiKey)continue;let r=n.baseName,o=1;for(;e=`${r} ${o}`,l.has(e.toLowerCase());)o+=1;l.add(e.toLowerCase());let d={name:e,apiKey:n.apiKey,skipped:!1};n.providerSpecificData&&(d.providerSpecificData=n.providerSpecificData),a.push(d)}return a}(e,x,{isCloudflareAi:T});if(!s.length)return;Z(!0),el(null);let i=0,l=0;for(let e of s)try{let s=!1;try{let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});s=!!(await i.json().catch(()=>({}))).valid}catch{s=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey,name:e.name,priority:1,testStatus:s?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?i++:l++}catch{l++}Z(!1),el({success:i,failed:l}),i>0&&f&&f()};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Add ${s||t} ${w}`,onClose:g,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{size:"sm",variant:"single"===Y?"primary":"ghost",onClick:()=>{ee("single"),el(null)},children:"Single"}),(0,i.jsx)(c.$n,{size:"sm",variant:"bulk"===Y?"primary":"ghost",onClick:()=>{ee("bulk"),el(null)},children:"Bulk Add"})]}),"bulk"===Y&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:T?(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===t?(0,i.jsxs)(i.Fragment,{children:["One PAT per line. Format: ",(0,i.jsx)("code",{children:"name|pt-..."})," or just ",(0,i.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,i.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:X,value:et,onChange:e=>es(e.target.value)}),ei&&(0,i.jsxs)("div",{className:`text-sm font-medium ${ei.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",ei.success," added",ei.failed>0?`, ✗ ${ei.failed} failed`:""]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:eo,fullWidth:!0,disabled:Q||!et.trim(),children:Q?"Adding...":"Add All Keys"}),(0,i.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===Y&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.pd,{label:"Name",value:$.name,onChange:e=>A({...$,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),b&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:"Ollama Host URL",value:$.ollamaHostUrl,onChange:e=>A({...$,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:en,disabled:F||Q,variant:"secondary",children:F?"Checking...":"Check"})})]}),!b&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:w,type:v?"text":"password",value:$.apiKey,onChange:e=>A({...$,apiKey:e.target.value}),placeholder:v?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"qoder"===t?"pt-...":"",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:en,disabled:!$.apiKey||F||Q,variant:"secondary",children:F?"Checking...":"Check"})})]}),j&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),v&&o&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:[o,d&&(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",d.replace(/^https?:\/\//,"")]})]})]}),C&&(0,i.jsxs)("div",{children:[(0,i.jsx)(c.l6,{label:"Region",value:D,onChange:e=>{R(e.target.value),U(!0)},options:C.map(e=>({value:e.id,label:e.label}))}),_&&!q&&(0,i.jsxs)("p",{className:"text-xs text-primary mt-1 flex items-center gap-1",children:[(0,i.jsx)("span",{children:"\uD83C\uDF10"}),(0,i.jsx)("span",{children:(0,N.Tl)("Auto-matched region based on network location ({country})").replace("{country}",_.country)})]})]}),a&&(0,i.jsx)(c.pd,{label:"Default Model",value:$.defaultModel,onChange:e=>A({...$,defaultModel:e.target.value}),placeholder:n?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),b&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,i.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,i.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),L&&(0,i.jsx)(c.Ex,{variant:"success"===L?"success":V?"warning":"error",children:"success"===L?"Valid":V?"Check endpoint":"Invalid"}),V&&B&&(0,i.jsx)("p",{className:"text-xs text-amber-500 break-words",children:B}),u&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:u}),a&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),T&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,i.jsx)(c.pd,{label:"Account ID",value:P.accountId,onChange:e=>I({...P,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,i.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(c.pd,{label:"Azure Endpoint",value:O.azureEndpoint,onChange:e=>E({...O,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,i.jsx)(c.pd,{label:"Deployment Name",value:O.deployment,onChange:e=>E({...O,deployment:e.target.value}),placeholder:"gpt-4"}),(0,i.jsx)(c.pd,{label:"API Version",value:O.apiVersion,onChange:e=>E({...O,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,i.jsx)(c.pd,{label:"Organization",value:O.organization,onChange:e=>E({...O,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,i.jsx)(c.pd,{label:"Priority",type:"number",value:$.priority,onChange:e=>A({...$,priority:Number.parseInt(e.target.value)||1})}),(0,i.jsx)(c.l6,{label:"Proxy Pool",value:$.proxyPoolId,onChange:e=>A({...$,proxyPoolId:e.target.value}),options:[{value:y,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:er,fullWidth:!0,disabled:Q||!b&&(!$.name||!$.apiKey)||a&&!$.defaultModel.trim()||k&&(!O.azureEndpoint||!O.deployment||!O.organization)||T&&!P.accountId,children:Q?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function J({isOpen:e,node:t,onSave:s,onClose:a,isAnthropic:n}){let[r,o]=(0,l.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,m]=(0,l.useState)(!1),[p,u]=(0,l.useState)(""),[x,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(null);(0,l.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(n?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,n]);let v=async()=>{if(r.name.trim()&&r.prefix.trim()&&r.baseUrl.trim()){m(!0);try{let e={name:r.name,prefix:r.prefix,baseUrl:r.baseUrl};n||(e.apiType=r.apiType),await s(e)}finally{m(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:r.baseUrl,apiKey:p,type:n?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Edit ${n?"Anthropic":"OpenAI"} Compatible`,onClose:a,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(c.pd,{label:"Name",value:r.name,onChange:e=>o({...r,name:e.target.value}),placeholder:`${n?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,i.jsx)(c.pd,{label:"Prefix",value:r.prefix,onChange:e=>o({...r,prefix:e.target.value}),placeholder:n?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!n&&(0,i.jsx)(c.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:r.apiType,onChange:e=>o({...r,apiType:e.target.value})}),(0,i.jsx)(c.pd,{label:"Base URL",value:r.baseUrl,onChange:e=>o({...r,baseUrl:e.target.value}),placeholder:n?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${n?"Anthropic":"OpenAI"}-compatible API.`}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>u(e.target.value),className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:j,disabled:!p||f||!r.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,i.jsx)(c.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,i.jsx)(c.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:v,fullWidth:!0,disabled:!r.name.trim()||!r.prefix.trim()||!r.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function L({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:a,onClose:n}){let[r,o]=(0,l.useState)(""),[d,m]=(0,l.useState)(null),[p,u]=(0,l.useState)(""),[x,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&(o(""),m(null),u(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(r.trim());if(e){m("testing"),u("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),i=await s.json();m(i.ok?"ok":"error"),u(i.error||"")}catch(e){m("error"),u(e.message)}}},y=async()=>{let e=f(r.trim());if(e&&!x){h(!0);try{await a(e)}finally{h(!1)}}};return(0,i.jsx)(c.aF,{isOpen:e,onClose:n,title:"Add Custom Model",children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)("input",{type:"text",value:r,onChange:e=>{o(e.target.value),m(null),u("")},onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,i.jsx)(c.$n,{variant:"secondary",icon:"science",loading:"testing"===d,onClick:g,disabled:!r.trim()||"testing"===d,children:"testing"===d?"Testing...":"Test"})]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,i.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(r.trim())||"model-id"})]})]}),"ok"===d&&(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===d&&(0,i.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,i.jsx)("span",{children:p||"Model not reachable"})]}),(0,i.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,i.jsx)(c.$n,{onClick:n,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,i.jsx)(c.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!r.trim()||x,children:x?"Adding...":"Add Model"})]})]})})}K.propTypes={isOpen:D().bool.isRequired,provider:D().string,providerName:D().string,isCompatible:D().bool,isAnthropic:D().bool,authType:D().string,authHint:D().string,website:D().string,proxyPools:D().arrayOf(D().shape({id:D().string,name:D().string})),error:D().string,existingNames:D().arrayOf(D().string),onSave:D().func.isRequired,onBulkDone:D().func,onClose:D().func.isRequired},J.propTypes={isOpen:D().bool.isRequired,node:D().shape({id:D().string,name:D().string,prefix:D().string,apiType:D().string,baseUrl:D().string}),onSave:D().func.isRequired,onClose:D().func.isRequired,isAnthropic:D().bool},L.propTypes={isOpen:D().bool.isRequired,providerAlias:D().string.isRequired,providerDisplayAlias:D().string.isRequired,onSave:D().func.isRequired,onClose:D().func.isRequired};let W=`[
|
|
8
|
-
{
|
|
9
|
-
"accessToken": "eyJhbGc...",
|
|
10
|
-
"refreshToken": "rt_...",
|
|
11
|
-
"idToken": "eyJhbGc...",
|
|
12
|
-
"email": "user@example.com"
|
|
13
|
-
}
|
|
14
|
-
]`;function B({isOpen:e,onClose:t,onSuccess:s}){let[a,n]=(0,l.useState)(""),[r,o]=(0,l.useState)(!1),[d,m]=(0,l.useState)(""),[p,u]=(0,l.useState)(null),x=()=>{r||(n(""),m(""),u(null),t())},h=async()=>{var e;let t;m(""),u(null);let i=a.trim();if(!i)return;try{t=JSON.parse(i)}catch(e){m(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`);return}let l=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!l||0===l.length)return void m((0,N.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:l})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,N.Tl)("Request failed"))}finally{o(!1)}},f=p?.results?.filter(e=>!e.ok)||[];return(0,i.jsx)(c.aF,{isOpen:e,title:(0,N.Tl)("Bulk Add Codex Accounts"),onClose:x,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:(0,N.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,i.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:W,value:a,onChange:e=>n(e.target.value),disabled:r}),d&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,N.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,N.Tl)("failed")}`:""]}),f.length>0&&(0,i.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,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:h,fullWidth:!0,disabled:r||!a.trim(),children:r?(0,N.Tl)("Importing..."):(0,N.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:x,variant:"ghost",fullWidth:!0,disabled:r,children:(0,N.Tl)("Close")})]})]})})}function H({isOpen:e,onClose:t,onSuccess:s,password:a=""}){let[n,r]=(0,l.useState)(""),[o,d]=(0,l.useState)(""),[m,p]=(0,l.useState)(!1),[u,x]=(0,l.useState)(""),[h,f]=(0,l.useState)(null),g=(0,l.useRef)(null),y=()=>{m||(r(""),d(""),x(""),f(null),g.current&&(g.current.value=""),t())},b=async()=>{let e;x(""),f(null);let t=n.trim();if(!t)return;try{e=JSON.parse(t)}catch(e){x(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void x((0,N.Tl)("No accounts found in input"));p(!0);try{let e=await fetch("/api/oauth/codebuddy-cn/bulk-import",{method:"POST",headers:{"Content-Type":"application/json",...a?{"x-9r-password":a}:{}},body:JSON.stringify({accounts:i})}),t=await e.json();if(!e.ok)return void x(401===e.status?(0,N.Tl)("Invalid password"):t?.error||`Request failed: ${e.status}`);f(t),(t.imported>0||t.updated>0)&&"function"==typeof s&&s()}catch(e){x(e.message||(0,N.Tl)("Request failed"))}finally{p(!1)}},v=h?.results?.filter(e=>!e.ok)||[],j=h?.skipped??0;return(0,i.jsx)(c.aF,{isOpen:e,title:(0,N.Tl)("Import CodeBuddy CN Accounts"),onClose:y,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsx)(c.$n,{variant:"secondary",fullWidth:!0,icon:"upload_file",onClick:()=>g.current?.click(),disabled:m,children:o||(0,N.Tl)("Choose JSON file...")}),(0,i.jsx)("input",{ref:g,type:"file",accept:".json,application/json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(!t)return;d(t.name),x(""),f(null);let s=new FileReader;s.onload=()=>r(String(s.result||"")),s.onerror=()=>x((0,N.Tl)("Failed to read file")),s.readAsText(t)}})]}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)("div",{className:"absolute -top-2 left-2 bg-sidebar px-1 text-[10px] text-text-muted",children:(0,N.Tl)("Or paste JSON")}),(0,i.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 pt-4 text-sm font-mono resize-y min-h-[160px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:'[{ "access_token": "eyJ...", "refresh_token": "eyJ...", "nickname": "<nickname>" }]',value:n,onChange:e=>r(e.target.value),disabled:m})]}),u&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:u}),h&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:`text-sm font-medium ${h.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",h.imported," ",(0,N.Tl)("added"),", ",h.updated," ",(0,N.Tl)("updated"),j>0?`, ${j} ${(0,N.Tl)("skipped")}`:"",h.failed>0?`, ✗ ${h.failed} ${(0,N.Tl)("failed")}`:""]}),v.length>0&&(0,i.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:v.map(e=>(0,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:b,fullWidth:!0,disabled:m||!n.trim(),children:m?(0,N.Tl)("Importing..."):(0,N.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:y,variant:"ghost",fullWidth:!0,disabled:m,children:(0,N.Tl)("Close")})]})]})})}function V({isOpen:e,mode:t,provider:s,providerName:a,dashboardPassword:n,onClose:r,onSuccess:o}){let[d,m]=(0,l.useState)(""),[p,u]=(0,l.useState)(""),[x,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)(""),[y,b]=(0,l.useState)(null),[v,j]=(0,l.useState)(""),[w,k]=(0,l.useState)(null),T=(0,l.useRef)(null),C={"Content-Type":"application/json","x-9r-password":n||""},S=async()=>{if(g(""),d.length<4)return void g((0,N.Tl)("Passphrase must be at least 4 characters"));if(d!==p)return void g((0,N.Tl)("Passphrases do not match"));h(!0);try{let e=await fetch("/api/oauth/transfer/export",{method:"POST",headers:C,body:JSON.stringify({provider:s,passphrase:d})}),t=await e.json();if(!e.ok)throw Error(t?.error||`Request failed: ${e.status}`);let i=JSON.stringify(t.blob,null,2),l=URL.createObjectURL(new Blob([i],{type:"application/json"})),a=document.createElement("a");a.href=l,a.download=`oauth-${s}-transfer-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(l),1e3),b({exported:t.count})}catch(e){g(e.message||(0,N.Tl)("Export failed"))}finally{h(!1)}},$=async()=>{if(g(""),b(null),!w)return void g((0,N.Tl)("Pick a transfer file first"));if(!d)return void g((0,N.Tl)("Transfer passphrase required"));h(!0);try{let e=await fetch("/api/oauth/transfer/import",{method:"POST",headers:C,body:JSON.stringify({provider:s,passphrase:d,blob:w})}),t=await e.json();if(!e.ok){if(401===e.status&&/passphrase/i.test(t?.error||""))throw Error((0,N.Tl)("Wrong passphrase"));throw Error(t?.error||`Request failed: ${e.status}`)}b(t),"function"==typeof o&&o()}catch(e){g(e.message||(0,N.Tl)("Import failed"))}finally{h(!1)}};return(0,i.jsx)(c.aF,{isOpen:e,title:"export"===t?(0,N.Tl)("Export OAuth accounts"):(0,N.Tl)("Import OAuth accounts"),onClose:()=>{x||(m(""),u(""),h(!1),g(""),b(null),j(""),k(null),T.current&&(T.current.value=""),r())},children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,N.Tl)("Provider"),": ",(0,i.jsx)("span",{className:"font-medium text-text-main",children:a||s})]}),"export"===t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{type:"password",label:(0,N.Tl)("Transfer passphrase"),value:d,onChange:e=>m(e.target.value),placeholder:"••••••••"}),(0,i.jsx)(c.pd,{type:"password",label:(0,N.Tl)("Confirm passphrase"),value:p,onChange:e=>u(e.target.value),placeholder:"••••••••"})]}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:(0,N.Tl)("The file is encrypted with this passphrase — it is required again at import, and cannot be recovered.")}),f&&(0,i.jsx)("p",{className:"text-xs text-red-500",children:f}),y&&(0,i.jsxs)("p",{className:"text-xs text-green-600",children:[(0,N.Tl)("Export complete")," — ",y.exported," ",(0,N.Tl)("accounts exported")]}),(0,i.jsx)(c.$n,{onClick:S,disabled:x,fullWidth:!0,children:(0,N.Tl)("Export encrypted file")})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.pd,{label:(0,N.Tl)("Transfer file"),value:v,readOnly:!0,placeholder:(0,N.Tl)("Pick a transfer file first"),className:"cursor-pointer",onClick:()=>T.current?.click()}),(0,i.jsx)("input",{ref:T,type:"file",accept:".json,application/json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(!t)return;j(t.name),g(""),b(null);let s=new FileReader;s.onload=()=>{try{let e=JSON.parse(String(s.result||""));if(e?.format!=="10router-oauth-secure-v1"){g((0,N.Tl)("Unrecognized transfer file (expected an encrypted OAuth transfer)")),k(null);return}k(e)}catch(e){g(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`),k(null)}},s.onerror=()=>g((0,N.Tl)("Failed to read file")),s.readAsText(t)}}),(0,i.jsx)(c.pd,{type:"password",label:(0,N.Tl)("Transfer passphrase"),value:d,onChange:e=>m(e.target.value),placeholder:"••••••••"}),f&&(0,i.jsx)("p",{className:"text-xs text-red-500",children:f}),y&&(0,i.jsx)("div",{className:"text-xs text-text-muted",children:(0,i.jsxs)("p",{children:[(0,N.Tl)("Import complete"),": ",y.imported||0," ",(0,N.Tl)("imported"),", ",y.updated||0," ",(0,N.Tl)("updated"),(y.failed||0)>0?`, ${y.failed} ${(0,N.Tl)("failed")}`:""]})}),(0,i.jsx)(c.$n,{onClick:$,disabled:x,fullWidth:!0,children:(0,N.Tl)("Import connections")})]})]})})}B.propTypes={isOpen:D().bool.isRequired,onClose:D().func.isRequired,onSuccess:D().func},H.propTypes={isOpen:D().bool.isRequired,onClose:D().func.isRequired,onSuccess:D().func,password:D().string},V.propTypes={isOpen:D().bool.isRequired,mode:D().oneOf(["export","import"]).isRequired,provider:D().string.isRequired,providerName:D().string,dashboardPassword:D().string,onClose:D().func.isRequired,onSuccess:D().func};let G={claude:"claudeAutoPing",codex:"codexAutoPing"};function Q(){let e,t,s,n,u,x,h,f,g=(0,a.useParams)(),y=(0,a.useRouter)(),b=g.id,{getCaps:v}=(0,k.y)(),C=(0,T.i)(),[A,E]=(0,l.useState)([]),[I,D]=(0,l.useState)(!0),[q,_]=(0,l.useState)(null),[M,z]=(0,l.useState)([]),[W,Q]=(0,l.useState)(!1),[Z,X]=(0,l.useState)(!1),[Y,ee]=(0,l.useState)(!1),[et,es]=(0,l.useState)(!1),[ei,el]=(0,l.useState)(""),[ea,en]=(0,l.useState)(!1),[er,eo]=(0,l.useState)(!1),[ed,ec]=(0,l.useState)(!1),[em,ep]=(0,l.useState)(!1),[eu,ex]=(0,l.useState)(!1),[eh,ef]=(0,l.useState)(null),[eg,ey]=(0,l.useState)({}),[eb,ev]=(0,l.useState)([]),[ej,ew]=(0,l.useState)(!1),[ek,eN]=(0,l.useState)(!1),[eT,eC]=(0,l.useState)(!1),[eS,e$]=(0,l.useState)({open:!1,action:null,value:""}),[eA,eO]=(0,l.useState)(!1),[eE,eP]=(0,l.useState)(""),[eI,eD]=(0,l.useState)(""),[eR,eq]=(0,l.useState)(!1),[eU,e_]=(0,l.useState)({}),[eM,eF]=(0,l.useState)(""),[ez,eK]=(0,l.useState)(()=>new Set),[eJ,eL]=(0,l.useState)(!1),[eW,eB]=(0,l.useState)([]),[eH,eV]=(0,l.useState)("__none__"),[eG,eQ]=(0,l.useState)(!1),[eZ,eX]=(0,l.useState)(null),[eY,e0]=(0,l.useState)(""),[e1,e5]=(0,l.useState)(!1),[e2,e4]=(0,l.useState)("auto"),[e3,e6]=(0,l.useState)({enabled:!1,connections:{}}),[e7,e8]=(0,l.useState)([]),[e9,te]=(0,l.useState)(!1),[tt,ts]=(0,l.useState)([]),[ti,tl]=(0,l.useState)([]),[ta,tn]=(0,l.useState)([]),[tr,to]=(0,l.useState)(null),[td,tc]=(0,l.useState)(!1),[tm,tp]=(0,l.useState)(!1),[tu,tx]=(0,l.useState)(!1),[th,tf]=(0,l.useState)(null),[tg,ty]=(0,l.useState)({}),[tb,tv]=(0,l.useState)(null),tj=(0,l.useRef)(!1),[tw,tk]=(0,l.useState)(!1),{copied:tN,copy:tT}=(0,w.C)(),tC="ag_risk_confirmed",tS=()=>{"xiaomi-mimo"===b?X(!0):Q(!0)},t$=()=>{"antigravity"===b&&"true"!==window.localStorage.getItem(tC)?tc(!0):tz?tS():(el(""),es(!0))},tA=()=>{el(""),es(!0)},tO=()=>{tz?t$():tA()},tE=async()=>{if(!eA){eO(!0),eP("");try{let e=await fetch("/api/auth/verify-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:eS.value})});if(!e.ok){let t=await e.json().catch(()=>({}));eP(t?.error||(0,N.Tl)("Invalid password"));return}let{action:t}=eS;e$({open:!1,action:null,value:""}),"export"===t&&(tq(t),tD(!0))}catch(e){eP(e.message||(0,N.Tl)("Invalid password"))}finally{eO(!1)}}},tP=e=>{eD(""),e$({open:!0,action:e,value:""})},[tI,tD]=(0,l.useState)(!1),[tR,tq]=(0,l.useState)("export"),tU=async()=>{eC(!0);try{let e=await fetch("/api/oauth/codebuddy-cn/checkin",{method:"POST",cache:"no-store"}),t=await e.json();if(!e.ok)throw Error(t?.error||`Request failed: ${e.status}`);let s=Array.isArray(t?.results)?t.results:[];if(0===s.length)return void C.warning((0,N.Tl)("No CodeBuddy CN connections to check in"));let i=s.filter(e=>"checked-in"===e.status).length,l=s.filter(e=>"already"===e.status).length,a=s.filter(e=>"failed"===e.status).length;0===a?C.success(`${(0,N.Tl)("Check-in complete")}: ${i} ${(0,N.Tl)("checked-in")}, ${l} ${(0,N.Tl)("already checked in")}`):C.error(`${(0,N.Tl)("Check-in complete with errors")}: ${a} ${(0,N.Tl)("failed")}`)}catch(e){C.error((0,N.Tl)("Check-in failed")+": "+e.message)}finally{eC(!1)}},t_=()=>(0,i.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:(0,i.jsx)(c.$n,{size:"sm",icon:"calendar_today",onClick:tU,disabled:eT,className:"w-full sm:w-auto",title:(0,N.Tl)("CodeBuddy CN auto-checks in daily (retries all day until confirmed)"),children:eT?(0,N.Tl)("Checking in..."):(0,N.Tl)("Check in now")})}),tM=q?{id:q.id,name:q.name||("anthropic-compatible"===q.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===q.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===q.type?"AC":"OC",apiType:q.apiType,baseUrl:q.baseUrl,type:q.type}:m.zN[b]||m.fg[b]||m.IS[b]||m.nJ[b]||m.br[b],tF=tM?.authModes||[],tz=!!m.zN[b]||!!m.IS[b]||tF.includes("oauth"),tK=!!m.fg[b]||tF.includes("apikey"),tJ=!!m.IS[b]?.noAuth,tL="codebuddy-cn"===b,tW=tz&&tM?.authModes?.includes("oauth")&&ej,tB=tL&&ek,tH=(0,p.KC)(b),tV="cursor"===b&&tt.length>0?tt:tH,tG=(0,m.wG)(b),tQ=(0,m.mq)(b),tZ=(0,m.gb)(b),tX=tQ||tZ,tY=!tX&&tz&&tK,t0="xai"===b?"Grok Build OAuth":"grok-cli"===b?"Grok CLI Device Login":"kimi"===b?"Kimi Coding OAuth":"OAuth",t1="xai"===b?"xAI API Key":"kimi"===b?"Kimi API Key":"qoder"===b?"PAT":"API Key",t5=e=>{if(!e2||"auto"===e2)return null;let t=j(b,e);return t&&t.includes(e2)?e2:null},t2=tX?b:tG,t4=(()=>{let e=new Set,t=new Set,s=s=>{if(!s||t.has(s))return;t.add(s);let i=j(b,s);i&&i.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of tV)s(e.id);for(let e of ti)s(e.id);for(let e of eb)e.providerAlias===t2&&"llm"===(e.kind||e.type||"llm")&&s(e.id);return e.size?["auto",...e]:null})(),t3=tX?q?.prefix||b:tG,t6=(0,l.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(t2)}`,{cache:"no-store"}),t=await e.json();e.ok&&tn(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[t2]),t7=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t2,ids:[e]})})).ok&&await t6()}catch(e){console.log("Error disabling model:",e)}},t8=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(t2)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await t6()}catch(e){console.log("Error enabling model:",e)}},t9=async(e,t)=>{await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t2,id:e,type:"llm",enabled:t})})},se=async(e,t=[])=>{let s=e.length+t.length;s&&to({title:"Disable All Models",message:`Disable all ${s} model(s)?`,onConfirm:async()=>{to(null);try{for(let s of(e.length&&(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t2,ids:e})})).ok&&await t6(),t))await t9(s,!1);t.length&&await si()}catch(e){console.log("Error disabling all models:",e)}}})},st=async(e=[])=>{try{for(let t of((await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(t2)}`,{method:"DELETE"})).ok&&await t6(),e))await t9(t,!0);e.length&&await si()}catch(e){console.log("Error enabling all models:",e)}},ss=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ey(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),si=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ev(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,l.useEffect)(()=>{"kilocode"===b&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&tl(e.models)}).catch(()=>{})},[b]);let sl=(0,l.useCallback)(async()=>{try{let[e,t,s,i]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await e.json(),a=await t.json(),n=await s.json(),r=i.ok?await i.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===b);E(e)}s.ok&&z(n.proxyPools||[]);let o=(r.providerStrategies||{})[b]||{};eX(o.fallbackStrategy||null),e0(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1"),e5(!0===o.earliestExpiryFirst);let d=(r.providerThinking||{})[b]||{};e4(d.mode||"auto");let c=G[b],m=c&&r[c]||{};if(e6({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(a.nodes||[]).find(e=>e.id===b)||null;if(!e&&tX)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===b)||null))break}_(e)}}catch(e){console.log("Error fetching connections:",e)}finally{D(!1)}},[b,tX]),sa=(0,l.useCallback)(async()=>{await sl(),await t6()},[sl,t6]),sn=async e=>{try{let t=await fetch(`/api/provider-nodes/${b}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(_(s.node),await sl(),ep(!1))}catch(e){console.log("Error updating provider node:",e)}},sr=async(e,t,s=e1)=>{try{let i=await fetch("/api/settings",{cache:"no-store"}),l=(i.ok?await i.json():{}).providerStrategies||{},a={...l[b]||{}};e?a.fallbackStrategy=e:delete a.fallbackStrategy,"round-robin"===e&&""!==t?a.stickyRoundRobinLimit=Number(t)||3:delete a.stickyRoundRobinLimit,s?a.earliestExpiryFirst=!0:delete a.earliestExpiryFirst;let n={...l};0===Object.keys(a).length?delete n[b]:n[b]=a,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("Error saving provider strategy:",e)}},so=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[b]={mode:e}:delete s[b],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}},sd=async e=>{let t=G[b];if(t){e6(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,l.useEffect)(()=>{sl(),ss(),si(),t6()},[sl,ss,si,t6]),(0,l.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.json()).then(e=>{"boolean"==typeof e.codeBuddyOAuthImport&&ew(e.codeBuddyOAuthImport),"boolean"==typeof e.codeBuddyCheckin&&eN(e.codeBuddyCheckin)}).catch(e=>console.log("Error reading settings:",e))},[]),(0,l.useEffect)(()=>{if("cursor"!==b)return void ts([]);let e=A.find(e=>!1!==e.isActive);if(!e?.id)return void ts([]);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:s})=>{!t&&e&&Array.isArray(s.models)&&s.models.length>0&&ts(s.models)}).catch(()=>{}),()=>{t=!0}},[b,A]),(0,l.useEffect)(()=>{let e=(m.zN[b]||m.fg[b]||m.IS[b]||m.nJ[b])?.modelsFetcher;e&&S(e).then(e8)},[b]);let sc=async(e,t,s=tG)=>{let i=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:i,alias:t})});if(e.ok)await ss();else{let t=await e.json();C.error(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},sm=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ss()}catch(e){console.log("Error deleting alias:",e)}},sp=async(e,t="llm",s=t2,i={},l)=>{try{let a={providerAlias:s,id:e,type:t};if(void 0!==l&&(a.enabled=l),i&&"object"==typeof i)for(let e of["vision","reasoning","contextWindow","maxOutput","thinkingFormat"])void 0!==i[e]&&(a[e]=i[e]);let n=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(n.ok)await si(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await n.json();C.error(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},su=async(e,t="llm",s=t2)=>{try{let i=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${i}`,{method:"DELETE"})).ok&&(await si(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},sx=async(e,t,s="llm")=>{try{(await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t2,id:e,type:s,enabled:t})})).ok&&(await si(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error toggling custom model:",e)}},sh=(e,t="llm")=>{to({title:e?(0,N.Tl)("Enable all custom models?"):(0,N.Tl)("Disable all custom models?"),message:e?(0,N.Tl)("All custom models of this provider will be listed in /v1/models and exposed to clients."):(0,N.Tl)("All custom models of this provider will disappear from /v1/models until re-enabled. Clients will no longer see them."),onConfirm:async()=>{to(null);try{(await fetch("/api/models/custom/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t2,type:t,enabled:e})})).ok&&(await si(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error bulk-updating custom models:",e)}}})},sf=async()=>{if(tw)return;let e=A.find(e=>!1!==e.isActive);if(!e)return void C.warning((0,N.Tl)("Please add an active Qoder connection first"));tk(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void C.error(s.error||(0,N.Tl)("Failed to fetch models"));let i=s.models||[];if(0===i.length)return void C.warning((0,N.Tl)("No models returned"));let l=0;for(let e of i){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,"");eb.some(e=>e.providerAlias===t2&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(eg).includes(`${t2}/${s}`)||(await sp(s,"llm",t2,{},!1),l+=1)}0===l?C.warning((0,N.Tl)("All models already exist, no new models added")):C.success((0,N.Tl)("Successfully added")+` ${l} `+(0,N.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),C.error((0,N.Tl)("Error fetching models")+": "+e.message)}finally{tk(!1)}},sg="opencode-go"===b||"bai"===b||"cline"===b,sy=async()=>{if(e9)return;let e=A.find(e=>!1!==e.isActive);if(!e?.id)return void C.warning((0,N.Tl)("Add a connection to enable importing models."));te(!0);try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),s=await t.json();if(!t.ok)throw Error(s?.error||`Request failed: ${t.status}`);let i=(Array.isArray(s.models)?s.models:[]).map(e=>{let t=e?.id||e?.name||e?.model;return t?{...e,id:String(t),name:e.name||String(t)}:null}).filter(Boolean);e8(i),C.success(`${(0,N.Tl)("Models refreshed")} (${i.length})`)}catch(e){C.error((0,N.Tl)("Failed to fetch models")+": "+e.message)}finally{te(!1)}},sb=async()=>{if(tm||0===A.length)return;let e=Object.fromEntries(A.map(e=>[e.id,{state:"queued",error:null}]));tj.current=!1,tp(!0),tx(!1),tf(null),ty(e),tv({total:A.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<A.length;e+=1){if(tj.current){tv({total:A.length,completed:e,passed:t,failed:s,stopped:!0});break}let i=A[e];tf(i.id),ty(e=>({...e,[i.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${i.id}/test`,{method:"POST"}),l=await e.json(),a=!!l.valid;a?t+=1:s+=1,ty(e=>({...e,[i.id]:{state:a?"success":"failed",error:a?null:l.error||null}}))}catch(e){s+=1,ty(t=>({...t,[i.id]:{state:"failed",error:e.message||"Test failed"}}))}tv({total:A.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<A.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{tf(null),tp(!1),tx(!1),tj.current=!1}},sv=async e=>{to({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{to(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&E(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},sj=()=>{sl(),Q(!1)},sw=async e=>{el("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await sa(),es(!1);return}el(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),el("Failed to save connection")}},sk=async e=>{try{(await fetch(`/api/providers/${eh.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await sl(),ec(!1))}catch(e){console.log("Error updating connection:",e)}},sN=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&E(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},sT=async(e,t)=>{let s=[...A];[s[e],s[t]]=[s[t],s[e]],E(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await sl()}},sC=A.filter(e=>eW.includes(e.id)),sS=A.length>0&&eW.length===A.length;(0,l.useEffect)(()=>{eB(e=>e.filter(e=>A.some(t=>t.id===e)))},[A]),(()=>{if(0===sC.length)return;let e=new Set(sC.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=M.find(e=>e.id===t);return s?.name}})();let s$=()=>{eG||ex(!1)},sA=async e=>{eQ(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:i}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:i})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await sl(),ex(!1)}finally{eQ(!1)}},sO=e=>sA(A.map(t=>({connectionId:t.id,proxyPoolId:e}))),sE=(0,i.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:A.map((e,t)=>{let s;return(0,i.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,i.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,i.jsx)("input",{type:"checkbox",checked:(s=e.id,eW.includes(s)),onChange:()=>{var t;return t=e.id,void eB(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,i.jsx)("div",{className:"flex-1 min-w-0",children:(0,i.jsx)(F,{connection:e,proxyPools:M,isOAuth:tz,isFirst:0===t,isLast:t===A.length-1,onMoveUp:()=>sT(t,t-1),onMoveDown:()=>sT(t,t+1),onToggleActive:t=>sN(e.id,t),autoPing:G[b]&&"oauth"===e.authType?{on:!0===e3.connections[e.id],onToggle:t=>{var s;return s=e.id,void sd({...e3,connections:{...e3.connections,[s]:t}})},provider:b}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&E(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ef(e),ec(!0)},onDelete:()=>sv(e.id),oneByOneStatus:tg[e.id]||null})})]},e.id)})}),sP=M.filter(e=>!0===e.isActive),sI=(0,i.jsx)(c.aF,{isOpen:eu,onClose:s$,title:`Apply Proxy (${A.length} connections)`,children:(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)("button",{onClick:()=>{let e=M.filter(e=>!0===e.isActive);return 0===e.length?void C.warning("No active proxy pools available."):sA(A.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eG||0===sP.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,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,i.jsxs)("button",{onClick:()=>sO(null),disabled:eG,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,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),M.map(e=>(0,i.jsxs)("button",{onClick:()=>sO(e.id),disabled:eG||!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,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,i.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,i.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eG&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,i.jsx)(c.$n,{onClick:s$,variant:"ghost",fullWidth:!0,disabled:eG,children:"Cancel"})]})}),sD=async e=>{if(!ez.has(e)){eK(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:`${t2}/${e}`})}),s=await t.json();e_(t=>({...t,[e]:s.ok?"ok":"error"})),eF(s.ok?"":s.error||"Model not reachable")}catch{e_(t=>({...t,[e]:"error"})),eF("Network error")}finally{eK(t=>{let s=new Set(t);return s.delete(e),s})}}};if(I)return(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsx)(c.Qv,{}),(0,i.jsx)(c.Qv,{})]});if(!tM)return(0,i.jsxs)("div",{className:"text-center py-20",children:[(0,i.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,i.jsx)(r(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let sR=()=>tQ&&tM.apiType?"responses"===tM.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tZ?"/providers/anthropic-m.png":(0,d.HY)(tM.id);return(0,i.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,i.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${tM.color}15`},children:eR||!sR()?(0,i.jsx)("span",{className:"text-sm font-bold",style:{color:tM.color},children:tM.textIcon||tM.id.slice(0,2).toUpperCase()}):(0,i.jsx)(o.default,{src:sR(),alt:tM.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,d.Kw)(tM.id),eq(!0)},loading:"lazy",decoding:"async"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,i.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:tM.name}),(tM.notice?.webUrl||tM.notice?.apiKeyUrl||tM.notice?.signupUrl||tM.website)&&(0,i.jsxs)("a",{href:tM.notice?.webUrl||tM.notice?.apiKeyUrl||tM.notice?.signupUrl||tM.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),tM.notice?.webUrl?"Web console":tM.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]}),(0,i.jsx)(c.N5,{code:tM.notice?.inviteCode})]}),(0,i.jsxs)("p",{className:"text-text-muted",children:[A.length," connection",1===A.length?"":"s"]})]})]})]}),tM.deprecated&&(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,i.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:tM.deprecationNotice})]}),tM.notice?.text&&!tM.deprecated&&(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,i.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:(0,N.Tl)(tM.notice.text)}),tM.notice.apiKeyUrl&&(0,i.jsx)("a",{href:tM.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:(0,N.Tl)("Get API Key →")}),(0,i.jsx)(c.N5,{code:tM.notice?.inviteCode})]}),tX&&q&&(0,i.jsx)(c.Zp,{children:(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:tZ?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,i.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tZ?"Messages API":"responses"===q.apiType?"Responses API":"Chat Completions"," \xb7 ",(q.baseUrl||"").replace(/\/$/,""),"/",tZ?"messages":"responses"===q.apiType?"responses":"chat/completions"]})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{el(""),es(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ep(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{to({title:"Delete Compatible Node",message:`Delete this ${tZ?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{to(null);try{(await fetch(`/api/provider-nodes/${b}`,{method:"DELETE"})).ok&&y.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tJ?(0,i.jsx)(c.gw,{providerId:b}):(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[A.length>0&&M.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ex(!0),children:"Apply Proxy"}),A.length>0&&(0,i.jsxs)(i.Fragment,{children:[eW.length>0&&(0,i.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eW.length;0!==e&&to({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{to(null);let e=0,t=[...eW];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}E(e=>e.filter(e=>!t.includes(e.id))),eB([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eW.length,")"]}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:sb,disabled:tm,children:tm?(0,N.Tl)("Testing Connection One-by-One..."):(0,N.Tl)("Test Connection One-by-One")}),tm&&(0,i.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{tm&&(tj.current=!0,tx(!0))},disabled:tu,children:tu?(0,N.Tl)("Stopping..."):(0,N.Tl)("Stop")})]}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted font-medium",title:(0,N.Tl)("Prioritize accounts with quota packages that expire soonest"),children:(0,N.Tl)("Earliest Expiry First")}),(0,i.jsx)(c.lM,{checked:e1,onChange:e=>{e5(e),sr(eZ,eY,e)}})]}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted font-medium",children:(0,N.Tl)("Round Robin")}),(0,i.jsx)(c.lM,{checked:"round-robin"===eZ,onChange:e=>{let t=e?"round-robin":null,s=e?eY||"1":eY;e&&!eY&&e0("1"),eX(t),sr(t,s,e1)}}),"round-robin"===eZ&&(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted",children:(0,N.Tl)("Sticky:")}),(0,i.jsx)("input",{type:"number",min:1,value:eY,onChange:e=>{var t;e0(t=e.target.value),sr("round-robin",t,e1)},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===A.length?(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tz?"lock":"key"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tY&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",t0," or ",t1,"."]})]})]}),(0,i.jsx)("div",{className:"flex gap-2",children:tY?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:t$,children:t0}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:tA,children:t1}),tW&&!tB&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>tP("export"),children:(0,N.Tl)("Export")}),(0,i.jsx)(c.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>{tq("import"),tD(!0)},children:(0,N.Tl)("Import")})]}),tB&&t_()]}):(0,i.jsxs)(i.Fragment,{children:[!tX&&"iflow"===b&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>ee(!0),children:"Cookie"}),"codex"===b&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>en(!0),children:(0,N.Tl)("Bulk Add")}),(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:tO,children:tX?"Add API Key":"iflow"===b?"OAuth":"Add Connection"})]})})]}):(0,i.jsxs)(i.Fragment,{children:[tb&&(0,i.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,i.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,i.jsxs)("span",{children:[(0,N.Tl)("Total:")," ",tb.total]}),(0,i.jsxs)("span",{children:[(0,N.Tl)("Completed:")," ",tb.completed]}),(0,i.jsxs)("span",{children:[(0,N.Tl)("Passed:")," ",tb.passed]}),(0,i.jsxs)("span",{children:[(0,N.Tl)("Failed:")," ",tb.failed]}),tb.stopped&&(0,i.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:(0,N.Tl)("Stopped")}),tm&&th&&(0,i.jsxs)("span",{children:[(0,N.Tl)("Running:")," ",A.find(e=>e.id===th)?.name||th]})]})}),A.length>0&&(0,i.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,i.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,i.jsx)("input",{type:"checkbox",checked:sS,onChange:()=>{sS?eB([]):eB(A.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),sE,!tX&&(0,i.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===b&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>ee(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===b&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>en(!0),title:(0,N.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,N.Tl)("Bulk Add")}),tY?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:t$,className:"w-full sm:w-auto",children:t0}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:tA,className:"w-full sm:w-auto",children:t1}),tW&&!tB&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>tP("export"),className:"w-full sm:w-auto",children:(0,N.Tl)("Export")}),(0,i.jsx)(c.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>{tq("import"),tD(!0)},className:"w-full sm:w-auto",children:(0,N.Tl)("Import")})]}),tB&&t_()]}):(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:tO,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),t4&&(0,i.jsx)("select",{value:e2,onChange:e=>{var t;e4(t=e.target.value),so(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:t4.map(e=>(0,i.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!tX&&(e=[...tV,...ti.filter(e=>!tV.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!ta.includes(e)),s=(t=eb.filter(e=>e?.providerAlias===t2&&"llm"===(e.kind||e.type||"llm"))).filter(e=>!1!==e.enabled).map(e=>e.id),n=t.filter(e=>!1===e.enabled).map(e=>e.id),u=ta.length>0||n.length>0,x=e.length>0||s.length>0,(0,i.jsxs)("div",{className:"flex gap-2",children:[u&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>st(n),children:"Active All"}),x&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>se(e,s),children:"Disable All"})]}))]}),!!eM&&(h=O(eM),f=function(e){if(!e)return"";let t=P(e);if(t&&t!==e)return t;let s=(0,N.Tl)(e);if(s&&s!==e)return s;let i=String(e).match(/^HTTP\s+\d+:\s*(?:\[(?:\d+|[A-Z0-9_]+)\]:\s*)?(.*)$/i);if(i&&i[1]){let e=i[1].trim(),t=(0,N.Tl)(e);if(t&&t!==e)return t}return(0,N.Tl)(e)}(eM),(0,i.jsxs)("p",{className:"text-xs text-red-500 mb-3 break-words",children:[f," ",h&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",title:(0,N.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"text-blue-500 underline hover:text-blue-400",children:(0,N.Tl)("Verify your account")})," ",(0,i.jsx)("button",{type:"button",onClick:()=>tT(h,"verification"),className:"text-text-muted underline hover:text-primary",children:"verification"===tN?(0,N.Tl)("Copied"):(0,N.Tl)("Copy link")}),(0,i.jsxs)("span",{className:"text-text-muted",children:[" ","(",(0,N.Tl)("Recommended: open in an incognito window and sign in with the affected account"),")"]})]})]})),(()=>{let e,t,s;if(tX)return(0,i.jsx)(U,{providerStorageAlias:t2,providerDisplayAlias:t3,modelAliases:eg,customModels:eb,copied:tN,onCopy:tT,onSetAlias:sc,onDeleteAlias:sm,onAddCustomModel:(e,t)=>sp(e,"llm",t2,{},t),onToggleCustomModel:sx,onDeleteCustomModel:e=>su(e,"llm",t2),onBulkCustomModels:sh,connections:A,isAnthropic:tZ});let l=[...tV,...ti.filter(e=>!tV.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}),a=new Set(ta),n=l.filter(e=>!a.has(e.id)),r=l.filter(e=>a.has(e.id)),o=$({customModels:eb,modelAliases:eg,providerAlias:t2,builtInModels:tV,type:"llm"}),d=o.filter(e=>!1!==e.enabled),c=o.filter(e=>!1===e.enabled);return(0,i.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.length+c.length>0&&(0,i.jsxs)("div",{className:"w-full flex items-center gap-2 text-xs text-text-muted -mb-1",children:[(0,i.jsxs)("span",{children:[(0,N.Tl)("Custom models")," (",d.length+c.length,")"]}),(0,i.jsx)("span",{children:"\xb7"}),(0,i.jsx)("button",{onClick:()=>sh(!0),className:"text-primary hover:underline",children:(0,N.Tl)("Enable all")}),(0,i.jsx)("span",{children:"\xb7"}),(0,i.jsx)("button",{onClick:()=>sh(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,N.Tl)("Disable all")})]}),d.map(e=>(0,i.jsx)(R,{model:{id:e.id,name:e.name},fullModel:`${t3}/${e.id}`,alias:e.alias,copied:tN,onCopy:tT,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?su(e.id,"llm",t2):sm(e.alias)},testStatus:eU[e.id],onTest:A.length>0||tJ?()=>sD(e.id):void 0,isTesting:ez.has(e.id),isCustom:!0,isFree:!1,caps:v(`${b}/${e.id}`),thinkingSuffix:t5(e.id)},`${e.source}-${e.fullModel}`)),n.map(e=>{let t=`${t2}/${e.id}`,s=`${b}/${e.id}`,l=Object.entries(eg).find(([,e])=>e===t||e===s)?.[0];return(0,i.jsx)(R,{model:e,fullModel:`${t3}/${e.id}`,alias:l,copied:tN,onCopy:tT,onSetAlias:t=>sc(e.id,t,t2),onDeleteAlias:()=>sm(l),testStatus:eU[e.id],onTest:A.length>0||tJ?()=>sD(e.id):void 0,isTesting:ez.has(e.id),isFree:e.isFree,onDisable:()=>t7(e.id),caps:v(`${b}/${e.id}`),thinkingSuffix:t5(e.id)},e.id)}),(0,i.jsxs)("button",{onClick:()=>eL(!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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"cline"===b&&A.some(e=>!1!==e.isActive)&&(0,i.jsxs)("button",{onClick:sy,disabled:e9,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,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:e9?{animation:"spin 1s linear infinite"}:void 0,children:e9?"progress_activity":"download"}),e9?(0,N.Tl)("Importing..."):(0,N.Tl)("Import from /models")]}),"qoder"===b&&A.some(e=>!1!==e.isActive)&&(0,i.jsxs)("button",{onClick:sf,disabled:tw,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,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:tw?{animation:"spin 1s linear infinite"}:void 0,children:tw?"progress_activity":"download"}),tw?(0,N.Tl)("Fetching..."):(0,N.Tl)("Fetch Qoder Models")]}),sg&&"cline"!==b&&(0,i.jsxs)("button",{onClick:sy,disabled:e9||!A.some(e=>!1!==e.isActive),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,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:e9?{animation:"spin 1s linear infinite"}:void 0,children:e9?"progress_activity":"refresh"}),e9?(0,N.Tl)("Refreshing..."):(0,N.Tl)("Refresh Official Models")]}),e7.length>0&&(e=new Set([...Object.values(eg),...o.map(e=>e.fullModel)]),t=new Set(tV.map(e=>e.id)),0===(s=e7.filter(s=>!e.has(`${t2}/${s.id}`)&&!t.has(s.id))).length?null:(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,i.jsxs)("button",{onClick:async()=>{await sp(e.id,"llm",t2)},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,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),(r.length>0||c.length>0)&&(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",r.length+c.length,"):"]}),(0,i.jsxs)("div",{className:"flex flex-wrap gap-3",children:[c.map(e=>(0,i.jsx)(R,{model:{id:e.id,name:e.name},fullModel:`${t3}/${e.id}`,copied:tN,onCopy:tT,testStatus:eU[e.id],onTest:A.length>0||tJ?()=>sD(e.id):void 0,isTesting:ez.has(e.id),onEnable:()=>sx(e.id,!0),isCustom:!1,isFree:!1},`custom-${e.fullModel}`)),r.map(e=>(0,i.jsx)(R,{model:e,fullModel:`${t3}/${e.id}`,copied:tN,onCopy:tT,testStatus:eU[e.id],onTest:A.length>0||tJ?()=>sD(e.id):void 0,isTesting:ez.has(e.id),onEnable:()=>t8(e.id),isFree:e.isFree,caps:v(`${b}/${e.id}`),thinkingSuffix:t5(e.id)},e.id))]})]})]})})()]}),sI,"kiro"===b?(0,i.jsx)(c.Mh,{isOpen:W,providerInfo:tM,onSuccess:sj,onClose:()=>Q(!1)}):"cursor"===b?(0,i.jsx)(c.G9,{isOpen:W,onSuccess:sj,onClose:()=>Q(!1)}):"gitlab"===b?(0,i.jsx)(c.vj,{isOpen:W,providerInfo:tM,onSuccess:sj,onClose:()=>Q(!1)}):(0,i.jsx)(c.LF,{isOpen:W,provider:b,providerInfo:tM,onSuccess:sj,onClose:()=>Q(!1)}),"xiaomi-mimo"===b&&(0,i.jsx)(c.LH,{isOpen:Z,onSuccess:sj,onClose:()=>X(!1)}),"iflow"===b&&(0,i.jsx)(c.vE,{isOpen:Y,onSuccess:()=>{sl(),ee(!1)},onClose:()=>ee(!1)}),(0,i.jsx)(K,{isOpen:et,provider:b,providerName:tM.name,isCompatible:tX,isAnthropic:tZ,authType:tM?.authType,authHint:tM?.authHint,website:tM?.website,proxyPools:M,error:ei,existingNames:A.map(e=>e.name).filter(Boolean),onSave:sw,onBulkDone:sa,onClose:()=>{el(""),es(!1)}}),(0,i.jsx)(c.wI,{isOpen:ed,connection:eh,proxyPools:M,onSave:sk,onClose:()=>ec(!1)}),tX&&(0,i.jsx)(J,{isOpen:em,node:q,onSave:sn,onClose:()=>ep(!1),isAnthropic:tZ}),!tX&&(0,i.jsx)(L,{isOpen:eJ,providerAlias:t2,providerDisplayAlias:t3,onSave:async e=>{await sp(e,"llm",t2),eL(!1)},onClose:()=>eL(!1)}),"codex"===b&&(0,i.jsx)(B,{isOpen:ea,onClose:()=>en(!1),onSuccess:sl}),"codebuddy-cn"===b&&(0,i.jsx)(H,{isOpen:er,password:eI,onClose:()=>eo(!1),onSuccess:sl}),(0,i.jsx)(V,{isOpen:tI,mode:tR,provider:b,providerName:tM?.name,onClose:()=>tD(!1),onSuccess:sl}),(0,i.jsxs)(c.aF,{isOpen:eS.open,onClose:()=>e$({open:!1,action:null,value:""}),title:(0,N.Tl)("Confirm Password"),size:"sm",footer:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{variant:"ghost",onClick:()=>e$({open:!1,action:null,value:""}),children:(0,N.Tl)("Cancel")}),(0,i.jsx)(c.$n,{variant:"primary",onClick:tE,disabled:!eS.value||eA,children:eA?(0,N.Tl)("Verifying..."):(0,N.Tl)("Confirm")})]}),children:[(0,i.jsx)("p",{className:"text-text-muted mb-3 text-sm",children:(0,N.Tl)("Enter your dashboard password to export OAuth accounts (the file will be encrypted with the transfer passphrase you pick next).")}),(0,i.jsx)(c.pd,{type:"password",autoFocus:!0,value:eS.value,onChange:e=>e$(t=>({...t,value:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&eS.value&&tE()},placeholder:(0,N.Tl)("Password")}),eE&&(0,i.jsx)("p",{className:"text-xs text-red-500 mt-2",children:eE})]}),(0,i.jsx)(c.uo,{isOpen:td,onClose:()=>tc(!1),onConfirm:()=>{(window.localStorage.setItem(tC,"true"),tc(!1),tz)?tS():tA()},title:"Risk Notice",message:tM?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,i.jsx)(c.uo,{isOpen:!!tr,onClose:()=>to(null),onConfirm:tr?.onConfirm,title:tr?.title||"Confirm",message:tr?.message,variant:"danger"})]})}},93578:(e,t,s)=>{Promise.resolve().then(s.bind(s,74325))}},e=>{e.O(0,[3170,1728,5772,1321,5497,8441,3794,7358],()=>e(e.s=93578)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{67455:(e,t,r)=>{Promise.resolve().then(r.bind(r,97678))},97678:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>T});var s=r(95155),a=r(12115),l=r(14051),i=r.n(l),n=r(35497),o=r(67852),d=r(8247),c=r(90620),p=r(88105),m=r(98500),x=r.n(m),u=r(65921),h=r(38003),f=r(73006);let g={available:{icon:"check_circle",color:"#22c55e",label:"Available"},cooldown:{icon:"schedule",color:"#f59e0b",label:"Cooldown"},unavailable:{icon:"error",color:"#ef4444",label:"Unavailable"},unknown:{icon:"help",color:"#6b7280",label:"Unknown"}};function y(){let[e,t]=(0,a.useState)(null),[r,l]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!1),[d,c]=(0,a.useState)(null),p=(0,a.useRef)(null),m=(0,u.i)(),x=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/availability");if(e.ok){let r=await e.json();t(r)}}catch{}finally{l(!1)}},[]);(0,a.useEffect)(()=>{x();let e=setInterval(x,3e4);return()=>clearInterval(e)},[x]),(0,a.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&o(!1)};return i&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let h=async(e,t)=>{c(`${e}:${t}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:e,model:t})})).ok?(m.success(`Cooldown cleared for ${t}`),await x()):m.error("Failed to clear cooldown")}catch{m.error("Failed to clear cooldown")}finally{c(null)}};if(r)return null;let f=e?.models||[],y=0===(e?.unavailableCount||f.filter(e=>"available"!==e.status).length),b={};return f.forEach(e=>{if("available"===e.status)return;let t=e.provider||"unknown";b[t]||(b[t]=[]),b[t].push(e)}),(0,s.jsx)("div",{className:"relative",ref:p,children:i&&(0,s.jsxs)("div",{className:"absolute top-full right-0 mt-2 w-80 bg-surface border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:y?"#22c55e":"#f59e0b"},children:y?"verified":"warning"}),(0,s.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,s.jsx)("button",{onClick:x,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,s.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:y?(0,s.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,s.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(b).map(([e,t])=>(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:e}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=g[e.status]||g.unknown,r=d===`${e.provider}:${e.model}`;return(0,s.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:t.color},children:t.icon}),(0,s.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:e.model})]}),"cooldown"===e.status&&(0,s.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>h(e.provider,e.model),disabled:r,className:"text-[10px] px-1.5! py-0.5! ml-2",children:r?"...":"Clear"})]},`${e.provider}-${e.model}`)})})]},e))})})]})})}let b={openai:{title:"Add OpenAI Compatible",type:"openai-compatible",defaultBaseUrl:"https://api.openai.com/v1",namePlaceholder:"OpenAI Compatible (Prod)",prefixPlaceholder:"oc-prod",baseUrlHint:"Use the base URL (ending in /v1) for your OpenAI-compatible API.",modelIdPlaceholder:"e.g. gpt-4, claude-3-opus",errorLabel:"OpenAI Compatible",hasApiType:!0},anthropic:{title:"Add Anthropic Compatible",type:"anthropic-compatible",defaultBaseUrl:"https://api.anthropic.com/v1",namePlaceholder:"Anthropic Compatible (Prod)",prefixPlaceholder:"ac-prod",baseUrlHint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages.",modelIdPlaceholder:"e.g. claude-3-opus",errorLabel:"Anthropic Compatible",hasApiType:!1}},v=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function j({variant:e,isOpen:t,onClose:r,onCreated:l}){let i=b[e],o=()=>({name:"",prefix:"",...i.hasApiType?{apiType:"chat"}:{},baseUrl:i.defaultBaseUrl}),[d,c]=(0,a.useState)(o),[p,m]=(0,a.useState)(!1),[x,u]=(0,a.useState)(""),[h,f]=(0,a.useState)(""),[g,y]=(0,a.useState)(""),[N,T]=(0,a.useState)(!1),[w,k]=(0,a.useState)(null);(0,a.useEffect)(()=>{i.hasApiType?c(e=>({...e,baseUrl:i.defaultBaseUrl})):t&&(k(null),f(""),y(""),u(""))},[i.hasApiType?d.apiType:t]);let C=async()=>{if(d.name.trim()&&d.prefix.trim()&&d.baseUrl.trim()){m(!0),u("");try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.name,prefix:d.prefix,...i.hasApiType?{apiType:d.apiType}:{},baseUrl:d.baseUrl,type:i.type})}),t=await e.json();e.ok?(l(t.node),c(o()),f(""),k(null),u("")):u(t?.error||"Failed to create provider")}catch(e){console.log(`Error creating ${i.errorLabel} node:`,e),u("Network error creating provider")}finally{m(!1)}}},A=async()=>{T(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d.baseUrl,apiKey:h,type:i.type,modelId:g.trim()||void 0})}),t=await e.json();k(t)}catch{k({valid:!1,error:"Network error"})}finally{T(!1)}};return(0,s.jsx)(n.aF,{isOpen:t,title:i.title,onClose:r,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(n.pd,{label:"Name",value:d.name,onChange:e=>c({...d,name:e.target.value}),placeholder:i.namePlaceholder,hint:"Required. A friendly label for this node."}),(0,s.jsx)(n.pd,{label:"Prefix",value:d.prefix,onChange:e=>c({...d,prefix:e.target.value}),placeholder:i.prefixPlaceholder,hint:"Required. Used as the provider prefix for model IDs."}),i.hasApiType&&(0,s.jsx)(n.l6,{label:"API Type",options:v,value:d.apiType,onChange:e=>c({...d,apiType:e.target.value})}),(0,s.jsx)(n.pd,{label:"Base URL",value:d.baseUrl,onChange:e=>c({...d,baseUrl:e.target.value}),placeholder:i.defaultBaseUrl,hint:i.baseUrlHint}),(0,s.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>f(e.target.value)}),(0,s.jsx)(n.pd,{label:"Model ID (optional)",value:g,onChange:e=>y(e.target.value),placeholder:i.modelIdPlaceholder,hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,s.jsx)(n.$n,{onClick:A,disabled:!h||N||!d.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:N?"Checking...":"Check"}),(()=>{if(!w)return null;let{valid:e,error:t,method:r}=w;return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===r&&(0,s.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,s.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),x&&(0,s.jsx)("div",{className:"rounded border border-red-500/40 bg-red-500/10 px-3 py-2 text-sm text-red-500",children:x}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)(n.$n,{onClick:C,fullWidth:!0,disabled:!d.name.trim()||!d.prefix.trim()||!d.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,s.jsx)(n.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function N(e,t,r){let a=[];if(e>0&&a.push((0,s.jsxs)(n.Ex,{variant:"success",size:"sm",dot:!0,children:[e," Connected"]},"connected")),t>0){let e=r?`${t} Error (${r})`:`${t} Error`;a.push((0,s.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:e},"error"))}return 0===a.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No connections"}):a}function T(){let e,t,[r,l]=(0,a.useState)([]),[i,o]=(0,a.useState)([]),[d,m]=(0,a.useState)(!0),[x,g]=(0,a.useState)(!1),[b,v]=(0,a.useState)(!0),[N,T]=(0,a.useState)(!1),[A,I]=(0,a.useState)(!1),[E,$]=(0,a.useState)(null),[S,P]=(0,a.useState)(null),[O,R]=(0,a.useState)({}),[U,_]=(0,a.useState)(!1),z=(0,u.i)(),D=(0,h.C)(e=>e.query),q=(0,h.C)(e=>e.register),F=(0,h.C)(e=>e.unregister);(0,a.useEffect)(()=>(q("Search providers..."),()=>F()),[q,F]);let M=e=>!D.trim()||!!e&&e.toLowerCase().includes(D.trim().toLowerCase()),L=(e,t,r)=>{if(e.connected>0)return 0;if(t?.noAuth){let e;return+(!1===(e=O?.[r])||!0!==e&&!!t.topologyHiddenByDefault)}return U?0===e.total?3:2:1};(0,a.useEffect)(()=>{(async()=>{try{let[e,t,r]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes"),fetch("/api/settings",{cache:"no-store"})]),s=await e.json(),a=await t.json();if(e.ok&&l(s.connections||[]),t.ok&&o(a.nodes||[]),r.ok){let e=await r.json();R(e.topologyVisibility||{}),_(!0===e.providerDisabledLastSort),v(!1!==e.showCommunityProviders)}}catch(e){console.log("Error fetching data:",e)}finally{m(!1)}})()},[]);let H=(0,a.useCallback)(async(e,t)=>{let r={...O,[e]:t};R(r);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({topologyVisibility:r})})).ok)throw Error("Failed to update topology visibility")}catch(e){console.error("Error updating topology visibility:",e),R(O)}},[O]),J=(e,t)=>{let s=Array.isArray(t)?t:[t],a=r.filter(t=>t.provider===e&&s.includes(t.authType)),l=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},i=a.filter(e=>{if(!1===e.isActive)return!1;let t=l(e);return"active"===t||"success"===t}).length,n=a.filter(e=>{let t=l(e);return"error"===t||"expired"===t||"unavailable"===t}),o=n.length,d=a.length,c=d>0&&a.every(e=>!1===e.isActive),p=n.sort((e,t)=>new Date(t.lastErrorAt||0)-new Date(e.lastErrorAt||0))[0];return{connected:i,error:o,total:d,errorCode:p?function(e){if(!e)return null;let t=e.lastErrorType;if("runtime_error"===t)return"RUNTIME";if("upstream_auth_error"===t||"auth_missing"===t||"token_refresh_failed"===t||"token_expired"===t)return"AUTH";if("upstream_rate_limited"===t)return"429";if("upstream_unavailable"===t)return"5XX";if("network_error"===t)return"NET";let r=Number(e.errorCode);if(Number.isFinite(r)&&r>=400)return String(r);let s=function(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}(e.lastError);if("401"===s||"403"===s)return"AUTH";if(s&&"ERR"!==s)return s;let a=(e.lastError||"").toLowerCase();return a.includes("runtime")||a.includes("not runnable")||a.includes("not installed")?"RUNTIME":a.includes("invalid api key")||a.includes("token invalid")||a.includes("revoked")||a.includes("unauthorized")?"AUTH":"ERR"}(p):null,errorTime:p?.lastErrorAt?function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let r=Math.floor(t/60);if(r<24)return`${r}h ago`;let s=Math.floor(r/24);return`${s}d ago`}(p.lastErrorAt):null,allDisabled:c}},K=async(e,t,s)=>{let a=Array.isArray(t)?t:[t],i=t=>t.provider===e&&a.includes(t.authType),n=r.filter(i);l(e=>e.map(e=>i(e)?{...e,isActive:s}:e)),await Promise.allSettled(n.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},B=async(e,t=null)=>{if(!E){$("provider"===e?t:e),P(null);try{let r=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),s=await r.json();if(P(s),s.summary){let{passed:e,failed:t,total:r}=s.summary;0===t?z.success(`${(0,f.Tl)("All")} ${r} ${(0,f.Tl)("tests passed")}`):z.warning(`${e}/${r} ${(0,f.Tl)("passed")}, ${t} ${(0,f.Tl)("failed")}`)}}catch(e){P({error:(0,f.Tl)("Test request failed")}),z.error((0,f.Tl)("Provider test failed"))}finally{$(null)}}},W=i.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>M(e.name)),V=i.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>M(e.name)),Q=(e,t)=>{if("kiro"===t)return["oauth","apikey","api_key"];let r=e?.authModes;return Array.isArray(r)?r.includes("apikey")?["oauth","apikey","api_key"]:"oauth":t in p.nJ||t in c.fg?["oauth","apikey","api_key"]:"oauth"},X=(e=Object.entries(c.zN).filter(([,e])=>!e.hidden&&M(e.name)),t="oauth",[...e].sort(([e,r],[s,a])=>{let l=J(e,t),i=J(s,t),n=L(l,r,e),o=L(i,a,s);if(n!==o)return n-o;let d=r.priority??999,c=a.priority??999;return d!==c?d-c:(r.name||"").localeCompare(a.name||"")})),Z=[...Object.entries(p.IS).filter(([,e])=>!e.hidden&&!(e.community&&!b)&&M(e.name)).map(([e,t])=>({key:e,info:t,stats:J(e,Q(t,e)),isFreeTier:!1})),...Object.entries(p.nJ).filter(([,e])=>!e.hidden&&!(e.community&&!b)&&M(e.name)&&(e.serviceKinds??["llm"]).includes("llm")).map(([e,t])=>({key:e,info:t,stats:J(e,Q(t,e)),isFreeTier:!0}))].sort((e,t)=>{let r=L(e.stats,e.info,e.key),s=L(t.stats,t.info,t.key);if(r!==s)return r-s;let a=!!t.info.noAuth-!!e.info.noAuth;if(0!==a)return a;let l=+!!e.info.community,i=+!!t.info.community;if(l!==i)return l-i;let n=e.info.priority??999,o=t.info.priority??999;return n!==o?n-o:(e.info.name||"").localeCompare(t.info.name||"")}),Y=Object.entries(c.fg).filter(([,e])=>!e.hidden&&(e.serviceKinds??["llm"]).includes("llm")&&M(e.name)).sort(([e,t],[r,s])=>{let a=J(e,"apikey"),l=J(r,"apikey"),i=L(a,t,e),n=L(l,s,r);if(i!==n)return i-n;let o=t.priority??999,d=s.priority??999;return o!==d?o-d:(t.name||"").localeCompare(s.name||"")}),G=!!D.trim(),ee=G||x?Y:Y.slice(0,20),et=Y.length-20;if(d)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(n.Qv,{}),(0,s.jsx)(n.Qv,{})]});let er=X.length>0||Z.length>0||Y.length>0||W.length>0||V.length>0;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[!er&&(0,s.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,s.jsx)("p",{className:"text-text-muted text-sm",children:"No providers match your search"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["Custom Providers (OpenAI/Anthropic Compatible)"," "]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,s.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>I(!0),className:"w-full sm:w-auto",children:"Add Anthropic Compatible"}),(0,s.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>T(!0),className:"w-full !bg-white !text-black hover:!bg-gray-100 sm:w-auto",children:"Add OpenAI Compatible"})]})]}),0===W.length&&0===V.length?(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2 border border-dashed border-border rounded-xl text-text-muted text-sm",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"extension"}),(0,s.jsx)("span",{children:"No custom providers — use buttons above to add OpenAI/Anthropic compatible endpoints"})]}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[...W,...V].map(e=>(0,s.jsx)(k,{providerId:e.id,provider:e,stats:J(e.id,"apikey"),authType:"compatible",onToggle:t=>K(e.id,"apikey",t)},e.id))})]}),X.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"OAuth Providers"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(y,{}),(0,s.jsxs)("button",{onClick:()=>B("oauth"),disabled:!!E,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"oauth"===E?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:(0,f.Tl)("Test all OAuth connections"),"aria-label":(0,f.Tl)("Test all OAuth connections"),children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"oauth"===E?" animate-spin":""}`,children:"play_arrow"}),"oauth"===E?(0,f.Tl)("Testing..."):(0,f.Tl)("Test All")]})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:X.map(([e,t])=>{let r=Q(t,e);return(0,s.jsx)(w,{providerId:e,provider:t,stats:J(e,r),authType:"oauth",onToggle:t=>K(e,r,t)},e)})})]}),Z.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"Free Tier Providers"}),(0,s.jsxs)("button",{onClick:()=>B("free"),disabled:!!E,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"free"===E?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:(0,f.Tl)("Test all Free connections"),"aria-label":(0,f.Tl)("Test all Free provider connections"),children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"free"===E?" animate-spin":""}`,children:"play_arrow"}),"free"===E?(0,f.Tl)("Testing..."):(0,f.Tl)("Test All")]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:Z.map(({key:e,info:t,isFreeTier:r})=>{let a=Q(t,e);if(!r){let r=O?.[e],l=!1!==r&&(!0===r||!t.topologyHiddenByDefault);return(0,s.jsx)(w,{providerId:e,provider:t,stats:J(e,a),authType:"free",onToggle:t=>K(e,a,t),topologyVisible:l,onToggleTopology:t.noAuth?t=>H(e,t):void 0},e)}return(0,s.jsx)(k,{providerId:e,provider:t,stats:J(e,a),authType:Array.isArray(a)?a[0]??"apikey":a,onToggle:t=>K(e,a,t)},e)})})]}),Y.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["API Key Providers"," "]}),(0,s.jsxs)("button",{onClick:()=>B("apikey"),disabled:!!E,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"apikey"===E?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:(0,f.Tl)("Test all API Key connections"),"aria-label":(0,f.Tl)("Test all API Key connections"),children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"apikey"===E?" animate-spin":""}`,children:"play_arrow"}),"apikey"===E?(0,f.Tl)("Testing..."):(0,f.Tl)("Test All")]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:ee.map(([e,t])=>(0,s.jsx)(k,{providerId:e,provider:t,stats:J(e,"apikey"),authType:"apikey",onToggle:t=>K(e,"apikey",t)},e))}),!G&&!x&&et>0&&(0,s.jsxs)("button",{onClick:()=>g(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2.5 text-sm font-medium text-primary transition-colors hover:border-primary hover:bg-primary/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),"Show all ",Y.length," providers"]})]}),(0,s.jsx)(j,{variant:"openai",isOpen:N,onClose:()=>T(!1),onCreated:e=>{o(t=>[...t,e]),T(!1)}}),(0,s.jsx)(j,{variant:"anthropic",isOpen:A,onClose:()=>I(!1),onCreated:e=>{o(t=>[...t,e]),I(!1)}}),S&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>P(null),children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,s.jsxs)("div",{className:"relative bg-surface border border-border rounded-xl w-full max-w-[600px] max-h-[86vh] sm:max-h-[80vh] overflow-y-auto shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between px-5 py-3 border-b border-border bg-surface/95 backdrop-blur-sm rounded-t-xl",children:[(0,s.jsx)("h3",{className:"font-semibold",children:(0,f.Tl)("Test Results")}),(0,s.jsx)("button",{onClick:()=>P(null),className:"p-1 rounded-lg hover:bg-bg text-text-muted hover:text-text-main transition-colors","aria-label":(0,f.Tl)("Close"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,s.jsx)("div",{className:"p-5",children:(0,s.jsx)(C,{results:S})})]})]})]})}function w({providerId:e,provider:t,stats:r,authType:a,onToggle:l,topologyVisible:i,onToggleTopology:d}){let{connected:c,error:p,errorCode:m,errorTime:u,allDisabled:h}=r,g=!!t.noAuth,y=r.total>0,b=g&&"function"==typeof d,v=!1!==i;return(0,s.jsx)(x(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${h||b&&!v?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src:`/providers/${t.id}.png`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h3",{className:"truncate font-semibold flex items-center gap-1.5",children:[t.name,t.community&&(0,s.jsx)(n.Ex,{variant:"warning",size:"sm",className:"shrink-0",children:(0,f.Tl)("Trial")})]}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:h?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),(0,f.Tl)("Disabled")]})}):g?v?(0,s.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:(0,f.Tl)("Ready")}):(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,f.Tl)("Topology off")}):(0,s.jsxs)(s.Fragment,{children:[N(c,p,m),u&&(0,s.jsx)("span",{className:"text-text-muted",children:u})]})})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[y&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!h)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!h,onChange:()=>{},title:h?(0,f.Tl)("Enable provider"):(0,f.Tl)("Disable provider")})}),b&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),d(!v)},children:(0,s.jsx)(n.lM,{size:"sm",checked:v,onChange:()=>{},title:v?"Hide from usage topology":"Show on usage topology"})})]})]})})})}function k({providerId:e,provider:t,stats:r,authType:a,onToggle:l}){let{connected:i,error:c,errorCode:m,errorTime:u,allDisabled:h}=r,g=e.startsWith(p.JH),y=e.startsWith(p.DI);return(0,s.jsx)(x(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${h?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src:g&&t.apiType?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":y?"/providers/anthropic-m.png":(0,d.HY)(t.id),alt:t.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h3",{className:"truncate font-semibold flex items-center gap-1.5",children:[t.name,t.community&&(0,s.jsx)(n.Ex,{variant:"warning",size:"sm",className:"shrink-0",children:(0,f.Tl)("Trial")})]}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:h?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),(0,f.Tl)("Disabled")]})}):(0,s.jsxs)(s.Fragment,{children:[N(i,c,m),g&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),y&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"Messages"}),u&&(0,s.jsx)("span",{className:"text-text-muted",children:u})]})})]})]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r.total>0&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!h)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!h,onChange:()=>{},title:h?(0,f.Tl)("Enable provider"):(0,f.Tl)("Disable provider")})})})]})})})}function C({results:e}){if(e.error&&!e.results)return(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,s.jsx)("p",{className:"text-sm text-red-400",children:e.error})]});let{summary:t,mode:r}=e,a=e.results||[],l={oauth:"OAuth",free:(0,f.Tl)("Free"),apikey:(0,f.Tl)("API Key"),provider:(0,f.Tl)("Provider"),all:(0,f.Tl)("All")}[r]||r;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,s.jsxs)("span",{className:"text-text-muted",children:[l," ",(0,f.Tl)("Test")]}),(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[t.passed," ",(0,f.Tl)("passed")]}),t.failed>0&&(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[t.failed," ",(0,f.Tl)("failed")]}),(0,s.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," ",(0,f.Tl)("tested")]})]}),a.map((e,t)=>(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-black/[0.03] px-3 py-2 text-xs dark:bg-white/[0.03] sm:flex-nowrap",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-emerald-500":"text-red-500"}`,children:e.valid?"check_circle":"error"}),(0,s.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,s.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,s.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,s.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[e.latencyMs,"ms"]}),(0,s.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${e.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:e.valid?(0,f.Tl)("OK"):e.diagnosis?.type||(0,f.Tl)("ERROR")})]},e.connectionId||t)),0===a.length&&(0,s.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:(0,f.Tl)("No active connections found for this group.")})]})}j.propTypes={variant:i().oneOf(["openai","anthropic"]).isRequired,isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired},w.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},k.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string,apiType:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},C.propTypes={results:i().shape({mode:i().string,results:i().array,summary:i().shape({total:i().number,passed:i().number,failed:i().number}),error:i().string}).isRequired}}},e=>{e.O(0,[3170,1728,1321,5497,8441,3794,7358],()=>e(e.s=67455)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-5f5434b22c7f7b73.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7414],{71470:(e,t,s)=>{"use strict";s.d(t,{default:()=>j});var a=s(95155),l=s(12115),r=s(21742),i=s(63346),d=s(77496),n=s(32539),o=s(59656),x=s(77621),c=s(31310),m=s(35497);let p=e=>e>=1e6?`${(e/1e6).toFixed(2)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),h=[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"last7d",label:"7 days"},{id:"last30d",label:"30 days"},{id:"all",label:"All time"}],u={applied:"Prompt exceeded threshold",below_threshold:"Below size threshold",not_profitable:"Compression not profitable",below_min_chars:"Below minimum chars",below_min_tokens:"Below minimum tokens",unsupported_model:"Model not in allowlist",unsupported_format:"Non-Claude request format",timeout:"Compression timed out",transform_error:"Transform error",passthrough:"Passthrough",disabled:"Disabled",not_installed:"Not installed"};function g({label:e,value:t,sub:s,tone:l}){return(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted uppercase tracking-wide",children:e}),(0,a.jsx)("p",{className:`text-xl font-semibold mt-1 ${l||""}`,children:t}),s&&(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:s})]})}function j(){let[e,t]=(0,l.useState)(null),[s,j]=(0,l.useState)(null),[b,f]=(0,l.useState)(null),[N,y]=(0,l.useState)(null),[v,w]=(0,l.useState)("last7d"),[k,S]=(0,l.useState)(!0),P=(0,l.useCallback)(async()=>{S(!0);try{let[e,s,a]=await Promise.all([fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),fetch("/api/pxpipe/stats"),fetch("/api/pxpipe/logs?limit=50")]);t(await e.json()),f(await s.json()),y(await a.json());let l=await fetch("/api/pxpipe/health",{method:"POST"});j(await l.json())}catch{}finally{S(!1)}},[]);(0,l.useEffect)(()=>{P()},[P]);let E=b?.windows?.[v],$=e?e.installed?s?.healthy?"Healthy":e.running?"Running":"Stopped":"Not installed":"—";return(0,a.jsxs)("div",{className:"space-y-6 p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"image"}),"PXPIPE Dashboard"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("a",{href:"/dashboard/token-saver",className:"text-xs text-primary underline hover:opacity-80",children:"Token Saver settings"}),(0,a.jsx)(m.$n,{size:"sm",variant:"ghost",onClick:P,disabled:k,children:k?"Refreshing…":"Refresh"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:[(0,a.jsx)(g,{label:"Status",value:$,tone:s?.healthy?"text-success":e?.installed?"text-warning":"text-text-muted",sub:e?.enabled?"Enabled in pipeline":"Disabled in pipeline"}),(0,a.jsx)(g,{label:"Version",value:e?.version?`v${e.version}`:"—",sub:"pxpipe-proxy"}),(0,a.jsx)(g,{label:"Uptime",value:(e=>{if(!e||e<=0)return"—";let t=Math.floor(e/6e4),s=Math.floor(t/60);return s>0?`${s}h${String(t%60).padStart(2,"0")}m`:`${t}m`})(e?.uptimeMs),sub:"module loaded"}),(0,a.jsx)(g,{label:"Requests",value:E?E.requests.toLocaleString():"—"}),(0,a.jsx)(g,{label:"Compressed",value:E?E.compressed.toLocaleString():"—",tone:"text-success"}),(0,a.jsx)(g,{label:"Bypassed",value:E?E.bypassed.toLocaleString():"—"})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3 mb-4",children:[(0,a.jsx)("h3",{className:"font-medium",children:"Token savings (estimated)"}),(0,a.jsx)("div",{className:"flex items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1",children:h.map(e=>(0,a.jsx)("button",{onClick:()=>w(e.id),className:`px-3 py-1 rounded-md text-xs font-medium transition-colors ${v===e.id?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:e.label},e.id))})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Original tokens"}),(0,a.jsx)("p",{className:"text-lg font-semibold",children:E?p(E.tokensBeforeEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"After PXPIPE"}),(0,a.jsx)("p",{className:"text-lg font-semibold",children:E?p(E.tokensAfterEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Saved"}),(0,a.jsx)("p",{className:"text-lg font-semibold text-success",children:E?p(E.tokensSavedEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Reduction"}),(0,a.jsx)("p",{className:"text-lg font-semibold text-success",children:E?`${E.savedPct}%`:"—"})]})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-3",children:["Estimates from body size before/after imaging; billed usage per request (recorded on the Usage page) remains the ground truth. Images generated:"," ",E?E.imagesGenerated.toLocaleString():"—"," \xb7 avg compression time:"," ",E?`${E.avgCompressionMs}ms`:"—"," \xb7 errors: ",E?E.errors:"—"]})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"Tokens saved — last 30 days"}),b?.timeline?.some(e=>e.tokensSavedEst>0)?(0,a.jsx)(r.u,{width:"100%",height:220,children:(0,a.jsxs)(i.Q,{data:b.timeline,margin:{top:4,right:8,left:0,bottom:0},children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"gradPxpipe",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#10b981",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#10b981",stopOpacity:0})]})}),(0,a.jsx)(d.d,{strokeDasharray:"3 3",strokeOpacity:.2}),(0,a.jsx)(n.W,{dataKey:"date",tick:{fontSize:11},tickFormatter:e=>e.slice(5)}),(0,a.jsx)(o.h,{tick:{fontSize:11},tickFormatter:p,width:48}),(0,a.jsx)(x.m,{formatter:e=>[p(e),"Tokens saved"],labelFormatter:e=>e}),(0,a.jsx)(c.Gk,{type:"monotone",dataKey:"tokensSavedEst",stroke:"#10b981",fill:"url(#gradPxpipe)",strokeWidth:2})]})}):(0,a.jsx)("div",{className:"h-32 flex items-center justify-center text-text-muted text-sm",children:"No savings recorded yet — enable PXPIPE in the Token Saver and route a large Claude-format request."})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"History"}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border",children:[(0,a.jsx)("th",{className:"py-2 pr-3",children:"Time"}),(0,a.jsx)("th",{className:"py-2 pr-3",children:"Model"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Original"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Compressed"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Saved"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"%"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Duration"}),(0,a.jsx)("th",{className:"py-2",children:"Status"})]})}),(0,a.jsxs)("tbody",{children:[(b?.recent||[]).slice(0,50).map((e,t)=>(0,a.jsxs)("tr",{className:"border-b border-border/50",children:[(0,a.jsx)("td",{className:"py-1.5 pr-3 whitespace-nowrap text-text-muted",children:new Date(e.ts).toLocaleString()}),(0,a.jsx)("td",{className:"py-1.5 pr-3 font-mono text-xs",children:e.provider?`${e.provider}/${e.model}`:e.model||"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?p(e.tokensBeforeEst):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?p(e.tokensAfterEst):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs text-success",children:e.applied?p(e.tokensSavedEst):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?`${e.savedPct}%`:"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:null!=e.durationMs?`${e.durationMs}ms`:"—"}),(0,a.jsx)("td",{className:"py-1.5",children:(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${e.applied?"bg-success/15 text-success":"transform_error"===e.reason||"timeout"===e.reason?"bg-danger/15 text-danger":"bg-warning/15 text-warning"}`,title:e.detail||"",children:e.applied?"Compressed":u[e.reason]||e.reason})})]},`${e.ts}-${t}`)),(!b?.recent||0===b.recent.length)&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:8,className:"py-6 text-center text-text-muted text-sm",children:"No PXPIPE activity yet"})})]})]})})]}),(0,a.jsxs)(m.Zp,{className:"p-4",id:"logs",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"PXPIPE Logs"}),N?.installLog?(0,a.jsx)("pre",{className:"rounded bg-black/5 dark:bg-white/5 p-3 text-xs font-mono overflow-x-auto max-h-64 overflow-y-auto whitespace-pre-wrap",children:N.installLog}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No install log yet."})]})]})}},93224:(e,t,s)=>{Promise.resolve().then(s.bind(s,71470))}},e=>{e.O(0,[3170,1728,1321,5497,8441,3794,7358],()=>e(e.s=93224)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c640efd5ea8efb38.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{26048:(e,t,r)=>{Promise.resolve().then(r.bind(r,75095)),Promise.resolve().then(r.bind(r,25086))},75095:(e,t,r)=>{"use strict";r.d(t,{default:()=>I});var a=r(95155),i=r(12115),s=r(67852),n=r(45564);let l="quotaCacheData",o="quotaAutoRefresh",d=[10,20,50,100],c=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],u=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function m(e){return e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function x(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function h(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function p(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function b(e,t){return await e(t)}function g(){try{let e=window.localStorage.getItem(l);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function f(e,t){try{let r=g();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(l,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}function y(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function v(e){return e&&"object"==typeof e?String(e.modelKey||e.name||"").trim():""}function k(e,t,r,a=[]){let i=null,s=t?.[e]?.hidden;if(Array.isArray(s))i=s.map(String);else if(r&&r!==e){let e=t?.[r]?.hidden;Array.isArray(e)&&(i=e.map(String))}return i?new Set(Array.isArray(a)&&a.length>0?function(e=[],t=[]){if(!Array.isArray(e)||0===e.length)return[];let r=new Set(t.map(v).filter(Boolean));return[...new Set(e.map(e=>String(e).trim()).filter(e=>r.has(e)))]}(i,a):i):new Set}var w=r(73006);function j(e){let t=String(e||"").trim();if(!t)return"";let r=(0,w.Tl)(t);if(r!==t)return r;let a=/^Bonus Pack (\d+)$/.exec(t);if(a)return`${(0,w.Tl)("Bonus Pack")} ${a[1]}`;let i=/^weekly\s+(.+)\s+\(7d\)$/i.exec(t);if(i)return`${(0,w.Tl)("Weekly")} ${i[1]} (7d)`;let s=/^Balance(?:\s*\((.+)\))?$/i.exec(t);return s?s[1]?`${(0,w.Tl)("Balance")} (${s[1]})`:(0,w.Tl)("Balance"):t}function N({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:s=!1,onHideQuota:n=null}){let[l,o]=(0,i.useState)(1),d=(0,i.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):e?.remaining!==void 0&&(e?.total===100||e?.total===void 0)?Math.max(0,Math.round(e.remaining)):y(e?.used,e?.total)})),[e]),c=(0,i.useMemo)(()=>"remaining-asc"===r?[...d].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...d].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):d,[d,r]),u=Math.max(1,Math.ceil(c.length/10));if((0,i.useEffect)(()=>{o(1)},[r,e]),(0,i.useEffect)(()=>{o(e=>Math.min(e,u))},[u]),!e||0===e.length)return null;let m=c.slice((l-1)*10,10*l),x=0===c.length?0:(l-1)*10+1,h=Math.min(10*l,c.length),p=t?"py-1 px-1.5":"py-2 px-3",b=t?"text-[11px]":"text-sm",g=t?"text-[11px]":"text-sm",f=t?"text-[10px] leading-tight":"text-xs",v="function"==typeof n;return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[c.length," quota",c.length>1?"s":""]}),s&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"space-y-px",children:m.map(e=>{var r;let i=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},s=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0||t.getFullYear()>2099)return"-";let i=Math.ceil(a/6e4);if(i<60)return`${i}m`;let s=Math.floor(i/60),n=i%60;if(s<24)return`${s}h ${n}m`;let l=Math.floor(s/24);return`${l}d ${s%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),l=function(e){if(!e)return null;try{let t=new Date(e);if(t.getFullYear()>2099)return null;let r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),i=new Date(a);i.setDate(i.getDate()+1);let s="";s=t>=a&&t<i?"Today":t>=i&&t<new Date(i.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${s}, ${n}`}catch{return null}}(e.resetAt),o=!1!==e.recurring?`in ${s}`:`expires in ${s}`;return(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${p}`,children:[(0,a.jsxs)("div",{className:"flex w-36 min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:i.emoji}),(0,a.jsx)("span",{className:`${b} font-medium text-text-primary truncate`,children:j(e.name)})]}),(0,a.jsxs)("div",{className:`min-w-0 flex-1 ${t?"space-y-1":"space-y-1.5"}`,children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${i.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${i.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between gap-1 min-w-0 ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsx)("span",{className:"text-text-muted truncate",title:e.percentScale||!0===e.displayRemaining?void 0:`${e.used.toLocaleString()} / ${e.unlimited?"∞":e.total.toLocaleString()}`,children:e.percentScale?"":!0===e.displayRemaining&&e.total>0?`${Number((e.total-e.used).toFixed(2)).toLocaleString()} / ${Number(e.total.toFixed(2)).toLocaleString()}`:`${e.used.toLocaleString()} / ${e.unlimited?"∞":e.total.toLocaleString()}`}),(0,a.jsxs)("span",{className:`font-medium ${i.text} shrink-0`,children:[e.remaining,"%"]})]})]}),(0,a.jsx)("div",{className:"min-w-0 shrink",children:"-"!==s||l?t?(0,a.jsx)("div",{className:`${g} text-text-primary font-medium truncate`,title:l||"",children:"-"!==s?o:l}):(0,a.jsxs)("div",{className:"min-w-0 space-y-0.5",children:["-"!==s&&(0,a.jsx)("div",{className:`${g} text-text-primary font-medium truncate`,children:o}),l&&(0,a.jsx)("div",{className:`${f} text-text-muted truncate`,children:l})]}):(0,a.jsx)("div",{className:`${g} text-text-muted italic`,children:"N/A"})}),v&&(0,a.jsx)("button",{type:"button",onClick:()=>n(e),className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5",title:"Hide this quota row","aria-label":`Hide quota ${e.name}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"visibility_off"})})]},`${e.name}-${e.index}`)})}),u>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",x,"-",h," of ",c.length]}),(0,a.jsxs)("span",{children:["Page ",l," / ",u]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>o(e=>Math.max(1,e-1)),disabled:1===l,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>o(e=>Math.min(u,e+1)),disabled:l===u,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var S=r(98542),C=r(97677),A=r(84588),$=r(35497),P=r(88105),q=r(11059);let E={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},T={claude:"claudeAutoPing",codex:"codexAutoPing"},D={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota."};function M(e){return e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null}function O(e){let t=e.providerSpecificData?.region;if(t)return t;let r=e.providerSpecificData?.profileArn;return("string"==typeof r?r.split(":")[3]:"")||""}function F(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}function I(){let{copied:e,copy:t}=(0,q.C)(),[r,I]=(0,i.useState)([]),[_,L]=(0,i.useState)({}),[z,R]=(0,i.useState)({}),[W,U]=(0,i.useState)({}),[H,K]=(0,i.useState)(!0),[B,J]=(0,i.useState)({claude:{},codex:{}}),[G,V]=(0,i.useState)(null),[Y,Q]=(0,i.useState)(!1),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(60),[er,ea]=(0,i.useState)(!0),[ei,es]=(0,i.useState)(null),[en,el]=(0,i.useState)(null),[eo,ed]=(0,i.useState)(null),[ec,eu]=(0,i.useState)(null),[em,ex]=(0,i.useState)(null),[eh,ep]=(0,i.useState)(!1),[eb,eg]=(0,i.useState)(null),[ef,ey]=(0,i.useState)([]),[ev,ek]=(0,i.useState)(()=>window.localStorage.getItem("quotaProviderFilter")||"all"),[ew,ej]=(0,i.useState)([]),[eN,eS]=(0,i.useState)(()=>window.localStorage.getItem("quotaAccountFilter")||"all");(0,i.useEffect)(()=>{window.localStorage.setItem("quotaProviderFilter",ev)},[ev]),(0,i.useEffect)(()=>{window.localStorage.setItem("quotaAccountFilter",eN)},[eN]);let[eC,eA]=(0,i.useState)("default"),[e$,eP]=(0,i.useState)({}),[eq,eE]=(0,i.useState)(!1),[eT,eD]=(0,i.useState)(!1),[eM,eO]=(0,i.useState)(!1),[eF,eI]=(0,i.useState)(1),[e_,eL]=(0,i.useState)(20),[ez,eR]=(0,i.useState)(String(20)),[eW,eU]=(0,i.useState)({page:1,pageSize:20,total:0,totalPages:1}),[eH,eK]=(0,i.useState)({eligibleConnections:0,providerFilteredConnections:0}),eB=(0,i.useRef)(null),eJ=(0,i.useRef)(null),eG=(0,i.useRef)(0),eV=(0,i.useCallback)(async(e=eF)=>{try{var t,r;let a=new URLSearchParams({page:String(e),pageSize:String(e_),accountStatus:eN,sort:"priority"});"all"!==ev&&a.set("provider",ev);let i=await fetch(`/api/providers/client?${a.toString()}`);if(!i.ok)throw Error("Failed to fetch connections");let s=await i.json(),n=s.connections||[],l=(t=s.pagination,t||{page:1,pageSize:e_,total:0,totalPages:1}),o=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(s.totals,n.length);return I(n),ej(s.providerOptions||[]),eU(l),eK(o),eI((r=s.pagination,r?.page||e)),n}catch(e){return console.error("Error fetching connections:",e),I([]),ej([]),eU({page:1,pageSize:e_,total:0,totalPages:1}),eK({eligibleConnections:0,providerFilteredConnections:0}),[]}},[eN,eq,eF,e_,ev]),eY=(0,i.useCallback)(async(e,t,{force:r=!1}={})=>{R(t=>({...t,[e]:!0})),U(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let a=`/api/usage/${e}${r?"?force=1":""}`,i=await fetch(a);if(!i.ok){let r=(await i.json().catch(()=>({}))).error||i.statusText;if(404===i.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===i.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,r);let a={quotas:[],message:r};L(t=>({...t,[e]:a})),f(e,a);return}throw Error(`HTTP ${i.status}: ${r}`)}let s=await i.json();console.log(`[ProviderLimits] Got quota for ${t}:`,s);let l={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":if(t.quotas){let e=Object.entries(t.quotas),a=e.filter(([e])=>e.startsWith("gemini-")&&!e.includes("image")),i=e.filter(([e])=>e.startsWith("claude-")||e.startsWith("gpt-")),s=e.filter(([e])=>e.includes("image")),n=e.filter(([e])=>!e.startsWith("gemini-")&&!e.startsWith("claude-")&&!e.startsWith("gpt-")&&!e.includes("image"));if(a.length>0){let e=a.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1];r.push({name:"Gemini (Flash / Pro)",modelKey:"gemini",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage,percentScale:!0})}if(i.length>0){let e=i.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1];r.push({name:"Claude (Sonnet / Opus / GPT)",modelKey:"claude",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage,percentScale:!0})}s.forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,percentScale:!0})}),n.forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,percentScale:!0})})}break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{if("organization"===e&&(!t||0===(Number(t.total)||0)))return;let a=t.resetAt&&2099>=new Date(t.resetAt).getFullYear()?t.resetAt:null;r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:a,unlimited:!0===t.unlimited})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:void 0!==t.remaining?t.remaining:Math.max(0,(t.total||100)-(t.used||0)),remainingPercentage:void 0!==t.remainingPercentage?t.remainingPercentage:y(t.used,t.total),resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codebuddy-cn":case"codebuddy-intl":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,recurring:!1!==t.recurring,displayRemaining:!0})});break;case"grok-cli":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"kimi":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"deepseek":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"ollama":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"commandcode":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:void 0!==t.remaining?t.remaining:Math.max(0,(t.total||0)-(t.used||0)),remainingPercentage:void 0!==t.remainingPercentage?t.remainingPercentage:y(t.used,t.total),resetAt:t.resetAt||null,recurring:!0===t.recurring,displayRemaining:!0})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}if(e?.toLowerCase()==="claude"){let e={"session (5h)":0,"weekly (7d)":1,"weekly fable (7d)":2,"weekly opus (7d)":3,"weekly sonnet (7d)":4};return r.sort((t,r)=>(e[t.name]??99)-(e[r.name]??99)),r}if(e?.toLowerCase()==="commandcode"){let e={"session (5h)":0,"weekly (7d)":1,"Monthly Credits":2,"Purchased Credits":3};return r.sort((t,r)=>(e[t.name]??99)-(e[r.name]??99)),r}let a=(0,n.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,i=r.modelKey||r.name;return(e.get(a)??999)-(e.get(i)??999)})}return r}(t,s),plan:s.plan||null,message:s.message||null,raw:s};L(t=>({...t,[e]:l})),f(e,l)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),U(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{R(t=>({...t,[e]:!1}))}},[]),eQ=(0,i.useCallback)(async(e,t)=>{await eY(e,t,{force:!0}),V(new Date)},[eY]),eX=(0,i.useCallback)(async(e,t)=>{if("codex"===t&&!eo){ed(e),U(t=>({...t,[e]:null}));try{let r=await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.message||a.error||a.code||"Failed to reset Codex limit");await eY(e,t),V(new Date)}catch(t){U(r=>({...r,[e]:t.message||"Failed to reset Codex limit"}))}finally{ed(null)}}},[eY,eo]),eZ=(0,i.useCallback)(async e=>{ex({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),ex({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){ex({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),e0=(0,i.useCallback)(async e=>{if(confirm("Delete this connection?")){es(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){L(t=>{let r={...t};return delete r[e],r}),R(t=>{let r={...t};return delete r[e],r}),U(t=>{let r={...t};return delete r[e],r});try{let t=g();t[e]&&(delete t[e],window.localStorage.setItem(l,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await b(eV,eF)}}catch(e){console.error("Error deleting connection:",e)}finally{es(null)}}},[eV,eF]),e1=(0,i.useCallback)(async(e,t)=>{el(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(L(e=>({...e})),await b(eV,eF))}catch(e){console.error("Error updating connection status:",e)}finally{el(null)}},[eV,eF]),e5=(0,i.useCallback)(async e=>{if(!eb?.id)return;let t=eb.id,r=eb.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eV(),ep(!1),eg(null),P.wb.includes(r)&&await eY(t,r))}catch(e){console.error("Error saving connection:",e)}},[eb,eV,eY]);(0,i.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&ey(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let e2=(0,i.useCallback)(async(e=!1)=>{if(X)return;Z(!0),et(60);let t=eG.current+=1,r=Math.round(10);try{let a=await eV(eF);R(h(a)),U(e=>p(e,a)),L(e=>p(e,a)),await Promise.all(a.filter(a=>e||"claude"!==a.provider||t%r==0).map(e=>eY(e.id,e.provider))),V(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{Z(!1)}},[X,eV,eY,eF]);(0,i.useEffect)(()=>{(async()=>{ea(!0);let e=await eV(eF);ea(!1),R(h(e)),U(t=>p(t,e)),L(t=>p(t,e)),await Promise.all(e.map(e=>eY(e.id,e.provider))),V(new Date)})()},[eV,eY,eF]),(0,i.useEffect)(()=>{let e=window.localStorage.getItem(o);K(null===e||"true"===e),Q(!0)},[]),(0,i.useEffect)(()=>{Y&&window.localStorage.setItem(o,String(H))},[H,Y]),(0,i.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{J({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}}),eP(e?.quotaVisibility||{})}).catch(()=>{})},[]);let e3=(0,i.useCallback)(async(e,t,r)=>{let a=T[t];if(!a)return;let i={...B[t]||{},[e]:r};J({...B,[t]:i});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[a]||{},connections:i};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:t})})}catch{J(B)}},[B]),e4=(0,i.useCallback)(async(e,t)=>{eP(e);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:e})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),eP(t)}},[]),e8=(0,i.useCallback)((e,t,r)=>{let a=v(t);if(!e||!a)return;let i=e$[e]||{},s=new Set(i.hidden||[]);if(s.add(a),"antigravity"===r){if("gemini"===a)for(let e of s)e.startsWith("gemini-")&&!e.includes("image")&&s.delete(e);else if("claude"===a)for(let e of s)(e.startsWith("claude-")||e.startsWith("gpt-"))&&s.delete(e)}e4({...e$,[e]:{...i,hidden:[...s]}},e$)},[e$,e4]),e6=(0,i.useCallback)((e,t,r)=>{let a=v(t);if(!e||!a)return;let i=e$[e]||{},s=new Set(i.hidden||[]);if(s.delete(a),"antigravity"===r){if("gemini"===a)for(let e of s)e.startsWith("gemini-")&&!e.includes("image")&&s.delete(e);else if("claude"===a)for(let e of s)(e.startsWith("claude-")||e.startsWith("gpt-"))&&s.delete(e)}e4({...e$,[e]:{...i,hidden:[...s]}},e$)},[e$,e4]);(0,i.useEffect)(()=>{if(!Y||!H){eB.current&&(clearInterval(eB.current),eB.current=null),eJ.current&&(clearInterval(eJ.current),eJ.current=null);return}return eB.current=setInterval(()=>{e2()},6e4),eJ.current=setInterval(()=>{et(e=>e<=1?60:e-1)},1e3),()=>{eB.current&&clearInterval(eB.current),eJ.current&&clearInterval(eJ.current)}},[H,e2,Y]),(0,i.useEffect)(()=>{let e=()=>{document.hidden?(eB.current&&(clearInterval(eB.current),eB.current=null),eJ.current&&(clearInterval(eJ.current),eJ.current=null)):H&&Y&&(eB.current=setInterval(()=>e2(),6e4),eJ.current=setInterval(()=>{et(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[H,e2,Y]);let e9=(0,i.useMemo)(()=>(function(e,t,r,a,i){if("codex"===a&&"default"!==i)return[...e].sort((e,r)=>{let a=x(e,t),s=x(r,t),n="remaining-asc"===i?a-s:s-a;return 0!==n?n:(m(e)||"").localeCompare(m(r)||"")});if(!r){let t=new Map;for(let r of e){let e=r.provider||"";t.has(e)||t.set(e,[]),t.get(e).push(r)}return Array.from(t.values()).flat()}let s=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=s(e)-s(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(m(e)||"").localeCompare(m(t)||"")})})(r,_,eq,ev,eC),[r,_,eq,ev,eC]),e7=(0,i.useCallback)(()=>{let e={...e$},t=!1;for(let r of e9){let a=e[r.id]||{},i=[...function(e){let t=new Set;if(!Array.isArray(e))return t;for(let r of e){let e=v(r);if(!e||!0===r.unlimited)continue;let a=r.total||0;(a<=0||(r.used||0)>=a)&&t.add(e)}return t}(_[r.id]?.quotas||[])],s=a.hidden||[];(i.length!==s.length||i.some((e,t)=>e!==s[t]))&&(e[r.id]={...a,hidden:i},t=!0)}t&&e4(e,e$)},[e$,e4,e9,_]),te=(0,i.useCallback)(()=>{let e={...e$},t=!1;for(let r of e9)e[r.id]?.hidden?.length&&(e[r.id]={...e[r.id],hidden:[]},t=!0);t&&e4(e,e$)},[e$,e4,e9]),tt=e=>{let t=_[e.id]?.quotas;if(!t?.length)return!1;let r=t.filter(e=>!0!==e.unlimited);return 0!==r.length&&r.every(e=>{let t=e.total||0;return t<=0||(e.used||0)>=t})},tr=(0,i.useCallback)(async(e,t)=>{if(e.length&&!eM){eO(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await b(eV,eF)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eO(!1)}}},[eM,eV,eF]),ta="all"===ev?"All providers":ev,ti=eH.eligibleConnections>0,ts=e9.length>0,tn=eH.eligibleConnections?eH.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===ev?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eN?"turned off":"active"===eN?"active":"matching"} accounts found for ${ev}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},tl=function(e){var t;let{start:r,end:a}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${r}-${a} of ${e.total}`}(eW),to=!d.includes(e_),td=er||ti?er||ts?null:(0,a.jsx)(A.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:tn.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:tn.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:tn.description})]})}):(0,a.jsx)(A.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})});return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eD(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":eT,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===ev?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(s.A,{src:`/providers/${ev}.png`,alt:ev,size:18,className:"size-[18px] rounded object-contain",fallbackText:ev.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:ta})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),eT&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>eD(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{"all"!==ev&&eI(1),ek("all"),eD(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ev?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ev&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:ew.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{ev!==e&&eI(1),ek(e),eD(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ev===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)(s.A,{src:`/providers/${e}.png`,alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),ev===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:eN,onChange:e=>{let t=e.target.value;eN!==t&&eI(1),eS(t)},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:c.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===ev&&(0,a.jsx)("select",{value:eC,onChange:e=>eA(e.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:u.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>eE(e=>!e),"aria-pressed":eq,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${eq?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{tr(e9.filter(e=>(e.isActive??!0)&&tt(e)).map(e=>e.id),!1)},disabled:eM,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:(0,w.Tl)("Turn off Empty")})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{tr(e9.filter(e=>!(e.isActive??!0)&&!tt(e)).map(e=>e.id),!0)},disabled:eM,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:(0,w.Tl)("Turn on Available")})]}),(0,a.jsxs)("button",{type:"button",onClick:e7,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-blue-500/30 px-2 text-xs text-blue-500 transition-colors hover:bg-blue-500/10",title:"Hide depleted (zero-balance) quota packs across current connections",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"visibility"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:(0,w.Tl)("Only with balance")})]}),(0,a.jsxs)("button",{type:"button",onClick:te,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:"Show all quota packs across current connections",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"visibility_off"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:(0,w.Tl)("Show all")})]}),(0,a.jsxs)("button",{onClick:()=>K(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:H?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${H?"text-primary":"text-text-muted"}`,children:H?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),H&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",ee,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>e2(!0),disabled:X,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${X?"animate-spin":""}`,children:"refresh"})})]})}),"all"!==eN&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",children:"filter_alt"}),(0,a.jsx)("span",{children:(0,w.Tl)("Account filter is active and persists across visits")})]}),eq&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),td&&(0,a.jsx)("div",{className:"pt-2",children:td}),!td&&(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e9.map(r=>{let i,n,l,o=_[r.id],d=z[r.id],c=W[r.id],u=!1===r.isActive,x="codex"===r.provider,h=Number.isFinite(n="number"==typeof(i=o?.raw?.resetCredits?.availableCount)?i:Number(i))?Math.max(0,n):0,p=eo===r.id,b=ei===r.id||en===r.id||p,g=o?.quotas||[],f=function(e,t=[],r={},a){if(!Array.isArray(t)||0===t.length)return[];let i=k(e,r,a,t);return 0===i.size?t:t.filter(e=>!i.has(v(e)))}(r.id,g,e$,r.provider),y=function(e,t=[],r={},a){if(!Array.isArray(t)||0===t.length)return[];let i=k(e,r,a,t);return 0===i.size?[]:t.filter(e=>i.has(v(e)))}(r.id,g,e$,r.provider);return(0,a.jsxs)(A.default,{padding:"none",className:`min-w-0 ${u?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(s.A,{src:`/providers/${r.provider}.png`,alt:r.provider,size:32,className:"object-contain",fallbackText:r.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:r.provider}),m(r)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:m(r)}):null,M(r)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:M(r)}):null,"kiro"===r.provider&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,a.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(l=r.providerSpecificData?.authMethod)&&E[l]?E[l]:"api_key"===r.authType?"API Key":"OAuth"}),O(r)&&(0,a.jsx)("span",{className:"rounded-full bg-blue-500/10 px-2 py-0.5 text-[10px] font-semibold text-blue-600 dark:text-blue-400",children:O(r)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${u?"bg-surface-2 text-text-muted":"active"===r.testStatus||"success"===r.testStatus?"bg-green-500/10 text-green-600 dark:text-green-400":"error"===r.testStatus||"expired"===r.testStatus||"unavailable"===r.testStatus?"bg-red-500/10 text-red-600 dark:text-red-400":"bg-surface-2 text-text-muted"}`,children:u?"disabled":r.testStatus||"unknown"}),r.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>t(r.providerSpecificData.profileArn,r.id),title:r.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===r.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:r.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[x&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C.default,{text:h>0?`Use one Codex reset credit. Available: ${h}`:"No Codex reset credits available",children:(0,a.jsxs)("button",{type:"button",onClick:()=>eu({connection:r,resetCreditCount:h}),disabled:h<=0||d||b,"aria-label":h>0?`Use one Codex reset credit. ${h} available.`:"No Codex reset credits available",className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${h>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-black/10 bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${p?"animate-spin":""}`,children:p?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:h})]})}),(0,a.jsx)(C.default,{text:"View Codex reset credit expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>eZ(r),disabled:d||b,"aria-label":"View Codex reset credit expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-muted transition-colors hover:bg-black/5 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),T[r.provider]&&"oauth"===r.authType&&(0,a.jsx)(C.default,{text:D[r.provider],children:(0,a.jsx)("button",{type:"button",onClick:()=>e3(r.id,r.provider,B[r.provider]?.[r.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${B[r.provider]?.[r.id]===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)(C.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>eQ(r.id,r.provider),disabled:d||b,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${d?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(C.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>{eg(r),ep(!0)},disabled:b,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(C.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>e0(r.id),disabled:b,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${ei===r.id?"animate-pulse":""}`,children:"delete"})})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:r.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(S.default,{size:"sm",checked:r.isActive??!0,disabled:b,onChange:e=>e1(r.id,e)})})]})]})}),(0,a.jsxs)("div",{className:"px-2 py-1.5",children:[d?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):c?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:c})]}):o?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:o.message})}):(0,a.jsx)(N,{quotas:f,compact:!0,sortMode:"default",showSortLabel:"codex"===r.provider&&"default"!==eC,onHideQuota:e=>e8(r.id,e,r.provider)}),y.length>0&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 items-center gap-1 border-t border-black/5 pt-2 text-[10px] text-text-muted dark:border-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px]",children:"visibility_off"}),(0,a.jsx)("span",{className:"shrink-0",children:"Hidden:"}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap pb-2",children:y.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>e6(r.id,e,r.provider),className:"shrink-0 rounded-md border border-black/10 px-1.5 py-0.5 transition-colors hover:bg-black/5 hover:text-text-primary dark:border-white/10 dark:hover:bg-white/5",title:"Show this quota row",children:j(e.name)},v(e)))})]})]})]},r.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:tl}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:to?"custom":String(e_),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(eI(1),eL(r),eR(String(r)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[d.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:ez,onChange:e=>eR(e.target.value),onBlur:()=>{let e=Number.parseInt(ez,10);if(!Number.isFinite(e))return void eR(String(e_));let t=Math.min(500,Math.max(1,e));eI(1),eL(t),eR(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(ez,10);if(!Number.isFinite(t))return void eR(String(e_));let r=Math.min(500,Math.max(1,t));eI(1),eL(r),eR(String(r))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eW.page," / ",eW.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eI(1),disabled:eW.page<=1||er||X,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eI(e=>Math.max(1,e-1)),disabled:eW.page<=1||er||X,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eI(e=>Math.min(eW.totalPages,e+1)),disabled:eW.page>=eW.totalPages||er||X,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eI(eW.totalPages),disabled:eW.page>=eW.totalPages||er||X,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)($.uo,{isOpen:!!ec,onClose:()=>{eo||eu(null)},onConfirm:async()=>{let e=ec?.connection;e&&(await eX(e.id,e.provider),eu(null))},title:"Reset Codex limit?",message:`Use 1 Codex reset credit for ${m(ec?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${ec?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!eo}),em&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-neutral-950 dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-black/10 bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-text-primary",children:"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:m(em.connection)||"Codex account"})]}),(0,a.jsx)("button",{type:"button",onClick:()=>ex(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-neutral-950",children:em.loading?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):em.error?(0,a.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:em.error}):em.data?.credits?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-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,a.jsxs)("span",{children:[em.data.credits.length," reset credit",1===em.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[em.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:em.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:F(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:F(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:function(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let r=Math.ceil(t/36e5),a=Math.floor(r/24),i=r%24;return a>0?`${a}d ${i}h`:`${i}h`}(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"No reset credit details returned for this account."})})]})}),(0,a.jsx)($.wI,{isOpen:eh,connection:eb,proxyPools:ef,onSave:e5,onClose:()=>{ep(!1),eg(null)}})]})}}},e=>{e.O(0,[3170,1728,1321,5497,8441,3794,7358],()=>e(e.s=26048)),_N_E=e.O()}]);
|