@sifxprime/krouter 0.5.154 → 0.5.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +6 -6
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +19 -19
- package/app/.next-cli-build/routes-manifest.json +4 -4
- 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_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +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_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_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_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_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/environment/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/environment/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_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_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_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_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_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_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/presidio/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/presidio/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_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_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_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_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_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_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_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_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_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_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_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_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_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js +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/oidc/callback/route.js +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/test/route.js +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/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cache/route.js +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/antigravity-mitm/alias/route.js +2 -2
- 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/claude-settings/route.js +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/codex-settings/route.js +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/cowork-mcp-registry/route.js +2 -2
- 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-settings/route.js +2 -2
- 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/droid-settings/route.js +2 -2
- 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/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +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/proxy/[...path]/route.js +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/start/route.js +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/stop/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +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/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +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/elevenlabs/voices/route.js +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/minimax/voices/route.js +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/mitm/cert/route.js +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/availability/route.js +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/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/live/route.js +2 -2
- package/app/.next-cli-build/server/app/api/models/live-by-connection/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/preview/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +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/codex/bulk-import/route.js +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/cursor/auto-import/route.js +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/gitlab/pat/route.js +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/kiro/api-key/route.js +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/import/route.js +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-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +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/route.js +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/providers/[id]/models/route.js +2 -2
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +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-models/route.js +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/health/route.js +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/route.js +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/test-batch/route.js +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/zenith/log/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/zenith/route.js +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]/test/route.js +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/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +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/install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/environment/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/presidio/route.js +7 -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/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +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/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/load/route.js +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/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +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/enable/route.js +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/tailscale-check/route.js +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-enable/route.js +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/usage/[connectionId]/route.js +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/history/route.js +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/request-details/route.js +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/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +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/audio/speech/route.js +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/voices/route.js +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/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +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/models/[...model]/route.js +1 -0
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route_client-reference-manifest.js +1 -0
- 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/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route_client-reference-manifest.js +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/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +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/videos/[id]/route.js +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/extensions/route.js +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/web/fetch/route.js +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/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +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/update/route.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/environment.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/environment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk/dashboard/environment/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/environment.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/environment.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/presidio.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/presidio.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/!KGRhc2hib2FyZCk/dashboard/presidio/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- 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_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/page.js +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 +6 -6
- package/app/.next-cli-build/server/chunks/1450.js +1 -1
- package/app/.next-cli-build/server/chunks/2365.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4921.js +1 -1
- package/app/.next-cli-build/server/chunks/5718.js +1 -1
- package/app/.next-cli-build/server/chunks/706.js +1 -1
- package/app/.next-cli-build/server/chunks/7828.js +1 -1
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8361.js +1 -1
- package/app/.next-cli-build/server/chunks/8895.js +2 -2
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/chunks/{1321-f2b171d097581218.js → 1321-7d90627aa4586868.js} +1 -1
- package/app/.next-cli-build/static/chunks/{5497-7dbbe6fc54baf250.js → 5497-cd1266dbd50a8fd6.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/{page-0a9962733d0ef748.js → page-4e64aca197262f7e.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/{route-0a9962733d0ef748.js → route-4e64aca197262f7e.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/{route-0a9962733d0ef748.js → route-4e64aca197262f7e.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/{route-0a9962733d0ef748.js → route-4e64aca197262f7e.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cache/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/import/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mitm/cert/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/live/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/live-by-connection/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/preview/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/health/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/zenith/log/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/zenith/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/environment/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/presidio/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-4e64aca197262f7e.js +1 -0
- package/app/.next-cli-build/static/css/{a0cf49bb94310fc4.css → 24b1290d34a3afd1.css} +1 -1
- package/app/cli/package.json +1 -1
- package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
- package/app/node_modules/baseline-browser-mapping/package.json +6 -6
- package/app/node_modules/caniuse-lite/data/agents.js +1 -1
- package/app/node_modules/caniuse-lite/data/browserVersions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/aac.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/apng.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-find.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audio.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/av1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/avif.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/beacon.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/bigint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/border-image.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/brotli.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/calc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/classlist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/colr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/console-time.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/const.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-all.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-has.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-if.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-table.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/customevent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/datalist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dataset.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/datauri.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/decorators.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/details.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dialog.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/download.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eme.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eot.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es5.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filereader.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flac.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fontface.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/forms.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/heif.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hevc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hidden.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/history.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ime.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/imports.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/innertext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-event.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-number.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-search.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/json.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/let.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mathml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/menu.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/meter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/midi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mp3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/notifications.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-values.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ogv.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/online-status.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/opus.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/outline.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/path2d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/picture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ping.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/portals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/progress.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/promises.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/proximity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/proxy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/push-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rellist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rem.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ruby.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/run-in.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/script-async.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sdch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sni.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/spdy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/srcset.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/stream.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/streams.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sxg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/template.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/temporal.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/touch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ttf.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/u2f.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/url.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/vibration.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/video.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wav.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-share.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgl.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webhid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webm.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webp.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/websockets.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webusb.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webvr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webxr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/will-change.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/woff.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/woff2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/word-break.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/zstd.js +1 -1
- package/app/node_modules/caniuse-lite/data/versionGroups.js +1 -0
- package/app/node_modules/caniuse-lite/dist/unpacker/feature.js +30 -1
- package/app/node_modules/caniuse-lite/dist/unpacker/versionGroups.js +1 -0
- package/app/node_modules/caniuse-lite/package.json +1 -1
- package/app/package.json +1 -2
- package/package.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +0 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cache/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/import/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mitm/cert/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/live/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/live-by-connection/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/preview/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/health/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/zenith/log/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/zenith/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/environment/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/presidio/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-0a9962733d0ef748.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-0a9962733d0ef748.js +0 -1
- /package/app/.next-cli-build/static/{vzqGwQPjZZf8pJTmdeycc → MGyehLQl_r3wD_9pZPANu}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{vzqGwQPjZZf8pJTmdeycc → MGyehLQl_r3wD_9pZPANu}/_ssgManifest.js +0 -0
package/app/.next-cli-build/static/chunks/{5497-7dbbe6fc54baf250.js → 5497-cd1266dbd50a8fd6.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5497],{98:(e,t,s)=>{s.d(t,{default:()=>n});var a=s(95155),r=s(31474);function n({label:e,options:t=[],value:s,onChange:i,placeholder:l="Select an option",error:o,hint:d,disabled:c=!1,required:m=!1,className:u,selectClassName:x,...p}){return(0,a.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-1.5",u),children:[e&&(0,a.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,m&&(0,a.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("select",{value:s,onChange:i,disabled:c,className:(0,r.cn)("w-full py-2.5 px-3 pr-10 text-sm text-text-main","bg-surface-2 border border-transparent rounded-[10px] appearance-none","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",x),...p,children:[(0,a.jsx)("option",{value:"",disabled:!0,children:l}),t.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,a.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),o&&(0,a.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},1620:(e,t,s)=>{s.d(t,{D:()=>o});var a=s(12115),r=s(90085);function n(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function i(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function l(){return!1}function o(){let{theme:e,setTheme:t,toggleTheme:s,initTheme:o}=(0,r.A)(),d=(0,a.useSyncExternalStore)(n,i,l);(0,a.useEffect)(()=>{o()},[o]),(0,a.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>o();return t.addEventListener("change",s),()=>t.removeEventListener("change",s)},[e,o]);let c="dark"===e||"system"===e&&d;return{theme:e,setTheme:t,toggleTheme:s,isDark:c}}},4823:(e,t,s)=>{s.d(t,{default:()=>x});var a=s(95155),r=s(12115),n=s(14051),i=s.n(n),l=s(84588),o=s(11910),d=s(98),c=s(56061),m=s(52679);let u="__none__";function x({providerId:e}){let[t,s]=(0,r.useState)([]),[n,i]=(0,r.useState)(u),[p,h]=(0,r.useState)(""),[f,g]=(0,r.useState)(!1),[b,v]=(0,r.useState)(!1),[j,y]=(0,r.useState)(!1),[N,k]=(0,r.useState)(null),w=m.Q2[e],C=w?.searchConfig?.baseUrl||"",S=w?.passthroughModels===!0||!!w?.modelsFetcher,O=async()=>{y(!0),k(null);try{let t=await fetch(`/api/providers/${e}/models`,{cache:"no-store"}),s=t.ok?await t.json():null;t.ok&&Array.isArray(s?.models)?k({kind:"ok",count:s.models.length}):k({kind:"err",message:s?.error||`HTTP ${t.status}`})}catch(e){k({kind:"err",message:e.message})}finally{y(!1),setTimeout(()=>k(null),4e3)}};(0,r.useEffect)(()=>{let t=!1;return Promise.all([fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.ok?e.json():{proxyPools:[]}),fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{})]).then(([a,r])=>{if(t)return;s(a.proxyPools||[]);let n=(r.providerStrategies||{})[e]||{};i(n.proxyPoolId||u),h(n.baseUrl||"")}).catch(()=>{}),()=>{t=!0}},[e]);let T=async t=>{g(!0);try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},r={...a[e]||{},...t};for(let e of Object.keys(r))(void 0===r[e]||r[e]===u)&&delete r[e];let n={...a};0===Object.keys(r).length?delete n[e]:n[e]=r,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})}),v(!0),setTimeout(()=>v(!1),1500)}catch(e){console.log("Save provider strategy error:",e)}finally{g(!1)}},F=async e=>{i(e),await T({proxyPoolId:e===u?void 0:e})},$=async()=>{let e=p.trim();await T({baseUrl:e||void 0})};return(0,a.jsxs)(l.default,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-green-500/10 text-green-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"No authentication required"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"This provider is ready to use. Optionally route requests through a proxy pool to bypass IP-based limits."})]}),b&&(0,a.jsx)(c.default,{variant:"success",size:"sm",children:"Saved"})]}),(0,a.jsx)(d.default,{label:"Proxy Pool",value:n,onChange:e=>F(e.target.value),disabled:f,options:[{value:u,label:"None (direct)"},...t.map(e=>({value:e.id,label:e.name}))]}),C&&(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsx)(o.default,{label:"Base URL",placeholder:C,value:p,onChange:e=>h(e.target.value),onBlur:$,disabled:f}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Default: ",C]})]}),S&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Live model catalog"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Pulled from upstream. Refresh to pick up new free-promo models the vendor just released."})]}),(0,a.jsxs)("button",{type:"button",onClick:O,disabled:j,className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium bg-surface-elevated border border-border hover:bg-surface-hover disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"refresh"}),j?"Refreshing...":"Refresh Models"]})]}),N?.kind==="ok"&&(0,a.jsxs)("p",{className:"text-xs text-green-500 mt-2",children:["Found ",N.count," model",1===N.count?"":"s"," from upstream."]}),N?.kind==="err"&&(0,a.jsxs)("p",{className:"text-xs text-red-500 mt-2",children:["Failed: ",N.message]})]})]})}x.propTypes={providerId:i().string.isRequired}},7648:(e,t,s)=>{s.d(t,{default:()=>d});var a=s(95155),r=s(12115),n=s(73321),i=s(65921),l=s(38572),o=s(8823);function d({children:e}){let[t,s]=(0,r.useState)(!1),c=(0,n.usePathname)(),m=(0,i.i)(e=>e.notifications),u=(0,i.i)(e=>e.removeNotification);return(0,a.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[(0,a.jsx)("div",{className:"fixed top-4 right-4 z-[80] flex w-[min(92vw,380px)] flex-col gap-2",children:m.map(e=>{var t;let s="success"===(t=e.type)?{wrapper:"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",icon:"check_circle"}:"error"===t?{wrapper:"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",icon:"error"}:"warning"===t?{wrapper:"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",icon:"warning"}:{wrapper:"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",icon:"info"};return(0,a.jsx)("div",{className:`rounded-lg border px-3 py-2 shadow-lg backdrop-blur-sm ${s.wrapper}`,children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-5",children:s.icon}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[e.title?(0,a.jsx)("p",{className:"text-xs font-semibold mb-0.5",children:e.title}):null,(0,a.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words",children:e.message})]}),e.dismissible?(0,a.jsx)("button",{type:"button",onClick:()=>u(e.id),className:"text-current/70 hover:text-current","aria-label":"Dismiss notification",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})}):null]})},e.id)})}),t&&(0,a.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>s(!1)}),(0,a.jsx)("div",{className:"hidden lg:flex",children:(0,a.jsx)(l.default,{})}),(0,a.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform lg:hidden transition-transform duration-300 ease-in-out ${t?"translate-x-0":"-translate-x-full"}`,children:(0,a.jsx)(l.default,{onClose:()=>s(!1)})}),(0,a.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300 isolate",children:[(0,a.jsx)("div",{className:"landing-grid absolute inset-0 pointer-events-none -z-10","aria-hidden":"true"}),(0,a.jsx)(o.default,{onMenuClick:()=>s(!0)},c),(0,a.jsx)("div",{className:`flex-1 overflow-y-auto custom-scrollbar ${"/dashboard/basic-chat"===c?"":"p-6 lg:p-10"} ${"/dashboard/basic-chat"===c?"flex flex-col overflow-hidden":""}`,children:(0,a.jsx)("div",{className:`${"/dashboard/basic-chat"===c?"flex-1 w-full h-full flex flex-col":"max-w-7xl mx-auto"}`,children:e})})]})]})}},8823:(e,t,s)=>{s.d(t,{default:()=>y});var a=s(95155),r=s(12115),n=s(73321),i=s(98500),l=s.n(i),o=s(14051),d=s.n(o),c=s(57250),m=s(80752),u=s(93308),x=s(38202),p=s(21931);function h(){let[e,t]=(0,r.useState)(!1),[s,n]=(0,r.useState)("en");return(0,r.useEffect)(()=>{n(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${u.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,u.QC)(t)}())},[e]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>t(!0),className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all",title:"Language","data-i18n-skip":"true",children:(0,a.jsx)("span",{className:"text-lg leading-none",children:x.h[s]||"\uD83C\uDF10"})}),(0,a.jsx)(p.default,{hideTrigger:!0,isOpen:e,onClose:e=>{t(!1),n(e)}})]})}var f=s(38587),g=s(38003),b=s(90620),v=s(52679),j=s(73006);function y({onMenuClick:e,showMenuButton:t=!0}){let s=(0,n.usePathname)(),i=(0,n.useRouter)(),[o,d]=(0,r.useState)(""),[u,x]=(0,r.useState)(""),{title:p,description:g,icon:k,breadcrumbs:w}=(0,r.useMemo)(()=>(e=>{if(!e)return{title:"",description:"",breadcrumbs:[]};let t=e.match(/\/media-providers\/([^/]+)\/([^/]+)$/);if(t){let e=t[1],s=t[2],a=v.rj.find(t=>t.id===e),r=v.Q2[s];return{title:r?.name||s,description:"",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${e}`},{label:a?.label||e,href:`/dashboard/media-providers/${e}`},{label:r?.name||s,image:`/providers/${s}.png`}]}}let s=e.match(/\/media-providers\/([^/]+)$/);if(s){let e=s[1],t=v.rj.find(t=>t.id===e);return{title:t?.label||e,description:`Manage your ${t?.label||e} providers`,icon:t?.icon||"perm_media",breadcrumbs:[]}}let a=e.match(/\/providers\/([^/]+)$/);if(a){let e=a[1],t=b.zN[e]||b.fg[e];if(t)return{title:t.name,description:"",breadcrumbs:[{label:"Providers",href:"/dashboard/providers"},{label:t.name,image:`/providers/${t.id}.png`}]}}return e.includes("/providers")&&!e.includes("/media-providers")?{title:"Providers",description:"Manage your AI provider connections",icon:"dns",breadcrumbs:[]}:e.includes("/combos")?{title:"Combos",description:"Model combos with fallback",icon:"layers",breadcrumbs:[]}:e.includes("/usage")?{title:"Usage & Analytics",description:"Monitor your API usage, token consumption, and request logs",icon:"bar_chart",breadcrumbs:[]}:e.includes("/auth-files")?{title:"Auth Files",description:"Map provider credentials stored in the local database",icon:"vpn_key",breadcrumbs:[]}:e.includes("/quota")?{title:"Quota Tracker",description:"Track and manage your API quota limits",icon:"data_usage",breadcrumbs:[]}:e.includes("/mitm")?{title:"MITM Proxy",description:"Intercept CLI tool traffic and route through kRouter",icon:"security",breadcrumbs:[]}:e.includes("/token-saver")?{title:"Token Saver",description:"Compress prompts and outputs to save tokens",icon:"savings",breadcrumbs:[]}:e.includes("/cli-tools")?{title:"CLI Tools",description:"Configure CLI tools",icon:"terminal",breadcrumbs:[]}:e.includes("/proxy-pools")?{title:"Proxy Pools",description:"Manage your proxy pool configurations",icon:"lan",breadcrumbs:[]}:e.includes("/skills")?{title:"Agent Skills",description:"Copy a link and paste to your AI to use kRouter — no install needed",icon:"extension",breadcrumbs:[]}:e.includes("/endpoint")?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:e.includes("/profile")?{title:"Settings",description:"Manage your preferences",icon:"settings",breadcrumbs:[]}:e.includes("/translator")?{title:"Translator",description:"Debug translation flow between formats",icon:"translate",breadcrumbs:[]}:e.includes("/console-log")?{title:"Console Log",description:"Live server console output",icon:"monitor",breadcrumbs:[]}:"/dashboard"===e?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:{title:"",description:"",breadcrumbs:[]}})(s),[s]);(0,r.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/auth/status",{cache:"no-store"});if(!t.ok)return;let s=await t.json();e||(d(s?.displayName||s?.oidcName||s?.oidcEmail||""),x(s?.loginMethod||""))}catch{e||(d(""),x(""))}}(),()=>{e=!0}},[]);let C=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(i.push("/login"),i.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("header",{className:"shrink-0 flex items-center justify-between gap-3 px-4 lg:px-8 pt-3 pb-2 border-b border-border-subtle bg-surface/60 backdrop-blur-xl lg:bg-transparent lg:backdrop-blur-none z-20",children:[(0,a.jsx)("div",{className:"flex items-center gap-3 lg:hidden shrink-0",children:t&&(0,a.jsx)("button",{onClick:e,className:"text-text-main hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"menu"})})}),(0,a.jsx)("div",{className:"flex flex-col min-w-0 flex-1",children:w.length>0?(0,a.jsx)("div",{className:"flex items-center gap-2",children:w.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[t>0&&(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-base",children:"chevron_right"}),e.href?(0,a.jsx)(l(),{href:e.href,className:"text-text-muted hover:text-primary transition-colors",children:e.label}):(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.image&&(0,a.jsx)(c.A,{src:e.image,alt:e.label,size:28,className:"object-contain rounded max-w-[28px] max-h-[28px]",fallbackText:e.label.slice(0,2).toUpperCase()}),(0,a.jsx)("h1",{className:"text-lg lg:text-[28px] lg:leading-9 font-semibold text-text-main tracking-[-0.02em] truncate",children:(0,j.Tl)(e.label)})]})]},`${e.label}-${e.href||"current"}`))}):p?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[k&&(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl lg:text-[26px]",children:k}),(0,a.jsx)("h1",{className:"text-lg lg:text-[28px] lg:leading-9 font-semibold tracking-[-0.02em] truncate",children:(0,j.Tl)(p)})]}),g&&(0,a.jsx)("p",{className:"hidden lg:block text-[13px] leading-5 text-text-muted truncate mt-0.5",children:(0,j.Tl)(g)})]}):null}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[o&&"OIDC"===u&&(0,a.jsxs)("div",{className:"hidden sm:flex items-center max-w-[220px] px-3 py-1.5 rounded-full border border-border bg-surface/70 text-xs text-text-muted truncate",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1.5 text-primary",children:"person"}),(0,a.jsx)("span",{className:"truncate",children:o}),(0,a.jsx)("span",{className:"ml-2 shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-primary",children:"OIDC"})]}),(0,a.jsx)(N,{}),(0,a.jsx)(f.default,{}),(0,a.jsx)(h,{}),(0,a.jsx)(m.default,{onLogout:C})]})]})}function N(){let e=(0,g.C)(e=>e.visible),t=(0,g.C)(e=>e.query),s=(0,g.C)(e=>e.placeholder),r=(0,g.C)(e=>e.setQuery);return e?(0,a.jsxs)("div",{className:"relative w-[160px] sm:w-[220px]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined absolute left-2 top-1/2 -translate-y-1/2 text-text-muted text-[16px] pointer-events-none",children:"search"}),(0,a.jsx)("input",{type:"text",value:t,onChange:e=>r(e.target.value),placeholder:s,className:"w-full h-8 pl-7 pr-7 rounded-lg border border-border bg-surface/60 text-sm focus:outline-none focus:border-primary/50 transition-colors"}),t&&(0,a.jsx)("button",{type:"button",onClick:()=>r(""),className:"absolute right-1 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-main p-0.5 rounded","aria-label":"Clear search",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}):null}y.propTypes={onMenuClick:d().func,showMenuButton:d().bool}},10319:(e,t,s)=>{s.d(t,{default:()=>D});var a=s(95155),r=s(12115),n=s(73321),i=s(52679),l=s(56061),o=s(84588),d=s(14051),c=s.n(d);let m=e=>new Intl.NumberFormat().format(e||0);function u({stats:e}){let t;return(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-4 sm:gap-4",children:[(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold",children:m(e.totalRequests)})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold text-primary",children:m(e.totalPromptTokens)})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold text-success",children:m(e.totalCompletionTokens)})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,a.jsxs)("span",{className:"truncate text-2xl font-bold text-warning",children:["~",(t=e.totalCost,`$${(t||0).toFixed(2)}`)]}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}u.propTypes={stats:c().object.isRequired};let x=e=>new Intl.NumberFormat().format(e||0),p=e=>`$${(e||0).toFixed(2)}`;function h(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function f({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,a.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,a.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function g({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":x(e.promptTokens)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":x(e.completionTokens)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:x(e.totalTokens)})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":p(e.inputCost)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":p(e.outputCost)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:p(e.totalCost||e.cost)})]})}function b({title:e,columns:t,groupedData:s,tableType:n,sortBy:i,sortOrder:l,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:u,renderSummaryCells:x,emptyMessage:p}){let[h,v]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&v(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,r.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let j=(0,r.useCallback)(e=>{v(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),y=(0,r.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),N=t.length+y.length;return(0,a.jsxs)(o.default,{className:"overflow-hidden",children:[(0,a.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,a.jsx)("h3",{className:"font-semibold",children:e})}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,a.jsxs)("tr",{children:[t.map(e=>(0,a.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(n,e.field),children:[e.label," ",(0,a.jsx)(f,{field:e.field,currentSort:i,currentOrder:l})]},e.field)),y.map(e=>(0,a.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(n,e.field),children:[e.label," ",(0,a.jsx)(f,{field:e.field,currentSort:i,currentOrder:l})]},e.field))]})}),(0,a.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,a.jsxs)(r.Fragment,{children:[(0,a.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>j(e.groupKey),children:[(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),x(e),(0,a.jsx)(g,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,a.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[u(e),(0,a.jsx)(g,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:N,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}f.propTypes={field:c().string.isRequired,currentSort:c().string.isRequired,currentOrder:c().string.isRequired},g.propTypes={item:c().object.isRequired,viewMode:c().string.isRequired,isSummary:c().bool},b.propTypes={title:c().string.isRequired,columns:c().arrayOf(c().shape({field:c().string.isRequired,label:c().string.isRequired,align:c().string})).isRequired,groupedData:c().array.isRequired,tableType:c().string.isRequired,sortBy:c().string.isRequired,sortOrder:c().string.isRequired,onToggleSort:c().func.isRequired,viewMode:c().string.isRequired,storageKey:c().string.isRequired,renderDetailCells:c().func.isRequired,renderSummaryCells:c().func.isRequired,emptyMessage:c().string.isRequired};var v=s(37206),j=s(21742),y=s(63346),N=s(28408),k=s(32539),w=s(59656),C=s(55433),S=s(40968);let O=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),T=e=>`$${(e||0).toFixed(4)}`;function F({period:e="7d"}){let[t,s]=(0,r.useState)([]),[n,i]=(0,r.useState)(!0),[l,d]=(0,r.useState)("tokens"),c=(0,r.useCallback)(async()=>{i(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();s(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{i(!1)}},[e]);(0,r.useEffect)(()=>{c()},[c]);let m=t.some(e=>e.tokens>0||e.cost>0);return(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,a.jsxs)("div",{className:"grid w-full grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",children:[(0,a.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===l?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,a.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===l?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),n?(0,a.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):m?(0,a.jsx)(j.u,{width:"100%",height:220,children:(0,a.jsxs)(y.Q,{data:t,margin:{top:4,right:8,left:0,bottom:0},children:[(0,a.jsxs)("defs",{children:[(0,a.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,a.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,a.jsx)(N.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,a.jsx)(k.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,a.jsx)(w.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===l?O:T,width:50}),(0,a.jsx)(C.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[O(e),"Tokens"]:[T(e),"Cost"]}),"tokens"===l?(0,a.jsx)(S.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,a.jsx)(S.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,a.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function $(e){let t=i.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}F.propTypes={period:c().string};let I=(0,v.default)(()=>Promise.all([s.e(2574),s.e(3862),s.e(6357),s.e(3521)]).then(s.bind(s,63521)),{loadableGenerated:{webpack:()=>[63521]},ssr:!1});function A({timestamp:e}){let t,[,s]=(0,r.useState)(0);return(0,r.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,a.jsx)(a.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}function P({requests:e=[]}){return(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,a.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),e.length?(0,a.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[300px] border-collapse text-xs",children:[(0,a.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,a.jsxs)("tr",{className:"border-b border-border",children:[(0,a.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,a.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,a.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,a.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=!e.status||"ok"===e.status||"success"===e.status;return(0,a.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,a.jsx)("td",{className:"py-1.5",children:(0,a.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${s?"bg-success":"bg-error"}`})}),(0,a.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:e.model,children:e.model}),(0,a.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,a.jsxs)("span",{className:"text-primary",children:[x(e.promptTokens),"↑"]})," ",(0,a.jsxs)("span",{className:"text-success",children:[x(e.completionTokens),"↓"]})]}),(0,a.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,a.jsx)(A,{timestamp:e.timestamp})})]},t)})})]})}):(0,a.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}function E(e,t={},s,a){return Object.entries(e||{}).map(([e,s])=>{let a=(s.promptTokens||0)+(s.completionTokens||0),r=s.cost||0,n=a>0?(s.promptTokens||0)*(r/a):0,i=a>0?(s.completionTokens||0)*(r/a):0;return{...s,key:e,totalTokens:a,totalCost:r,inputCost:n,outputCost:i,pending:t[e]||0}}).sort((e,t)=>{let r=e[s],n=t[s];return("string"==typeof r&&(r=r.toLowerCase()),"string"==typeof n&&(n=n.toLowerCase()),r<n)?"asc"===a?-1:1:r>n?"asc"===a?1:-1:0})}function R(e,t){if(!Array.isArray(e))return[];let s={};return e.forEach(e=>{let a=function(e,t){switch(t){case"rawModel":return e.rawModel||"Unknown Model";case"accountName":return e.accountName||`Account ${e.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return e.keyName||"Unknown Key";case"endpoint":return e.endpoint||"Unknown Endpoint";default:return e[t]||"Unknown"}}(e,t);s[a]||(s[a]={groupKey:a,summary:{requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,inputCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let r=s[a].summary;r.requests+=e.requests||0,r.promptTokens+=e.promptTokens||0,r.completionTokens+=e.completionTokens||0,r.totalTokens+=e.totalTokens||0,r.cost+=e.cost||0,r.inputCost+=e.inputCost||0,r.outputCost+=e.outputCost||0,r.pending+=e.pending||0,e.lastUsed&&(!r.lastUsed||new Date(e.lastUsed)>new Date(r.lastUsed))&&(r.lastUsed=e.lastUsed),s[a].items.push(e)}),Object.values(s)}let W=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],L=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],_=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],q=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],z=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],M=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function D({period:e,setPeriod:t,hidePeriodSelector:s=!1}={}){let o=(0,n.useRouter)(),d=(0,n.useSearchParams)(),c=d.get("sortBy")||"rawModel",m=d.get("sortOrder")||"asc",[p,f]=(0,r.useState)(null),[g,v]=(0,r.useState)(!0),[j,y]=(0,r.useState)(!1),[N,k]=(0,r.useState)("model"),[w,C]=(0,r.useState)("costs"),[S,O]=(0,r.useState)([]),[T,A]=(0,r.useState)("today"),U=(0,r.useRef)(!0),K=(0,r.useRef)(!1),B=e??T,V=t??A;(0,r.useEffect)(()=>{Promise.all([fetch("/api/providers").then(e=>e.ok?e.json():null),fetch("/api/provider-nodes").then(e=>e.ok?e.json():null)]).then(([e,t])=>{let s={};for(let e of t?.nodes||[])s[e.id]=e.name;let a=new Set;O([...(e?.connections||[]).filter(e=>!(!1===e.isActive||!$(e.provider)||a.has(e.provider))&&(a.add(e.provider),!0)).map(e=>({...e,nodeName:s[e.provider]||null})),...Object.values(i.IS).filter(e=>e.noAuth&&!a.has(e.id)&&$(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,r.useEffect)(()=>{U.current?(U.current=!1,v(!0)):y(!0),fetch(`/api/usage/stats?period=${B}`).then(e=>e.ok?e.json():null).then(e=>{e&&(K.current=!0,f(t=>({...t,...e})))}).catch(()=>{}).finally(()=>{v(!1),y(!1)})},[B]),(0,r.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);f(e=>e?{...e,activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending}:e),K.current&&v(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>v(!1),()=>e.close()},[]);let G=(0,r.useCallback)((e,t)=>{let s=new URLSearchParams(d.toString());s.get("sortBy")===t?s.set("sortOrder","asc"===s.get("sortOrder")?"desc":"asc"):(s.set("sortBy",t),s.set("sortOrder","asc")),o.replace(`?${s.toString()}`,{scroll:!1})},[d,o]),J=(0,r.useMemo)(()=>{if(!p)return null;switch(N){case"model":{let e=p.pending?.byModel||{};return{columns:W,groupedData:R(E(p.byModel,e,c,m),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsx)(l.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"account":{let e={};return p?.pending?.byAccount&&Object.entries(p.byAccount||{}).forEach(([t,s])=>{let a=p.pending.byAccount[s.connectionId];if(a){let r=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=a[r]||0}}),{columns:L,groupedData:R(E(p.byAccount,e,c,m),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.accountName||`Account ${e.connectionId?.slice(0,8)}...`}),(0,a.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsx)(l.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"apiKey":return{columns:_,groupedData:R(E(p.byApiKey,{},c,m),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,a.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsx)(l.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})};default:return{columns:q,groupedData:R(E(p.byEndpoint,{},c,m),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,a.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsx)(l.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}},[p,N,c,m]);if(!p&&!g)return(0,a.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let Q=(0,a.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[!s&&(0,a.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto sm:self-end",children:[(0,a.jsx)("div",{className:"grid flex-1 grid-cols-5 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none",children:M.map(e=>(0,a.jsx)("button",{onClick:()=>V(e.value),disabled:j,className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${B===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-bg-hover hover:text-text"}`,children:e.label},e.value))}),j&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),g?Q:(0,a.jsx)(u,{stats:p}),g?Q:(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 items-stretch gap-2 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]",children:[(0,a.jsx)(I,{providers:S,activeRequests:p.activeRequests||[],lastProvider:p.recentRequests?.[0]?.provider||"",errorProvider:p.errorProvider||""}),(0,a.jsx)(P,{requests:p.recentRequests||[]})]}),g?Q:(0,a.jsx)(F,{period:B}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("select",{value:N,onChange:e=>k(e.target.value),className:"w-full rounded-lg border border-border bg-surface px-3 py-1.5 text-sm font-medium text-text-main focus:outline-none focus:ring-2 focus:ring-primary/50 sm:w-auto",style:{colorScheme:"auto"},children:z.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("div",{className:"grid grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex",children:[(0,a.jsx)("button",{onClick:()=>C("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===w?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,a.jsx)("button",{onClick:()=>C("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===w?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),g?Q:J&&(0,a.jsx)(b,{title:"",columns:J.columns,groupedData:J.groupedData,tableType:N,sortBy:c,sortOrder:m,onToggleSort:G,viewMode:w,storageKey:J.storageKey,renderSummaryCells:J.renderSummaryCells,renderDetailCells:J.renderDetailCells,emptyMessage:J.emptyMessage})]})]})}},11059:(e,t,s)=>{s.d(t,{C:()=>r});var a=s(12115);function r(e=2e3){let[t,s]=(0,a.useState)(null),n=(0,a.useRef)(null);return{copied:t,copy:(0,a.useCallback)((t,a="default")=>{(async()=>{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(t);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}})(),s(a),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{s(null)},e)},[e])}}},11910:(e,t,s)=>{s.d(t,{default:()=>n});var a=s(95155),r=s(31474);function n({label:e,type:t="text",placeholder:s,value:i,onChange:l,error:o,hint:d,icon:c,disabled:m=!1,required:u=!1,className:x,inputClassName:p,...h}){return(0,a.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-1.5",x),children:[e&&(0,a.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,u&&(0,a.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,a.jsxs)("div",{className:"relative",children:[c&&(0,a.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:c})}),(0,a.jsx)("input",{type:t,placeholder:s,value:i,onChange:l,disabled:m,className:(0,r.cn)("w-full py-2.5 px-3 text-sm text-text-main bg-surface-2 rounded-[10px]","border border-transparent placeholder-text-muted/70","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 ease-out disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",c&&"pl-10",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",p),...h})]}),o&&(0,a.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},21931:(e,t,s)=>{s.d(t,{default:()=>d});var a=s(95155),r=s(12115),n=s(47650),i=s(93308),l=s(73006);let o=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e="",isOpen:t,onClose:s,hideTrigger:c=!1}){let[m,u]=(0,r.useState)("en"),[x,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)(!1),g=(0,r.useRef)(null),b="boolean"==typeof t,v=b?t:h,j=e=>{b?!e&&s&&s(m):f(e)};(0,r.useEffect)(()=>{u(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${i.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,i.QC)(t)}())},[]),(0,r.useEffect)(()=>{function e(e){g.current&&!g.current.contains(e.target)&&j(!1)}if(v)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[v]);let y=async e=>{if(e!==m&&!x){p(!0),j(!1);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,l.wn)(),u(e)}catch(e){console.error("Failed to set locale:",e)}finally{p(!1)}}};return(0,a.jsxs)("div",{className:e,children:[!c&&(0,a.jsxs)("button",{onClick:()=>j(!v),disabled:x,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"}),(0,a.jsx)("span",{className:"text-sm font-medium",children:o(m).name}),(0,a.jsx)("span",{className:"text-lg",children:o(m).flag})]}),v&&(0,n.createPortal)((0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>j(!1)}),(0,a.jsxs)("div",{ref:g,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>j(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,a.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:i.YZ.map(e=>{let t=m===e,s=o(e);return(0,a.jsxs)("button",{onClick:()=>y(e),disabled:x,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${t?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${x?"opacity-70 cursor-wait":""}`,title:s.name,children:[(0,a.jsx)("span",{className:"text-2xl",children:s.flag}),(0,a.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:s.name}),t&&(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}},23615:(e,t,s)=>{s.d(t,{default:()=>i});var a=s(95155),r=s(12115),n=s(84588);function i(){let[e,t]=(0,r.useState)([]),[s,i]=(0,r.useState)(!0),[l,o]=(0,r.useState)(!0);(0,r.useEffect)(()=>{d()},[]),(0,r.useEffect)(()=>{let e;return l&&(e=setInterval(()=>{d(!1)},3e3)),()=>clearInterval(e)},[l]);let d=async(e=!0)=>{e&&i(!0);try{let e=await fetch("/api/usage/request-logs");if(e.ok){let s=await e.json();t(s)}}catch(e){console.error("Failed to fetch logs:",e)}finally{e&&i(!1)}};return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Request Logs"}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("label",{className:"text-sm font-medium text-text-muted flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)("span",{children:"Auto Refresh (3s)"}),(0,a.jsx)("div",{onClick:()=>o(!l),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${l?"bg-primary":"bg-bg-subtle border border-border"}`,children:(0,a.jsx)("span",{className:`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${l?"translate-x-5":"translate-x-1"}`})})]})})]}),(0,a.jsx)(n.default,{className:"overflow-hidden bg-black/5 dark:bg-black/20",children:(0,a.jsx)("div",{className:"p-0 overflow-x-auto max-h-[600px] overflow-y-auto font-mono text-xs",children:s&&0===e.length?(0,a.jsx)("div",{className:"p-8 text-center text-text-muted",children:"Loading logs..."}):0===e.length?(0,a.jsx)("div",{className:"p-8 text-center text-text-muted",children:"No logs recorded yet."}):(0,a.jsxs)("table",{className:"w-full text-left border-collapse whitespace-nowrap",children:[(0,a.jsx)("thead",{className:"sticky top-0 bg-bg-subtle border-b border-border z-10",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"DateTime"}),(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Model"}),(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Provider"}),(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Account"}),(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"In"}),(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Out"}),(0,a.jsx)("th",{className:"px-3 py-2",children:"Status"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=e.split(" | ");if(s.length<7)return null;let r=s[6],n=r.includes("PENDING"),i=r.includes("FAILED"),l=r.includes("OK");return(0,a.jsxs)("tr",{className:`hover:bg-primary/5 transition-colors ${n?"bg-primary/5":""}`,children:[(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-text-muted",children:s[0]}),(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border font-medium",children:s[1]}),(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border",children:(0,a.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-bg-subtle border border-border text-[10px] uppercase font-bold",children:s[2]})}),(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border truncate max-w-[150px]",title:s[3],children:s[3]}),(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-primary",children:s[4]}),(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-success",children:s[5]}),(0,a.jsx)("td",{className:`px-3 py-1.5 font-bold ${l?"text-success":i?"text-error":"text-primary animate-pulse"}`,children:r})]},t)})})]})})}),(0,a.jsx)("div",{className:"text-[10px] text-text-muted italic",children:"Logs are loaded from the request history database."})]})}},23936:(e,t,s)=>{s.d(t,{default:()=>o});var a=s(95155),r=s(12115),n=s(14051),i=s.n(n),l=s(35497);function o({isOpen:e,onSuccess:t,onClose:s}){let[n,i]=(0,r.useState)(""),[d,c]=(0,r.useState)(!1),[m,u]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),h=async()=>{if(!n.trim())return void u("Please paste your cookie");c(!0),u(null);try{let e=await fetch("/api/oauth/iflow/cookie",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cookie:n.trim()})}),s=await e.json();if(!e.ok)throw Error(s.error||"Authentication failed");p(!0),setTimeout(()=>{t?.(),f()},1500)}catch(e){u(e.message)}finally{c(!1)}},f=()=>{i(""),u(null),p(!1),s?.()};return(0,a.jsx)(l.aF,{isOpen:e,onClose:f,title:"iFlow Cookie Authentication",children:(0,a.jsx)("div",{className:"space-y-4",children:x?(0,a.jsxs)("div",{className:"text-center py-8",children:[(0,a.jsx)("div",{className:"text-6xl mb-4",children:"✅"}),(0,a.jsx)("p",{className:"text-lg font-medium text-text-primary",children:"Authentication Successful!"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Fresh API key obtained"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["To get a fresh API key, paste your browser cookie from"," ",(0,a.jsx)("a",{href:"https://platform.iflow.cn",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"platform.iflow.cn"})]}),(0,a.jsxs)("div",{className:"bg-surface-secondary p-3 rounded-lg text-xs space-y-2",children:[(0,a.jsx)("p",{className:"font-medium text-text-primary",children:"How to get cookie:"}),(0,a.jsxs)("ol",{className:"list-decimal list-inside space-y-1 text-text-muted",children:[(0,a.jsx)("li",{children:"Open platform.iflow.cn in your browser"}),(0,a.jsx)("li",{children:"Login to your account"}),(0,a.jsx)("li",{children:"Open DevTools (F12) → Application/Storage → Cookies"}),(0,a.jsx)("li",{children:"Copy the entire cookie string (must include BXAuth)"}),(0,a.jsx)("li",{children:"Paste it below"})]})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-text-primary",children:"Cookie String"}),(0,a.jsx)("textarea",{value:n,onChange:e=>i(e.target.value),placeholder:"BXAuth=xxx; ...",className:"w-full px-3 py-2 bg-surface-secondary border border-border rounded-lg text-sm text-text-primary placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-primary resize-none",rows:4,disabled:d})]}),m&&(0,a.jsx)("div",{className:"p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,a.jsx)("p",{className:"text-sm text-error",children:m})}),(0,a.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,a.jsx)(l.$n,{variant:"secondary",onClick:f,disabled:d,fullWidth:!0,children:"Cancel"}),(0,a.jsx)(l.$n,{onClick:h,loading:d,fullWidth:!0,children:"Authenticate"})]})]})})})}o.propTypes={isOpen:i().bool.isRequired,onSuccess:i().func,onClose:i().func}},25086:(e,t,s)=>{s.d(t,{CardSkeleton:()=>o,PageLoading:()=>i,Skeleton:()=>l,Spinner:()=>n,default:()=>d});var a=s(95155),r=s(31474);function n({size:e="md",className:t}){return(0,a.jsx)("span",{className:(0,r.cn)("material-symbols-outlined animate-spin text-brand-500",{sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"}[e],t),children:"progress_activity"})}function i({message:e="Loading..."}){return(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg",children:[(0,a.jsx)(n,{size:"xl"}),(0,a.jsx)("p",{className:"mt-4 text-text-muted",children:e})]})}function l({className:e,...t}){return(0,a.jsx)("div",{className:(0,r.cn)("animate-pulse rounded-[10px] bg-surface-2",e),...t})}function o(){return(0,a.jsxs)("div",{className:"p-6 rounded-[14px] border border-border-subtle bg-surface shadow-[var(--shadow-soft)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)(l,{className:"h-4 w-24"}),(0,a.jsx)(l,{className:"size-10 rounded-[10px]"})]}),(0,a.jsx)(l,{className:"h-8 w-16 mb-2"}),(0,a.jsx)(l,{className:"h-3 w-20"})]})}function d({type:e="spinner",...t}){switch(e){case"page":return(0,a.jsx)(i,{...t});case"skeleton":return(0,a.jsx)(l,{...t});case"card":return(0,a.jsx)(o,{...t});default:return(0,a.jsx)(n,{...t})}}},28058:(e,t,s)=>{s.d(t,{default:()=>i});var a=s(95155),r=s(12115),n=s(81127);function i({isOpen:e,onClose:t,onAdd:s,addedNames:l=[]}){let[o,d]=(0,r.useState)([]),[c,m]=(0,r.useState)(!1),[u,x]=(0,r.useState)(""),[p,h]=(0,r.useState)("all"),[f,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),[j,y]=(0,r.useState)({}),[N,k]=(0,r.useState)({}),[w,C]=(0,r.useState)({});(0,r.useEffect)(()=>{!e||o.length>0||(m(!0),fetch("/api/cli-tools/cowork-mcp-registry").then(e=>e.json()).then(e=>{e.error?g(e.error):d(e.servers||[])}).catch(e=>g(e.message)).finally(()=>m(!1)))},[e]);let S=(0,r.useMemo)(()=>new Set(l),[l]),O=(0,r.useMemo)(()=>{let e=u.trim().toLowerCase();return o.filter(t=>("authless"!==p||!t.oauth)&&("oauth"!==p||!!t.oauth)&&(!e||(t.title||"").toLowerCase().includes(e)||(t.description||"").toLowerCase().includes(e)||(t.name||"").toLowerCase().includes(e)))},[o,u,p]),T=async e=>{if(!j[e.url]){k(t=>({...t,[e.url]:!0}));try{let t=await fetch("/api/cli-tools/cowork-mcp-tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e.url})}),s=await t.json(),a=s.tools||[],r=Array.isArray(e.toolNames)?e.toolNames:[],n=a.length>0?a.map(e=>e.name):r;y(t=>({...t,[e.url]:{tools:a,requiresAuth:!!s.requiresAuth,error:s.error}})),C(t=>({...t,[e.url]:Object.fromEntries(n.map(e=>[e,!0]))}))}catch(t){y(s=>({...s,[e.url]:{tools:[],error:t.message}}))}finally{k(t=>({...t,[e.url]:!1}))}}},F=(e,t)=>{let s=w[e]||{};C(a=>({...a,[e]:Object.fromEntries(Object.keys(s).map(e=>[e,t]))}))};return(0,a.jsx)(n.default,{isOpen:e,onClose:t,title:"Browse MCP Marketplace",size:"lg",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:u,onChange:e=>x(e.target.value),placeholder:"Search by name or description...",className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsxs)("select",{value:p,onChange:e=>h(e.target.value),className:"px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,a.jsx)("option",{value:"all",children:"All"}),(0,a.jsx)("option",{value:"authless",children:"Authless"}),(0,a.jsx)("option",{value:"oauth",children:"OAuth"})]})]}),f&&(0,a.jsx)("div",{className:"px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:f}),c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-xs py-4 justify-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),(0,a.jsx)("span",{children:"Loading registry..."})]}),!c&&(0,a.jsxs)("div",{className:"flex flex-col gap-1 max-h-[60vh] overflow-y-auto",children:[0===O.length&&(0,a.jsx)("div",{className:"text-center text-xs text-text-muted py-6",children:"No servers match filter"}),O.map(e=>{let t=S.has(e.slug||e.name),r=b===e.url,n=j[e.url],i=N[e.url],l=w[e.url]||{},o=Object.keys(l),d=Object.values(l).filter(Boolean).length;return(0,a.jsxs)("div",{className:"rounded border border-transparent hover:border-border",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5",children:[e.iconUrl?(0,a.jsx)("img",{src:e.iconUrl,alt:"",className:"size-7 rounded shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}):(0,a.jsx)("div",{className:"size-7 rounded bg-surface shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,a.jsx)("span",{className:"font-medium text-xs",children:e.title}),e.oauth?(0,a.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-amber-500/10 text-amber-600",children:"OAuth"}):(0,a.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-green-500/10 text-green-600",children:"Authless"}),e.toolCount>0&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:[e.toolCount," tools"]})]}),e.description&&(0,a.jsx)("p",{className:"text-[10px] text-text-muted line-clamp-2 mt-0.5",children:e.description})]}),(0,a.jsx)("button",{onClick:()=>t?null:void(b===e.url?v(null):(v(e.url),T(e))),disabled:t,className:`shrink-0 px-2 py-1 rounded text-[10px] font-medium transition-colors ${t?"bg-green-500/10 text-green-600 cursor-default":r?"bg-surface border border-border text-text-muted hover:bg-black/5":"bg-primary/10 border border-primary/40 text-primary hover:bg-primary/20"}`,children:t?"Added":r?"Cancel":"+ Add"})]}),r&&(0,a.jsxs)("div",{className:"px-3 py-2 bg-surface/40 border-t border-border flex flex-col gap-2",children:[i&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-[10px] py-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),(0,a.jsx)("span",{children:"Probing server for tools..."})]}),!i&&n?.requiresAuth&&(0,a.jsx)("p",{className:"text-[10px] text-amber-600 bg-amber-500/10 px-2 py-1 rounded",children:"\uD83D\uDD10 OAuth required. Add now and authenticate after Apply; tool list will be discovered after first connect."}),!i&&n?.error&&!n?.requiresAuth&&(0,a.jsxs)("p",{className:"text-[10px] text-red-600 bg-red-500/10 px-2 py-1 rounded",children:["Probe failed: ",n.error]}),!i&&0===o.length&&!n?.requiresAuth&&!n?.error&&(0,a.jsx)("p",{className:"text-[10px] text-text-muted",children:"No tools advertised by server."}),!i&&o.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:[d,"/",o.length," tools enabled"]}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsx)("button",{onClick:()=>F(e.url,!0),className:"text-[10px] text-primary hover:underline",children:"All"}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"\xb7"}),(0,a.jsx)("button",{onClick:()=>F(e.url,!1),className:"text-[10px] text-primary hover:underline",children:"None"})]})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-1 max-h-40 overflow-y-auto",children:o.map(t=>(0,a.jsxs)("label",{className:"flex items-center gap-1.5 text-[10px] cursor-pointer hover:bg-black/5 dark:hover:bg-white/5 px-1 rounded",children:[(0,a.jsx)("input",{type:"checkbox",checked:!!l[t],onChange:()=>{var s;return s=e.url,void C(e=>({...e,[s]:{...e[s],[t]:!e[s]?.[t]}}))},className:"size-3"}),(0,a.jsx)("span",{className:"truncate",children:t})]},t))})]}),(0,a.jsx)("button",{onClick:()=>{let t,a;return a=Object.keys(t=w[e.url]||{}).filter(e=>t[e]),void(s?.({name:e.slug||e.name,title:e.title,description:e.description,url:e.url,transport:e.transport,oauth:e.oauth,toolNames:a}),v(null))},className:"self-end px-2 py-1 rounded text-[10px] font-medium bg-primary text-white hover:bg-primary/90",children:"✓ Confirm Add"})]})]},e.url)})]}),(0,a.jsxs)("div",{className:"text-[10px] text-text-muted text-right",children:[O.length," of ",o.length," servers"]})]})})}},28067:(e,t,s)=>{s.d(t,{default:()=>n});var a=s(95155),r=s(31474);function n({options:e=[],value:t,onChange:s,size:i="md",className:l}){let o={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,a.jsx)("div",{className:(0,r.cn)("inline-flex items-center p-1 rounded-[10px] overflow-x-auto","bg-surface-2",l),children:e.map(e=>(0,a.jsxs)("button",{onClick:()=>s(e.value),className:(0,r.cn)("shrink-0 px-4 rounded-[8px] font-medium transition-all",o[i],t===e.value?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},28815:(e,t,s)=>{s.d(t,{default:()=>o});var a=s(95155),r=s(12115),n=s(81127),i=s(92542),l=s(11059);function o({isOpen:e,onClose:t,title:s="Manual Configuration",configs:d=[]}){let{copy:c}=(0,l.C)(),[m,u]=(0,r.useState)(null);return(0,a.jsx)(n.default,{isOpen:e,onClose:t,title:s,size:"xl",children:(0,a.jsx)("div",{className:"flex flex-col gap-4",children:d.map((e,t)=>(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,a.jsxs)(i.default,{variant:"ghost",size:"sm",onClick:()=>{var s;return s=e.content,void(c(s,`manualconfig-${t}`),u(t),setTimeout(()=>u(null),2e3))},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:m===t?"check":"content_copy"}),m===t?"Copied!":"Copy"]})]}),(0,a.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},29366:(e,t,s)=>{s.d(t,{default:()=>i});var a=s(95155),r=s(28777),n=s(97677);function i({caps:e,className:t="",colorOverride:s,size:l=16}){if(!e)return null;let o=Object.keys(r.bs).filter(t=>e[t]);return 0===o.length?null:(0,a.jsx)("span",{className:`inline-flex items-center gap-0.5 ${t}`,children:o.map(e=>(0,a.jsx)(n.default,{text:`${r.bs[e].label} — ${r.bs[e].desc}`,children:(0,a.jsx)("span",{className:`material-symbols-outlined leading-none cursor-help ${s||r.bs[e].color}`,style:{fontSize:`${l}px`},children:r.bs[e].icon})},e))})}},30815:(e,t,s)=>{s.d(t,{default:()=>o});var a=s(95155),r=s(12115),n=s(14051),i=s.n(n),l=s(35497);function o({isOpen:e,onSuccess:t,onClose:s}){let[n,i]=(0,r.useState)(""),[d,c]=(0,r.useState)(""),[m,u]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)(!1),[g,b]=(0,r.useState)(!1),[v,j]=(0,r.useState)(!1),y=async()=>{f(!0),u(null),b(!1),j(!1);try{let e=await fetch("/api/oauth/cursor/auto-import"),t=await e.json();t.found?(i(t.accessToken),c(t.machineId),b(!0)):t.windowsManual?j(!0):u(t.error||"Could not auto-detect tokens")}catch(e){u("Failed to auto-detect tokens")}finally{f(!1)}};(0,r.useEffect)(()=>{e&&y()},[e]);let N=async()=>{if(!n.trim())return void u("Please enter an access token");if(!d.trim())return void u("Please enter a machine ID");p(!0),u(null);try{let e=await fetch("/api/oauth/cursor/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:n.trim(),machineId:d.trim()})}),a=await e.json();if(!e.ok)throw Error(a.error||"Import failed");t?.(),s()}catch(e){u(e.message)}finally{p(!1)}};return(0,a.jsx)(l.aF,{isOpen:e,title:"Connect Cursor IDE",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[h&&(0,a.jsxs)("div",{className:"text-center py-6",children:[(0,a.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting tokens..."}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Cursor IDE database"})]}),!h&&(0,a.jsxs)(a.Fragment,{children:[g&&(0,a.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,a.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Tokens auto-detected from Cursor IDE successfully!"})]})}),v&&(0,a.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800 flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,a.jsx)("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:"Could not read Cursor database automatically."})]}),(0,a.jsxs)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:["Make sure Cursor IDE has been opened at least once, then click ",(0,a.jsx)("strong",{children:"Retry"}),". If the problem persists, paste your tokens manually below."]}),(0,a.jsx)(l.$n,{onClick:y,variant:"outline",fullWidth:!0,children:"Retry"})]}),!g&&!v&&!m&&(0,a.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,a.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Cursor IDE not detected. Please paste your tokens manually."})]})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Access Token ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("textarea",{value:n,onChange:e=>i(e.target.value),placeholder:"Access token will be auto-filled...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Machine ID ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)(l.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"Machine ID will be auto-filled...",className:"font-mono text-sm"})]}),m&&(0,a.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,a.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:m})}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(l.$n,{onClick:N,fullWidth:!0,disabled:x||!n.trim()||!d.trim(),children:x?"Importing...":"Import Token"}),(0,a.jsx)(l.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}o.propTypes={isOpen:i().bool.isRequired,onSuccess:i().func,onClose:i().func.isRequired}},31474:(e,t,s)=>{s.d(t,{cn:()=>a});function a(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},35497:(e,t,s)=>{s.d(t,{x0:()=>k.default,Ex:()=>d.default,$n:()=>a.default,Zp:()=>i.default,Qv:()=>o.CardSkeleton,CK:()=>p.default,uo:()=>l.ConfirmModal,G9:()=>v.default,wI:()=>N.default,vj:()=>y.default,vE:()=>j.default,pd:()=>r.default,Mh:()=>b.default,uR:()=>x.default,Nf:()=>h.default,aF:()=>l.default,rq:()=>u.default,gw:()=>w.default,LF:()=>m.default,Wx:()=>O.default,gM:()=>g.default,Iz:()=>C.default,l6:()=>n.default,lM:()=>c.default,m_:()=>S.default,jK:()=>f.default});var a=s(92542),r=s(11910),n=s(98),i=s(84588),l=s(81127),o=s(25086);s(56319);var d=s(56061),c=s(98542);s(38587),s(21110),s(38572),s(8823),s(92173);var m=s(90882),u=s(46067),x=s(28815),p=s(45455),h=s(28058),f=s(10319);s(29366),s(21931),s(80752),s(97556);var g=s(23615);s(61500);var b=s(62899);s(94230);var v=s(30815),j=s(23936),y=s(95088),N=s(73579),k=s(96748),w=s(4823),C=s(28067),S=s(97677),O=s(51825);s(7648),s(91450)},38003:(e,t,s)=>{s.d(t,{C:()=>a});let a=(0,s(1934).v)(e=>({query:"",placeholder:"",visible:!1,setQuery:t=>e({query:t}),register:(t="Search...")=>e({visible:!0,placeholder:t,query:""}),unregister:()=>e({visible:!1,placeholder:"",query:""})}))},38202:(e,t,s)=>{s.d(t,{h:()=>a});let a={en:"\uD83C\uDDFA\uD83C\uDDF8",vi:"\uD83C\uDDFB\uD83C\uDDF3","zh-CN":"\uD83C\uDDE8\uD83C\uDDF3","zh-TW":"\uD83C\uDDF9\uD83C\uDDFC",ja:"\uD83C\uDDEF\uD83C\uDDF5","pt-BR":"\uD83C\uDDE7\uD83C\uDDF7","pt-PT":"\uD83C\uDDF5\uD83C\uDDF9",ko:"\uD83C\uDDF0\uD83C\uDDF7",es:"\uD83C\uDDEA\uD83C\uDDF8",de:"\uD83C\uDDE9\uD83C\uDDEA",fr:"\uD83C\uDDEB\uD83C\uDDF7",he:"\uD83C\uDDEE\uD83C\uDDF1",ar:"\uD83C\uDDF8\uD83C\uDDE6",ru:"\uD83C\uDDF7\uD83C\uDDFA",pl:"\uD83C\uDDF5\uD83C\uDDF1",cs:"\uD83C\uDDE8\uD83C\uDDFF",nl:"\uD83C\uDDF3\uD83C\uDDF1",tr:"\uD83C\uDDF9\uD83C\uDDF7",uk:"\uD83C\uDDFA\uD83C\uDDE6",tl:"\uD83C\uDDF5\uD83C\uDDED",id:"\uD83C\uDDEE\uD83C\uDDE9",th:"\uD83C\uDDF9\uD83C\uDDED",hi:"\uD83C\uDDEE\uD83C\uDDF3",bn:"\uD83C\uDDE7\uD83C\uDDE9",ur:"\uD83C\uDDF5\uD83C\uDDF0",ro:"\uD83C\uDDF7\uD83C\uDDF4",sv:"\uD83C\uDDF8\uD83C\uDDEA",it:"\uD83C\uDDEE\uD83C\uDDF9",el:"\uD83C\uDDEC\uD83C\uDDF7",hu:"\uD83C\uDDED\uD83C\uDDFA",fi:"\uD83C\uDDEB\uD83C\uDDEE",da:"\uD83C\uDDE9\uD83C\uDDF0",no:"\uD83C\uDDF3\uD83C\uDDF4"}},38572:(e,t,s)=>{s.d(t,{default:()=>T});var a=s(95155),r=s(12115),n=s(14051),i=s.n(n),l=s(98500),o=s.n(l),d=s(73321),c=s(31474),m=s(90620),u=s(52679),x=s(11059),p=s(92542),h=s(81127);let f="krouter@kodelyth.com",g=[{id:"whatsapp",label:"WhatsApp",detail:"+880 1312 365939",href:"https://wa.me/8801312365939",icon:"whatsapp",tint:"#25D366"},{id:"email",label:"Email",detail:f,href:`mailto:${f}`,icon:"mail"}];function b({className:e}){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:e,children:(0,a.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.174.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51l-.57-.01c-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.71.306 1.263.489 1.694.625.712.227 1.36.195 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})})}function v({className:e}){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:e,children:[(0,a.jsx)("path",{d:"M0.7 6.1V6A2.8 2.8 0 0 1 3.5 3.2h17a2.8 2.8 0 0 1 2.8 2.8v.14l-11.3 6.68L0.7 6.1Z"}),(0,a.jsx)("path",{d:"M23.3 8.9v9.13a2.8 2.8 0 0 1-2.8 2.8H3.5a2.8 2.8 0 0 1-2.8-2.8V8.9l10.6 6.25c.45.26.99.26 1.44 0L23.3 8.9Z"})]})}function j({className:e}){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e,children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,a.jsx)("circle",{cx:"12",cy:"12",r:"3.6"}),(0,a.jsx)("path",{d:"m5.6 5.6 3.85 3.85M14.55 14.55l3.85 3.85M18.4 5.6l-3.85 3.85M9.45 14.55 5.6 18.4"})]})}b.propTypes={className:i().string},v.propTypes={className:i().string},j.propTypes={className:i().string};let y={whatsapp:b,mail:v};function N({className:e}){let[t,s]=(0,r.useState)(!1),n=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!t)return;let e=e=>{n.current&&!n.current.contains(e.target)&&s(!1)},a=e=>{"Escape"===e.key&&(s(!1),i.current?.focus())};return document.addEventListener("mousedown",e),document.addEventListener("keydown",a),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",a)}},[t]),(0,a.jsxs)("div",{ref:n,className:(0,c.cn)("relative",e),children:[(0,a.jsx)("div",{id:"support-channels",role:"group","aria-label":"Support channels",className:(0,c.cn)("grid transition-all duration-200 ease-out",t?"grid-rows-[1fr] opacity-100 mb-1":"grid-rows-[0fr] opacity-0"),children:(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)("div",{className:"space-y-0.5 pb-1",children:g.map(e=>{let r=y[e.icon];return(0,a.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",onClick:()=>s(!1),tabIndex:t?0:-1,"aria-hidden":!t,className:(0,c.cn)("flex items-center gap-3 px-3 py-2 rounded-lg group","text-text-muted hover:bg-surface-2 hover:text-text-main","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60","transition-colors"),children:[(0,a.jsx)("span",{className:(0,c.cn)("flex items-center justify-center size-7 rounded-md shrink-0 transition-colors","bg-surface-2 group-hover:bg-primary/10 group-hover:text-primary"),style:e.tint?{color:e.tint}:void 0,children:r?(0,a.jsx)(r,{className:"size-4"}):null}),(0,a.jsxs)("span",{className:"min-w-0",children:[(0,a.jsx)("span",{className:"block text-[13px] font-medium leading-tight",children:e.label}),(0,a.jsx)("span",{className:"block text-[11px] text-text-muted truncate",children:e.detail})]})]},e.id)})})})}),(0,a.jsxs)("button",{ref:i,type:"button",onClick:()=>s(e=>!e),"aria-expanded":t,"aria-controls":"support-channels",className:(0,c.cn)("w-full flex items-center gap-3 px-3 py-2 rounded-lg group transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60",t?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)(j,{className:(0,c.cn)("size-[18px] shrink-0 transition-colors",t?"":"group-hover:text-primary")}),(0,a.jsx)("span",{className:"text-[13px] font-medium",children:"Support"}),(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:(0,c.cn)("size-3.5 ml-auto shrink-0 transition-transform duration-200",t?"rotate-180":""),children:(0,a.jsx)("path",{d:"m6 15 6-6 6 6"})})]})]})}N.propTypes={className:i().string};let k=["embedding","image","video","tts","stt"],w="/dashboard/media-providers/web",C=[{href:"/dashboard/endpoint",label:"Endpoint",icon:"api"},{href:"/dashboard/providers",label:"Providers",icon:"dns"},{href:"/dashboard/combos",label:"Combos",icon:"layers"},{href:"/dashboard/usage",label:"Usage",icon:"bar_chart"},{href:"/dashboard/quota",label:"Quota Tracker",icon:"data_usage"},{href:"/dashboard/mitm",label:"MITM",icon:"security"},{href:"/dashboard/token-saver",label:"Token Saver",icon:"savings"},{href:"/dashboard/pxpipe",label:"PXPIPE",icon:"image"},{href:"/dashboard/cli-tools",label:"CLI Tools",icon:"terminal"}],S=[{href:"/dashboard/console-log",label:"Console Log",icon:"terminal"},{href:"/dashboard/translator",label:"Translator",icon:"translate"}],O=[{href:"/dashboard/presidio",label:"Presidio",icon:"admin_panel_settings"},{href:"/dashboard/proxy-pools",label:"Proxy Pools",icon:"lan"},{href:"/dashboard/skills",label:"Skills",icon:"extension"},{href:"/dashboard/environment",label:"Environment",icon:"tune"}];function T({onClose:e}){let t=(0,d.usePathname)(),[s,n]=(0,r.useState)(!1),[i,l]=(0,r.useState)(!1),[f,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(!1),[j,y]=(0,r.useState)(!1),[$,I]=(0,r.useState)(0),[A,P]=(0,r.useState)(!1),{copied:E,copy:R}=(0,x.C)(2e3),W=m.h0.installCmdLatest;(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{e.enableTranslator&&P(!0)}).catch(()=>{})},[]),(0,r.useEffect)(()=>{fetch("/api/version").then(e=>e.json()).then(e=>{e.hasUpdate&&g(e)}).catch(()=>{})},[]);let L=e=>"/dashboard/endpoint"===e?"/dashboard"===t||t.startsWith("/dashboard/endpoint"):t.startsWith(e),_=async()=>{try{await navigator.clipboard.writeText(W)}catch{}R(W);let e=m.h0.shutdownCountdownSec;I(e);let t=setInterval(()=>{I(e-=1),e<=0&&(clearInterval(t),fetch("/api/version/shutdown",{method:"POST"}).catch(()=>{}),l(!0))},1e3)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("aside",{className:"flex w-72 flex-col border-r border-border-subtle bg-vibrancy backdrop-blur-xl transition-colors duration-300 min-h-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-6 pt-5 pb-2",children:[(0,a.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,a.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,a.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"})]}),(0,a.jsxs)("div",{className:"px-6 py-4 flex flex-col gap-2",children:[(0,a.jsxs)(o(),{href:"/dashboard",className:"flex items-center gap-3 group",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-9 rounded-[10px] bg-gradient-to-br from-brand-500 to-brand-700 shadow-[var(--shadow-warm)] transition-transform group-hover:scale-[1.03]",children:(0,a.jsx)("svg",{viewBox:"0 0 400 400",className:"size-[22px]","aria-hidden":"true",children:(0,a.jsxs)("g",{fill:"none",stroke:"#ffffff",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("polyline",{points:"128,104 184,200 128,296",strokeWidth:"28",strokeOpacity:"0.25"}),(0,a.jsx)("polyline",{points:"172,100 260,200 172,300",strokeWidth:"52"})]})})}),(0,a.jsxs)("div",{className:"flex flex-col leading-none",children:[(0,a.jsx)("h1",{className:"text-[17px] font-bold text-text-main",style:{fontFamily:"var(--font-display)",letterSpacing:"-0.01em"},children:m.vQ.name}),(0,a.jsxs)("span",{className:"text-[11px] text-text-muted mt-[3px] font-medium tabular-nums",children:["v",m.vQ.version]})]})]}),f&&(0,a.jsxs)("div",{className:"flex flex-col gap-1.5 rounded p-1 -m-1",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-green-600 dark:text-amber-500",children:["↑ New version available: v",f.latestVersion]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>v(!0),className:"px-2 py-1 rounded bg-green-600 hover:bg-green-700 dark:bg-amber-500 dark:hover:bg-amber-600 text-white text-[11px] font-semibold transition-colors cursor-pointer",children:"Update now"}),(0,a.jsx)("button",{onClick:()=>R(W),title:"Copy install command",className:"flex-1 text-left hover:opacity-80 transition-opacity cursor-pointer min-w-0",children:(0,a.jsx)("code",{className:"block text-[10px] text-green-600/80 dark:text-amber-400/70 font-mono truncate",children:E?"✓ copied!":W})})]})]})]}),(0,a.jsxs)("nav",{className:"flex-1 px-4 py-2 space-y-0.5 overflow-y-auto custom-scrollbar",children:[C.map(t=>(0,a.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",L(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,a.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),(0,a.jsxs)("div",{className:"pt-3 mt-2 space-y-0.5",children:[(0,a.jsx)("p",{className:"px-4 text-xs font-semibold text-text-muted uppercase tracking-wider mb-2",children:"System"}),(0,a.jsxs)("button",{onClick:()=>n(e=>!e),className:(0,c.cn)("w-full flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",t.startsWith("/dashboard/media-providers")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"perm_media"}),(0,a.jsx)("span",{className:"text-[13px] font-medium flex-1 text-left",children:"Media Providers"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] transition-transform",style:{transform:s?"rotate(180deg)":"rotate(0deg)"},children:"expand_more"})]}),s&&(0,a.jsxs)("div",{className:"pl-4",children:[u.rj.filter(e=>k.includes(e.id)).map(s=>(0,a.jsxs)(o(),{href:`/dashboard/media-providers/${s.id}`,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-4 py-1 rounded-lg transition-all group",t.startsWith(`/dashboard/media-providers/${s.id}`)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:s.icon}),(0,a.jsx)("span",{className:"text-sm",children:s.label})]},s.id)),(0,a.jsxs)(o(),{href:w,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-4 py-1 rounded-lg transition-all group",t.startsWith(w)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"travel_explore"}),(0,a.jsx)("span",{className:"text-sm",children:"Web Fetch & Search"})]},"web")]}),O.map(t=>(0,a.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",L(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,a.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),S.map(t=>"/dashboard/translator"!==t.href||A?(0,a.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",L(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,a.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href):null),(0,a.jsxs)(o(),{href:"/dashboard/profile",onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L("/dashboard/profile")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",L("/dashboard/profile")?"fill-1":"group-hover:text-primary transition-colors"),children:"settings"}),(0,a.jsx)("span",{className:"text-[13px] font-medium",children:"Settings"})]})]})]}),(0,a.jsx)("div",{className:"px-4 pb-3 pt-2 border-t border-border-subtle",children:(0,a.jsx)(N,{})})]}),(0,a.jsx)(h.ConfirmModal,{isOpen:b,onClose:()=>v(!1),onConfirm:()=>{v(!1),y(!0)},title:"Update kRouter",message:`Show install command for v${f?.latestVersion||""}? You can copy it and shutdown to install manually.`,confirmText:"Show Command",cancelText:"Cancel",variant:"primary"}),(i||j)&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm p-6",children:j?(0,a.jsx)(F,{latestVersion:f?.latestVersion,installCmd:W,copied:E,onCopyAndShutdown:_,onCancel:()=>{y(!1),I(0)},countdown:$,isDisconnected:i}):(0,a.jsxs)("div",{className:"text-center p-8",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-16 rounded-full bg-red-500/20 text-red-500 mx-auto mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"power_off"})}),(0,a.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Server Disconnected"}),(0,a.jsx)("p",{className:"text-text-muted mb-6",children:"The proxy server has been stopped."}),(0,a.jsx)(p.default,{variant:"secondary",onClick:()=>globalThis.location.reload(),children:"Reload Page"})]})})]})}function F({latestVersion:e,installCmd:t,copied:s,onCopyAndShutdown:r,onCancel:n,countdown:i,isDisconnected:l}){let o=i>0;return(0,a.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-neutral-900/95 border border-white/10 p-6 text-white",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-11 rounded-full bg-amber-500/20 text-amber-400",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"content_copy"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Update kRouter",e?` to v${e}`:""]}),(0,a.jsx)("p",{className:"text-xs text-white/60",children:l?"Server stopped. Paste the command into a terminal to install.":o?`Command copied. Server will stop in ${i}s...`:"Click the button below to copy the install command and shutdown."})]})]}),(0,a.jsx)("p",{className:"text-sm text-white/80 mb-2",children:"Install command:"}),(0,a.jsx)("div",{className:"w-full px-3 py-2 rounded bg-white/5 mb-4",children:(0,a.jsx)("code",{className:"text-xs font-mono text-amber-400 break-all",children:t})}),(0,a.jsxs)("ol",{className:"text-xs text-white/70 space-y-1 list-decimal list-inside mb-4",children:[(0,a.jsxs)("li",{children:["Click ",(0,a.jsx)("strong",{children:"Copy & Shutdown"})," below."]}),(0,a.jsx)("li",{children:"Paste the command into your terminal and press Enter."}),(0,a.jsxs)("li",{children:["Run ",(0,a.jsx)("code",{className:"px-1 rounded bg-white/10 text-green-400",children:"krouter"})," again after install."]})]}),l?(0,a.jsx)(p.default,{variant:"secondary",fullWidth:!0,onClick:()=>globalThis.location.reload(),children:"Reload Page"}):(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(p.default,{variant:"secondary",onClick:n,disabled:o,children:"Cancel"}),(0,a.jsx)(p.default,{variant:"primary",fullWidth:!0,onClick:r,disabled:o,children:s?"✓ Copied — shutting down...":o?`Shutting down in ${i}s`:"Copy & Shutdown"})]})]})}T.propTypes={onClose:i().func},F.propTypes={latestVersion:i().string,installCmd:i().string.isRequired,copied:i().bool,onCopyAndShutdown:i().func.isRequired,onCancel:i().func.isRequired,countdown:i().number,isDisconnected:i().bool}},38587:(e,t,s)=>{s.d(t,{default:()=>i});var a=s(95155),r=s(1620),n=s(31474);function i({className:e,variant:t="default"}){let{isDark:s,toggleTheme:l}=(0,r.D)(),o={default:(0,n.cn)("flex items-center justify-center size-10 rounded-full","text-text-muted hover:text-text-main","hover:bg-surface-2 transition-colors"),card:(0,n.cn)("flex items-center justify-center size-11 rounded-full","bg-surface/60 hover:bg-surface","border border-border","backdrop-blur-md shadow-sm hover:shadow-[var(--shadow-warm)]","text-text-muted hover:text-brand-500","transition-all group")};return(0,a.jsx)("button",{onClick:l,className:(0,n.cn)(o[t],e),"aria-label":`Switch to ${s?"light":"dark"} mode`,title:`Switch to ${s?"light":"dark"} mode`,children:(0,a.jsx)("span",{className:(0,n.cn)("material-symbols-outlined text-[22px]","card"===t&&"transition-transform duration-300 group-hover:rotate-12"),children:s?"light_mode":"dark_mode"})})}},45455:(e,t,s)=>{s.d(t,{default:()=>m});var a=s(95155),r=s(12115),n=s(81127),i=s(11910),l=s(92542),o=s(46067);let d=/^[a-zA-Z0-9_.\-]+$/;function c({index:e,model:t,isFirst:s,isLast:n,onEdit:i,onMoveUp:l,onMoveDown:o,onRemove:d}){let[m,u]=(0,r.useState)(!1),[x,p]=(0,r.useState)(t),h=()=>{let e=x.trim();e&&e!==t?i(e):p(t),u(!1)};return(0,a.jsxs)("div",{className:"group flex min-w-0 items-center gap-1.5 rounded-md bg-black/[0.02] px-2 py-1 transition-colors hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04]",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:e+1}),m?(0,a.jsx)("input",{autoFocus:!0,value:x,onChange:e=>p(e.target.value),onBlur:h,onKeyDown:e=>{"Enter"===e.key&&h(),"Escape"===e.key&&(p(t),u(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,a.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>u(!0),title:"Click to edit",children:t}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:l,disabled:s,className:`p-0.5 rounded ${s?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:o,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,a.jsx)("button",{onClick:d,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function m({isOpen:e,combo:t,onClose:s,onSave:u,activeProviders:x,kindFilter:p=null,forcePrefix:h="",title:f}){let g=t?.name?h&&t.name.startsWith(h)?t.name.slice(h.length):t.name:"",[b,v]=(0,r.useState)(g),[j,y]=(0,r.useState)(t?.models||[]),[N,k]=(0,r.useState)(!1),[w,C]=(0,r.useState)(!1),[S,O]=(0,r.useState)(""),[T,F]=(0,r.useState)({});(0,r.useEffect)(()=>{e&&fetch("/api/models/alias").then(e=>e.ok?e.json():null).then(e=>e&&F(e.aliases||{})).catch(()=>{})},[e]);let $=e=>{if(!e.trim())return O("Name is required"),!1;let t=h+e;return d.test(t)?(O(""),!0):(O("Only letters, numbers, -, _ and . allowed"),!1)},I=e=>{let t=e.target.value;h&&t.startsWith(h)&&(t=t.slice(h.length)),v(t),t?$(t):O("")},A=async()=>{$(b)&&(C(!0),await u({name:h+b.trim(),models:j}),C(!1))},P=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{isOpen:e,onClose:s,title:f||(P?"Edit Combo":"Create Combo"),children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{children:[h?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1 block",children:"Combo Name"}),(0,a.jsxs)("div",{className:"flex items-stretch",children:[(0,a.jsx)("span",{className:"inline-flex items-center px-2 rounded-l border border-r-0 border-black/10 dark:border-white/10 bg-black/[0.04] dark:bg-white/[0.04] text-text-muted font-mono text-sm",children:h}),(0,a.jsx)("input",{value:b,onChange:I,placeholder:"my-combo",className:"flex-1 min-w-0 rounded-r border border-black/10 dark:border-white/10 bg-white dark:bg-black/20 px-2 py-1.5 font-mono text-sm outline-none focus:border-primary"})]}),S&&(0,a.jsx)("p",{className:"text-[11px] text-red-500 mt-0.5",children:S})]}):(0,a.jsx)(i.default,{label:"Combo Name",value:b,onChange:I,placeholder:"my-combo",error:S}),(0,a.jsxs)("p",{className:"text-[10px] text-text-muted mt-0.5",children:[h?`Auto-prefixed with "${h}". `:"","Only letters, numbers, -, _ and . allowed"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===j.length?(0,a.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,a.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:j.map((e,t)=>(0,a.jsx)(c,{index:t,model:e,isFirst:0===t,isLast:t===j.length-1,onEdit:e=>{let s=[...j];s[t]=e,y(s)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...j];[t[e-1],t[e]]=[t[e],t[e-1]],y(t)})(t),onMoveDown:()=>(e=>{if(e===j.length-1)return;let t=[...j];[t[e],t[e+1]]=[t[e+1],t[e]],y(t)})(t),onRemove:()=>y(j.filter((e,s)=>s!==t))},t))}),(0,a.jsxs)("button",{onClick:()=>k(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,a.jsx)(l.default,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(l.default,{onClick:A,fullWidth:!0,size:"sm",disabled:!b.trim()||!!S||w,children:w?"Saving...":P?"Save":"Create"})]})]})}),(0,a.jsx)(o.default,{isOpen:N,onClose:()=>k(!1),onSelect:e=>{j.includes(e.value)||y([...j,e.value])},onDeselect:e=>{y(j.filter(t=>t!==e.value))},activeProviders:x,modelAliases:T,title:"Add Model to Combo",kindFilter:p,addedModelValues:j,closeOnSelect:!1})]})}},46067:(e,t,s)=>{s.d(t,{default:()=>j});var a=s(95155),r=s(12115),n=s(14051),i=s.n(n),l=s(81127),o=s(57250),d=s(29366);function c(e,t){return RegExp("^"+e.split("*").map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(t)}let m={vision:!1,pdf:!1,audioInput:!1,videoInput:!1,imageOutput:!1,audioOutput:!1,search:!1,tools:!0,reasoning:!1,thinkingFormat:null,thinkingCanDisable:!0,thinkingRange:null,contextWindow:2e5,maxOutput:64e3},u={"claude-opus-4.6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.7":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-4.6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:64e3},"claude-sonnet-4-6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:64e3},"gpt-image-1":{imageOutput:!0,tools:!1},"glm-4.6v":{vision:!0,reasoning:!0,thinkingFormat:"zai",contextWindow:128e3},"vision-model":{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6},"coder-model":{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6}},x={"codebuddy-cn":{"glm-5.2":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:48e3},"glm-5.1":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5.0":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:48e3},"glm-5.0-turbo":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5v-turbo":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:38e3},"glm-4.7":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:48e3},"minimax-m3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:48e3},"minimax-m2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"kimi-k2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.6":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.5":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:164e3,maxOutput:32e3},"hy3-preview":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:192e3,maxOutput:64e3},"deepseek-v4-pro":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:5e4},"deepseek-v4-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:5e4},"deepseek-v3-2-volc":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:96e3,maxOutput:32e3}}},p=[{pattern:"*claude*opus-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*opus-4.7*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*opus-4.8*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*sonnet-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*sonnet-4.7*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*haiku*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*opus*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*sonnet*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*fable*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude*mythos*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude-3*",caps:{vision:!0}},{pattern:"*claude*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*gemini*image*",caps:{vision:!0,imageOutput:!0,contextWindow:1048576}},{pattern:"*gemini-3*pro*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65535}},{pattern:"*gemini-3*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-2.5*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-budget",thinkingRange:{min:0,max:24576},contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-2*",caps:{vision:!0,audioInput:!0,videoInput:!0,search:!0,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini*",caps:{vision:!0,search:!0,contextWindow:1048576}},{pattern:"*gemma*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*nanobanana*",caps:{vision:!0,imageOutput:!0}},{pattern:"*gpt-5*image*",caps:{imageOutput:!0}},{pattern:"*gpt-5*codex*",caps:{reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-5.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3}},{pattern:"*gpt-5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-4o*",caps:{vision:!0,search:!0,contextWindow:128e3,maxOutput:16384}},{pattern:"*gpt-4.1*",caps:{vision:!0,contextWindow:1e6,maxOutput:32768}},{pattern:"*gpt-4-turbo*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*gpt-4*",caps:{contextWindow:128e3}},{pattern:"*gpt-3.5*",caps:{contextWindow:16385,maxOutput:4096}},{pattern:"*gpt-oss*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}},{pattern:"*o1-mini*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}},{pattern:"*o1*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o3*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o4*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*grok*image*",caps:{imageOutput:!0}},{pattern:"*grok-code*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*grok-4*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*grok-3*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:131072}},{pattern:"*grok*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*qwen*vl*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*qwen*max*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen*plus*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen*235b*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*qwen*coder*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6}},{pattern:"*qwq*",caps:{reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:131072}},{pattern:"*qwen*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*kimi*k2.7*code*",caps:{vision:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:262144}},{pattern:"*kimi*k2*",caps:{vision:!0,reasoning:!0,thinkingFormat:"kimi",contextWindow:262144,maxOutput:262144}},{pattern:"*kimi*",caps:{reasoning:!0,thinkingFormat:"kimi",contextWindow:262144}},{pattern:"*glm-5*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5,maxOutput:128e3}},{pattern:"*glm-4.7*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5,maxOutput:128e3}},{pattern:"*glm-4*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5}},{pattern:"*glm*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5}},{pattern:"*deepseek-v4*",caps:{reasoning:!0,thinkingFormat:"deepseek",contextWindow:1e6,maxOutput:384e3}},{pattern:"*reasoner*",caps:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:128e3}},{pattern:"*deepseek-r*",caps:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:128e3}},{pattern:"*deepseek-chat*",caps:{contextWindow:128e3}},{pattern:"*deepseek*",caps:{reasoning:!0,thinkingFormat:"deepseek",contextWindow:128e3}},{pattern:"*minimax*image*",caps:{imageOutput:!0}},{pattern:"*minimax-m3*",caps:{reasoning:!0,thinkingFormat:"minimax",contextWindow:1048576,maxOutput:512e3}},{pattern:"*minimax-m2.7*",caps:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:204800,maxOutput:131072}},{pattern:"*minimax*",caps:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:131072}},{pattern:"*mimo*v2.5*",caps:{vision:!0,audioInput:!0,videoInput:!0,contextWindow:1048576,maxOutput:131072}},{pattern:"*mimo*omni*",caps:{vision:!0,audioInput:!0,contextWindow:262144,maxOutput:131072}},{pattern:"*mimo*",caps:{vision:!0,contextWindow:262144,maxOutput:131072}},{pattern:"*llama-4*",caps:{vision:!0,contextWindow:1e6}},{pattern:"*llama*",caps:{contextWindow:128e3}},{pattern:"*codestral*",caps:{contextWindow:256e3}},{pattern:"*mistral-large*",caps:{vision:!0,contextWindow:256e3}},{pattern:"*mistral*",caps:{contextWindow:128e3}},{pattern:"*command-a-vision*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*command*",caps:{contextWindow:128e3}},{pattern:"*sonar*",caps:{search:!0,contextWindow:128e3}},{pattern:"*pplx*",caps:{search:!0,contextWindow:128e3}},{pattern:"*perplexity*",caps:{search:!0,contextWindow:128e3}},{pattern:"*hunyuan*",caps:{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:262144,maxOutput:262144}},{pattern:"hy3*",caps:{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:262144,maxOutput:262144}},{pattern:"*step-*",caps:{reasoning:!0,thinkingFormat:"step",contextWindow:128e3}},{pattern:"*nemotron*",caps:{reasoning:!0,contextWindow:128e3}},{pattern:"*ling-*",caps:{reasoning:!0,contextWindow:128e3}}];function h(e,t){if(!t)return{...m};if(e&&x[e]?.[t])return{...m,...x[e][t]};let s=t.includes("/")?t.split("/").pop():t;if(u[s])return{...m,...u[s]};if(u[t])return{...m,...u[t]};for(let{pattern:e,caps:a}of p)if(c(e,s)||c(e,t))return{...m,...a};return{...m}}var f=s(28777),g=s(52679);let b=[...Object.keys(g.zN),...Object.keys(g.IS),...Object.keys(g.nJ),...Object.keys(g.fg)],v=Object.keys(g.IS).filter(e=>g.IS[e].noAuth);function j({isOpen:e,onClose:t,onSelect:s,onDeselect:n,selectedModel:i,activeProviders:c=[],title:m="Select Model",modelAliases:u={},kindFilter:x=null,capFilter:p=null,addedModelValues:y=[],closeOnSelect:N=!0}){let k=(0,r.useMemo)(()=>x?c.filter(e=>{let t=g.Q2[e.provider];return(t?.serviceKinds||["llm"]).includes(x)}):c,[c,x]),[w,C]=(0,r.useState)(""),[S,O]=(0,r.useState)([]),[T,F]=(0,r.useState)([]),[$,I]=(0,r.useState)([]),[A,P]=(0,r.useState)({}),[E,R]=(0,r.useState)({}),W=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();O(t.combos||[])}catch(e){console.error("Error fetching combos:",e),O([])}};(0,r.useEffect)(()=>{e&&W()},[e]);let L=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();F(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),F([])}};(0,r.useEffect)(()=>{e&&L()},[e]);let _=async()=>{try{let e=await fetch("/api/models/custom");if(!e.ok)throw Error(`Failed to fetch custom models: ${e.status}`);let t=await e.json();I(t.models||[])}catch(e){console.error("Error fetching custom models:",e),I([])}};(0,r.useEffect)(()=>{e&&_()},[e]);let q=async()=>{try{let e=await fetch("/api/models/disabled");if(!e.ok)throw Error(`Failed to fetch disabled models: ${e.status}`);let t=await e.json();P(t.disabled||{})}catch(e){console.error("Error fetching disabled models:",e),P({})}};(0,r.useEffect)(()=>{e&&q()},[e]);let z=async(e,t,{refresh:s=!1}={})=>{R(t=>({...t,[e]:{...t[e]||{},loading:!0,error:null}}));try{let a=new URLSearchParams({provider:e});t&&a.set("connectionId",t),s&&a.set("refresh","1");let r=await fetch(`/api/models/live?${a}`),n=await r.json();R(t=>({...t,[e]:{loading:!1,models:Array.isArray(n.models)?n.models:[],error:n.error||(n.models?.length?null:"No models returned"),source:n.source}}))}catch(t){R(s=>({...s,[e]:{loading:!1,models:[],error:t.message}}))}};(0,r.useEffect)(()=>{if(!e)return;let t=new Set;[...k,...v.map(e=>({provider:e,id:e}))].forEach(e=>{let s=g.Q2[e.provider];if(!s)return;let a=new Set(["kiro","qoder"]);!(!0===s.passthroughModels||s.modelsFetcher||a.has(e.provider))||t.has(e.provider)||(t.add(e.provider),z(e.provider,e.id))})},[e,k.length]);let M=(0,r.useMemo)(()=>({...g.zN,...g.IS,...g.nJ,...g.fg}),[]),D=(0,r.useMemo)(()=>{let e={},t=new Set(["webSearch","webFetch"]),s=new Set(["image","tts","stt","embedding","imageToText"]),a=new Set(["tts","image","webFetch"]);return[...new Set([...k.map(e=>e.provider),...x?v.filter(e=>(g.Q2[e]?.serviceKinds||["llm"]).includes(x)):v])].sort((e,t)=>{let s=b.indexOf(e),a=b.indexOf(t);return(-1===s?999:s)-(-1===a?999:a)}).forEach(r=>{let n=(0,g.wG)(r),i=M[r]||{name:r,color:"#666"},l=(0,g.mq)(r)||(0,g.gb)(r);if(x&&t.has(x)){e[r]={name:i.name,alias:n,color:i.color,models:[{id:r,name:i.name,value:r}]};return}if(i.passthroughModels){let t=Object.entries(u).filter(([,e])=>e.startsWith(`${n}/`)).map(([e,t])=>({id:t.replace(`${n}/`,""),name:e,value:t})),l=E[r],o=new Set(t.map(e=>e.id)),d=[...t,...(l?.models||[]).filter(e=>e?.id&&!o.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${n}/${e.id}`,isLive:!0}))];x&&s.has(x)&&0===(d=(0,f.KC)(r).filter(e=>e.type===x).map(e=>({id:e.id,name:e.name,value:`${n}/${e.id}`,type:e.type}))).length&&a.has(x)&&(i.serviceKinds||["llm"]).includes(x)&&(d=[{id:r,name:i.name,value:n}]);let c=0===d.length&&(l?.loading||l?.error);if(d.length>0||c){let t=T.find(e=>e.id===r),s=t?.name||i.name;e[r]={name:s,alias:n,color:i.color,models:d,liveStatus:l?{loading:!!l.loading,error:l.error||null,source:l.source,liveCount:(l.models||[]).length}:null}}}else if(l){if(x&&s.has(x))return;let t=c.find(e=>e.provider===r),a=T.find(e=>e.id===r),n=a?.name||t?.name||i.name,l=t?.providerSpecificData?.prefix||a?.prefix||r,o=Object.entries(u).filter(([,e])=>e.startsWith(`${r}/`)).map(([e,t])=>({id:t.replace(`${r}/`,""),name:e,value:`${l}/${t.replace(`${r}/`,"")}`})),d=o.length>0?o:[{id:`__placeholder__${r}`,name:`${l}/model-id`,value:`${l}/model-id`,isPlaceholder:!0}];e[r]={name:n,alias:l,color:i.color,models:d,isCustom:!0,hasModels:o.length>0}}else{var o;let t,l=(0,f.KC)(r),d=new Set(l.map(e=>e.id)),c=l.length>0,m=Object.entries(u).filter(([e,t])=>t.startsWith(`${n}/`)&&(!c||e===t.replace(`${n}/`,""))&&!d.has(t.replace(`${n}/`,""))).map(([e,t])=>({id:t.replace(`${n}/`,""),name:e,value:t,isCustom:!0})),g=new Set(m.map(e=>e.id)),b=$.filter(e=>e.providerAlias===n&&!d.has(e.id)&&!g.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${n}/${e.id}`,isCustom:!0})),v=new Set([...d,...m.map(e=>e.id),...b.map(e=>e.id)]),j=E[r],y=(j?.models||[]).filter(e=>e?.id&&!v.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${n}/${e.id}`,isLive:!0})),N=[...l.map(e=>({id:e.id,name:e.name,value:`${n}/${e.id}`,type:e.type})),...m,...b,...y],k=new Set,w=(o=N.filter(e=>!k.has(e.value)&&(k.add(e.value),!0)),t=x?s.has(x)?o.filter(e=>e.isPlaceholder||e.type===x):o:o.filter(e=>e.isPlaceholder||e.isCustom||!e.type||"llm"===e.type),p&&(t=t.filter(e=>{let t=e.value||"",s=t.indexOf("/");return!(s<=0)&&h(t.slice(0,s),t.slice(s+1))?.[p]===!0})),t);0===w.length&&x&&a.has(x)&&(i.serviceKinds||["llm"]).includes(x)&&(w=[{id:r,name:i.name,value:n}]);let C=0===w.length&&(j?.loading||j?.error);(w.length>0||C)&&(e[r]={name:i.name,alias:n,color:i.color,models:w,liveStatus:j?{loading:!!j.loading,error:j.error||null,source:j.source,liveCount:(j.models||[]).length}:null})}}),Object.entries(e).forEach(([t,s])=>{let a=new Set([...A[(0,g.wG)(t)]||[],...A[t]||[]]);0!==a.size&&(s.models=s.models.filter(e=>!a.has(e.id)),0===s.models.length&&delete e[t])}),e},[k,u,M,T,$,A,x,c,E]),U=(0,r.useMemo)(()=>{if(x||p)return[];if(!w.trim())return S;let e=w.toLowerCase();return S.filter(t=>t.name.toLowerCase().includes(e))},[S,w,x,p]),K=(0,r.useMemo)(()=>{let e=w.trim().toLowerCase(),t={};return Object.entries(D).forEach(([s,a])=>{var r;let n=a.models;if(e){let t=a.name.toLowerCase().includes(e);if(0===(n=n.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e))).length&&!t)return}t[s]={...a,models:[...(r=n).filter(e=>y.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name)),...r.filter(e=>!y.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name))]}}),t},[D,w,y]),B=e=>{let a=e?.value||e?.name||e;y.includes(a)&&n?n(e):s(e),N&&(t(),C(""))};return(0,a.jsxs)(l.default,{isOpen:e,onClose:()=>{t(),C("")},title:m,size:"md",className:"p-4!",footer:null,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-2.5 py-2 bg-primary/8 border border-primary/20 rounded-lg text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary shrink-0",style:{fontSize:"14px"},children:"info"}),(0,a.jsx)("span",{children:"Click to add, click again to remove. Changes are saved automatically."})]}),(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,a.jsx)("input",{type:"text",placeholder:"Search...",value:w,onChange:e=>C(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,a.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-3",children:[U.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,a.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",U.length,")"]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:U.map(e=>{let t=i===e.name;return(0,a.jsxs)("button",{onClick:()=>B({id:e.name,name:e.name,value:e.name}),className:`
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5497],{98:(e,t,s)=>{s.d(t,{default:()=>n});var a=s(95155),r=s(31474);function n({label:e,options:t=[],value:s,onChange:i,placeholder:l="Select an option",error:o,hint:d,disabled:c=!1,required:m=!1,className:u,selectClassName:x,...p}){return(0,a.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-1.5",u),children:[e&&(0,a.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,m&&(0,a.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("select",{value:s,onChange:i,disabled:c,className:(0,r.cn)("w-full py-2.5 px-3 pr-10 text-sm text-text-main","bg-surface-2 border border-transparent rounded-[10px] appearance-none","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",x),...p,children:[(0,a.jsx)("option",{value:"",disabled:!0,children:l}),t.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,a.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),o&&(0,a.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},1620:(e,t,s)=>{s.d(t,{D:()=>o});var a=s(12115),r=s(90085);function n(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function i(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function l(){return!1}function o(){let{theme:e,setTheme:t,toggleTheme:s,initTheme:o}=(0,r.A)(),d=(0,a.useSyncExternalStore)(n,i,l);(0,a.useEffect)(()=>{o()},[o]),(0,a.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>o();return t.addEventListener("change",s),()=>t.removeEventListener("change",s)},[e,o]);let c="dark"===e||"system"===e&&d;return{theme:e,setTheme:t,toggleTheme:s,isDark:c}}},4823:(e,t,s)=>{s.d(t,{default:()=>x});var a=s(95155),r=s(12115),n=s(14051),i=s.n(n),l=s(84588),o=s(11910),d=s(98),c=s(56061),m=s(52679);let u="__none__";function x({providerId:e}){let[t,s]=(0,r.useState)([]),[n,i]=(0,r.useState)(u),[p,h]=(0,r.useState)(""),[f,g]=(0,r.useState)(!1),[b,v]=(0,r.useState)(!1),[j,y]=(0,r.useState)(!1),[N,k]=(0,r.useState)(null),w=m.Q2[e],C=w?.searchConfig?.baseUrl||"",S=w?.passthroughModels===!0||!!w?.modelsFetcher,O=async()=>{y(!0),k(null);try{let t=await fetch(`/api/providers/${e}/models`,{cache:"no-store"}),s=t.ok?await t.json():null;t.ok&&Array.isArray(s?.models)?k({kind:"ok",count:s.models.length}):k({kind:"err",message:s?.error||`HTTP ${t.status}`})}catch(e){k({kind:"err",message:e.message})}finally{y(!1),setTimeout(()=>k(null),4e3)}};(0,r.useEffect)(()=>{let t=!1;return Promise.all([fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.ok?e.json():{proxyPools:[]}),fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{})]).then(([a,r])=>{if(t)return;s(a.proxyPools||[]);let n=(r.providerStrategies||{})[e]||{};i(n.proxyPoolId||u),h(n.baseUrl||"")}).catch(()=>{}),()=>{t=!0}},[e]);let T=async t=>{g(!0);try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},r={...a[e]||{},...t};for(let e of Object.keys(r))(void 0===r[e]||r[e]===u)&&delete r[e];let n={...a};0===Object.keys(r).length?delete n[e]:n[e]=r,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})}),v(!0),setTimeout(()=>v(!1),1500)}catch(e){console.log("Save provider strategy error:",e)}finally{g(!1)}},F=async e=>{i(e),await T({proxyPoolId:e===u?void 0:e})},$=async()=>{let e=p.trim();await T({baseUrl:e||void 0})};return(0,a.jsxs)(l.default,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-green-500/10 text-green-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"No authentication required"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"This provider is ready to use. Optionally route requests through a proxy pool to bypass IP-based limits."})]}),b&&(0,a.jsx)(c.default,{variant:"success",size:"sm",children:"Saved"})]}),(0,a.jsx)(d.default,{label:"Proxy Pool",value:n,onChange:e=>F(e.target.value),disabled:f,options:[{value:u,label:"None (direct)"},...t.map(e=>({value:e.id,label:e.name}))]}),C&&(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsx)(o.default,{label:"Base URL",placeholder:C,value:p,onChange:e=>h(e.target.value),onBlur:$,disabled:f}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Default: ",C]})]}),S&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Live model catalog"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Pulled from upstream. Refresh to pick up new free-promo models the vendor just released."})]}),(0,a.jsxs)("button",{type:"button",onClick:O,disabled:j,className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium bg-surface-elevated border border-border hover:bg-surface-hover disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"refresh"}),j?"Refreshing...":"Refresh Models"]})]}),N?.kind==="ok"&&(0,a.jsxs)("p",{className:"text-xs text-green-500 mt-2",children:["Found ",N.count," model",1===N.count?"":"s"," from upstream."]}),N?.kind==="err"&&(0,a.jsxs)("p",{className:"text-xs text-red-500 mt-2",children:["Failed: ",N.message]})]})]})}x.propTypes={providerId:i().string.isRequired}},7648:(e,t,s)=>{s.d(t,{default:()=>d});var a=s(95155),r=s(12115),n=s(73321),i=s(65921),l=s(38572),o=s(8823);function d({children:e}){let[t,s]=(0,r.useState)(!1),c=(0,n.usePathname)(),m=(0,i.i)(e=>e.notifications),u=(0,i.i)(e=>e.removeNotification);return(0,a.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[(0,a.jsx)("div",{className:"fixed top-4 right-4 z-[80] flex w-[min(92vw,380px)] flex-col gap-2",children:m.map(e=>{var t;let s="success"===(t=e.type)?{wrapper:"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",icon:"check_circle"}:"error"===t?{wrapper:"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",icon:"error"}:"warning"===t?{wrapper:"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",icon:"warning"}:{wrapper:"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",icon:"info"};return(0,a.jsx)("div",{className:`rounded-lg border px-3 py-2 shadow-lg backdrop-blur-sm ${s.wrapper}`,children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-5",children:s.icon}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[e.title?(0,a.jsx)("p",{className:"text-xs font-semibold mb-0.5",children:e.title}):null,(0,a.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words",children:e.message})]}),e.dismissible?(0,a.jsx)("button",{type:"button",onClick:()=>u(e.id),className:"text-current/70 hover:text-current","aria-label":"Dismiss notification",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})}):null]})},e.id)})}),t&&(0,a.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>s(!1)}),(0,a.jsx)("div",{className:"hidden lg:flex",children:(0,a.jsx)(l.default,{})}),(0,a.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform lg:hidden transition-transform duration-300 ease-in-out ${t?"translate-x-0":"-translate-x-full"}`,children:(0,a.jsx)(l.default,{onClose:()=>s(!1)})}),(0,a.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300 isolate",children:[(0,a.jsx)("div",{className:"landing-grid absolute inset-0 pointer-events-none -z-10","aria-hidden":"true"}),(0,a.jsx)(o.default,{onMenuClick:()=>s(!0)},c),(0,a.jsx)("div",{className:`flex-1 overflow-y-auto custom-scrollbar ${"/dashboard/basic-chat"===c?"":"p-6 lg:p-10"} ${"/dashboard/basic-chat"===c?"flex flex-col overflow-hidden":""}`,children:(0,a.jsx)("div",{className:`${"/dashboard/basic-chat"===c?"flex-1 w-full h-full flex flex-col":"max-w-7xl mx-auto"}`,children:e})})]})]})}},8823:(e,t,s)=>{s.d(t,{default:()=>y});var a=s(95155),r=s(12115),n=s(73321),i=s(98500),l=s.n(i),o=s(14051),d=s.n(o),c=s(57250),m=s(80752),u=s(93308),x=s(38202),p=s(21931);function h(){let[e,t]=(0,r.useState)(!1),[s,n]=(0,r.useState)("en");return(0,r.useEffect)(()=>{n(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${u.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,u.QC)(t)}())},[e]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>t(!0),className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all",title:"Language","data-i18n-skip":"true",children:(0,a.jsx)("span",{className:"text-lg leading-none",children:x.h[s]||"\uD83C\uDF10"})}),(0,a.jsx)(p.default,{hideTrigger:!0,isOpen:e,onClose:e=>{t(!1),n(e)}})]})}var f=s(38587),g=s(38003),b=s(90620),v=s(52679),j=s(73006);function y({onMenuClick:e,showMenuButton:t=!0}){let s=(0,n.usePathname)(),i=(0,n.useRouter)(),[o,d]=(0,r.useState)(""),[u,x]=(0,r.useState)(""),{title:p,description:g,icon:k,breadcrumbs:w}=(0,r.useMemo)(()=>(e=>{if(!e)return{title:"",description:"",breadcrumbs:[]};let t=e.match(/\/media-providers\/([^/]+)\/([^/]+)$/);if(t){let e=t[1],s=t[2],a=v.rj.find(t=>t.id===e),r=v.Q2[s];return{title:r?.name||s,description:"",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${e}`},{label:a?.label||e,href:`/dashboard/media-providers/${e}`},{label:r?.name||s,image:`/providers/${s}.png`}]}}let s=e.match(/\/media-providers\/([^/]+)$/);if(s){let e=s[1],t=v.rj.find(t=>t.id===e);return{title:t?.label||e,description:`Manage your ${t?.label||e} providers`,icon:t?.icon||"perm_media",breadcrumbs:[]}}let a=e.match(/\/providers\/([^/]+)$/);if(a){let e=a[1],t=b.zN[e]||b.fg[e];if(t)return{title:t.name,description:"",breadcrumbs:[{label:"Providers",href:"/dashboard/providers"},{label:t.name,image:`/providers/${t.id}.png`}]}}return e.includes("/providers")&&!e.includes("/media-providers")?{title:"Providers",description:"Manage your AI provider connections",icon:"dns",breadcrumbs:[]}:e.includes("/combos")?{title:"Combos",description:"Model combos with fallback",icon:"layers",breadcrumbs:[]}:e.includes("/usage")?{title:"Usage & Analytics",description:"Monitor your API usage, token consumption, and request logs",icon:"bar_chart",breadcrumbs:[]}:e.includes("/auth-files")?{title:"Auth Files",description:"Map provider credentials stored in the local database",icon:"vpn_key",breadcrumbs:[]}:e.includes("/quota")?{title:"Quota Tracker",description:"Track and manage your API quota limits",icon:"data_usage",breadcrumbs:[]}:e.includes("/mitm")?{title:"MITM Proxy",description:"Intercept CLI tool traffic and route through kRouter",icon:"security",breadcrumbs:[]}:e.includes("/token-saver")?{title:"Token Saver",description:"Compress prompts and outputs to save tokens",icon:"savings",breadcrumbs:[]}:e.includes("/cli-tools")?{title:"CLI Tools",description:"Configure CLI tools",icon:"terminal",breadcrumbs:[]}:e.includes("/proxy-pools")?{title:"Proxy Pools",description:"Manage your proxy pool configurations",icon:"lan",breadcrumbs:[]}:e.includes("/skills")?{title:"Agent Skills",description:"Copy a link and paste to your AI to use kRouter — no install needed",icon:"extension",breadcrumbs:[]}:e.includes("/endpoint")?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:e.includes("/profile")?{title:"Settings",description:"Manage your preferences",icon:"settings",breadcrumbs:[]}:e.includes("/translator")?{title:"Translator",description:"Debug translation flow between formats",icon:"translate",breadcrumbs:[]}:e.includes("/console-log")?{title:"Console Log",description:"Live server console output",icon:"monitor",breadcrumbs:[]}:"/dashboard"===e?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:{title:"",description:"",breadcrumbs:[]}})(s),[s]);(0,r.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/auth/status",{cache:"no-store"});if(!t.ok)return;let s=await t.json();e||(d(s?.displayName||s?.oidcName||s?.oidcEmail||""),x(s?.loginMethod||""))}catch{e||(d(""),x(""))}}(),()=>{e=!0}},[]);let C=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(i.push("/login"),i.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("header",{className:"shrink-0 flex items-center justify-between gap-3 px-4 lg:px-8 pt-3 pb-2 border-b border-border-subtle bg-surface/60 backdrop-blur-xl lg:bg-transparent lg:backdrop-blur-none z-20",children:[(0,a.jsx)("div",{className:"flex items-center gap-3 lg:hidden shrink-0",children:t&&(0,a.jsx)("button",{onClick:e,className:"text-text-main hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"menu"})})}),(0,a.jsx)("div",{className:"flex flex-col min-w-0 flex-1",children:w.length>0?(0,a.jsx)("div",{className:"flex items-center gap-2",children:w.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[t>0&&(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-base",children:"chevron_right"}),e.href?(0,a.jsx)(l(),{href:e.href,className:"text-text-muted hover:text-primary transition-colors",children:e.label}):(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.image&&(0,a.jsx)(c.A,{src:e.image,alt:e.label,size:28,className:"object-contain rounded max-w-[28px] max-h-[28px]",fallbackText:e.label.slice(0,2).toUpperCase()}),(0,a.jsx)("h1",{className:"text-lg lg:text-[28px] lg:leading-9 font-semibold text-text-main tracking-[-0.02em] truncate",children:(0,j.Tl)(e.label)})]})]},`${e.label}-${e.href||"current"}`))}):p?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[k&&(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl lg:text-[26px]",children:k}),(0,a.jsx)("h1",{className:"text-lg lg:text-[28px] lg:leading-9 font-semibold tracking-[-0.02em] truncate",children:(0,j.Tl)(p)})]}),g&&(0,a.jsx)("p",{className:"hidden lg:block text-[13px] leading-5 text-text-muted truncate mt-0.5",children:(0,j.Tl)(g)})]}):null}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[o&&"OIDC"===u&&(0,a.jsxs)("div",{className:"hidden sm:flex items-center max-w-[220px] px-3 py-1.5 rounded-full border border-border bg-surface/70 text-xs text-text-muted truncate",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1.5 text-primary",children:"person"}),(0,a.jsx)("span",{className:"truncate",children:o}),(0,a.jsx)("span",{className:"ml-2 shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-primary",children:"OIDC"})]}),(0,a.jsx)(N,{}),(0,a.jsx)(f.default,{}),(0,a.jsx)(h,{}),(0,a.jsx)(m.default,{onLogout:C})]})]})}function N(){let e=(0,g.C)(e=>e.visible),t=(0,g.C)(e=>e.query),s=(0,g.C)(e=>e.placeholder),r=(0,g.C)(e=>e.setQuery);return e?(0,a.jsxs)("div",{className:"relative w-[160px] sm:w-[220px]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined absolute left-2 top-1/2 -translate-y-1/2 text-text-muted text-[16px] pointer-events-none",children:"search"}),(0,a.jsx)("input",{type:"text",value:t,onChange:e=>r(e.target.value),placeholder:s,className:"w-full h-8 pl-7 pr-7 rounded-lg border border-border bg-surface/60 text-sm focus:outline-none focus:border-primary/50 transition-colors"}),t&&(0,a.jsx)("button",{type:"button",onClick:()=>r(""),className:"absolute right-1 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-main p-0.5 rounded","aria-label":"Clear search",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}):null}y.propTypes={onMenuClick:d().func,showMenuButton:d().bool}},10319:(e,t,s)=>{s.d(t,{default:()=>D});var a=s(95155),r=s(12115),n=s(73321),i=s(52679),l=s(56061),o=s(84588),d=s(14051),c=s.n(d);let m=e=>new Intl.NumberFormat().format(e||0);function u({stats:e}){let t;return(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-4 sm:gap-4",children:[(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold",children:m(e.totalRequests)})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold text-primary",children:m(e.totalPromptTokens)})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold text-success",children:m(e.totalCompletionTokens)})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,a.jsxs)("span",{className:"truncate text-2xl font-bold text-warning",children:["~",(t=e.totalCost,`$${(t||0).toFixed(2)}`)]}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}u.propTypes={stats:c().object.isRequired};let x=e=>new Intl.NumberFormat().format(e||0),p=e=>`$${(e||0).toFixed(2)}`;function h(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function f({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,a.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,a.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function g({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":x(e.promptTokens)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":x(e.completionTokens)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:x(e.totalTokens)})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":p(e.inputCost)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":p(e.outputCost)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:p(e.totalCost||e.cost)})]})}function b({title:e,columns:t,groupedData:s,tableType:n,sortBy:i,sortOrder:l,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:u,renderSummaryCells:x,emptyMessage:p}){let[h,v]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&v(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,r.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let j=(0,r.useCallback)(e=>{v(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),y=(0,r.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),N=t.length+y.length;return(0,a.jsxs)(o.default,{className:"overflow-hidden",children:[(0,a.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,a.jsx)("h3",{className:"font-semibold",children:e})}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,a.jsxs)("tr",{children:[t.map(e=>(0,a.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(n,e.field),children:[e.label," ",(0,a.jsx)(f,{field:e.field,currentSort:i,currentOrder:l})]},e.field)),y.map(e=>(0,a.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(n,e.field),children:[e.label," ",(0,a.jsx)(f,{field:e.field,currentSort:i,currentOrder:l})]},e.field))]})}),(0,a.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,a.jsxs)(r.Fragment,{children:[(0,a.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>j(e.groupKey),children:[(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),x(e),(0,a.jsx)(g,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,a.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[u(e),(0,a.jsx)(g,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:N,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}f.propTypes={field:c().string.isRequired,currentSort:c().string.isRequired,currentOrder:c().string.isRequired},g.propTypes={item:c().object.isRequired,viewMode:c().string.isRequired,isSummary:c().bool},b.propTypes={title:c().string.isRequired,columns:c().arrayOf(c().shape({field:c().string.isRequired,label:c().string.isRequired,align:c().string})).isRequired,groupedData:c().array.isRequired,tableType:c().string.isRequired,sortBy:c().string.isRequired,sortOrder:c().string.isRequired,onToggleSort:c().func.isRequired,viewMode:c().string.isRequired,storageKey:c().string.isRequired,renderDetailCells:c().func.isRequired,renderSummaryCells:c().func.isRequired,emptyMessage:c().string.isRequired};var v=s(37206),j=s(21742),y=s(63346),N=s(28408),k=s(32539),w=s(59656),C=s(55433),S=s(40968);let O=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),T=e=>`$${(e||0).toFixed(4)}`;function F({period:e="7d"}){let[t,s]=(0,r.useState)([]),[n,i]=(0,r.useState)(!0),[l,d]=(0,r.useState)("tokens"),c=(0,r.useCallback)(async()=>{i(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();s(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{i(!1)}},[e]);(0,r.useEffect)(()=>{c()},[c]);let m=t.some(e=>e.tokens>0||e.cost>0);return(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,a.jsxs)("div",{className:"grid w-full grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",children:[(0,a.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===l?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,a.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===l?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),n?(0,a.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):m?(0,a.jsx)(j.u,{width:"100%",height:220,children:(0,a.jsxs)(y.Q,{data:t,margin:{top:4,right:8,left:0,bottom:0},children:[(0,a.jsxs)("defs",{children:[(0,a.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,a.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,a.jsx)(N.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,a.jsx)(k.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,a.jsx)(w.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===l?O:T,width:50}),(0,a.jsx)(C.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[O(e),"Tokens"]:[T(e),"Cost"]}),"tokens"===l?(0,a.jsx)(S.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,a.jsx)(S.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,a.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function $(e){let t=i.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}F.propTypes={period:c().string};let I=(0,v.default)(()=>Promise.all([s.e(2574),s.e(3862),s.e(6357),s.e(3521)]).then(s.bind(s,63521)),{loadableGenerated:{webpack:()=>[63521]},ssr:!1});function A({timestamp:e}){let t,[,s]=(0,r.useState)(0);return(0,r.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,a.jsx)(a.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}function P({requests:e=[]}){return(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,a.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),e.length?(0,a.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[300px] border-collapse text-xs",children:[(0,a.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,a.jsxs)("tr",{className:"border-b border-border",children:[(0,a.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,a.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,a.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,a.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=!e.status||"ok"===e.status||"success"===e.status;return(0,a.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,a.jsx)("td",{className:"py-1.5",children:(0,a.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${s?"bg-success":"bg-error"}`})}),(0,a.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:e.model,children:e.model}),(0,a.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,a.jsxs)("span",{className:"text-primary",children:[x(e.promptTokens),"↑"]})," ",(0,a.jsxs)("span",{className:"text-success",children:[x(e.completionTokens),"↓"]})]}),(0,a.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,a.jsx)(A,{timestamp:e.timestamp})})]},t)})})]})}):(0,a.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}function E(e,t={},s,a){return Object.entries(e||{}).map(([e,s])=>{let a=(s.promptTokens||0)+(s.completionTokens||0),r=s.cost||0,n=a>0?(s.promptTokens||0)*(r/a):0,i=a>0?(s.completionTokens||0)*(r/a):0;return{...s,key:e,totalTokens:a,totalCost:r,inputCost:n,outputCost:i,pending:t[e]||0}}).sort((e,t)=>{let r=e[s],n=t[s];return("string"==typeof r&&(r=r.toLowerCase()),"string"==typeof n&&(n=n.toLowerCase()),r<n)?"asc"===a?-1:1:r>n?"asc"===a?1:-1:0})}function R(e,t){if(!Array.isArray(e))return[];let s={};return e.forEach(e=>{let a=function(e,t){switch(t){case"rawModel":return e.rawModel||"Unknown Model";case"accountName":return e.accountName||`Account ${e.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return e.keyName||"Unknown Key";case"endpoint":return e.endpoint||"Unknown Endpoint";default:return e[t]||"Unknown"}}(e,t);s[a]||(s[a]={groupKey:a,summary:{requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,inputCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let r=s[a].summary;r.requests+=e.requests||0,r.promptTokens+=e.promptTokens||0,r.completionTokens+=e.completionTokens||0,r.totalTokens+=e.totalTokens||0,r.cost+=e.cost||0,r.inputCost+=e.inputCost||0,r.outputCost+=e.outputCost||0,r.pending+=e.pending||0,e.lastUsed&&(!r.lastUsed||new Date(e.lastUsed)>new Date(r.lastUsed))&&(r.lastUsed=e.lastUsed),s[a].items.push(e)}),Object.values(s)}let W=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],L=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],_=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],q=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],z=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],M=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function D({period:e,setPeriod:t,hidePeriodSelector:s=!1}={}){let o=(0,n.useRouter)(),d=(0,n.useSearchParams)(),c=d.get("sortBy")||"rawModel",m=d.get("sortOrder")||"asc",[p,f]=(0,r.useState)(null),[g,v]=(0,r.useState)(!0),[j,y]=(0,r.useState)(!1),[N,k]=(0,r.useState)("model"),[w,C]=(0,r.useState)("costs"),[S,O]=(0,r.useState)([]),[T,A]=(0,r.useState)("today"),U=(0,r.useRef)(!0),K=(0,r.useRef)(!1),B=e??T,V=t??A;(0,r.useEffect)(()=>{Promise.all([fetch("/api/providers").then(e=>e.ok?e.json():null),fetch("/api/provider-nodes").then(e=>e.ok?e.json():null)]).then(([e,t])=>{let s={};for(let e of t?.nodes||[])s[e.id]=e.name;let a=new Set;O([...(e?.connections||[]).filter(e=>!(!1===e.isActive||!$(e.provider)||a.has(e.provider))&&(a.add(e.provider),!0)).map(e=>({...e,nodeName:s[e.provider]||null})),...Object.values(i.IS).filter(e=>e.noAuth&&!a.has(e.id)&&$(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,r.useEffect)(()=>{U.current?(U.current=!1,v(!0)):y(!0),fetch(`/api/usage/stats?period=${B}`).then(e=>e.ok?e.json():null).then(e=>{e&&(K.current=!0,f(t=>({...t,...e})))}).catch(()=>{}).finally(()=>{v(!1),y(!1)})},[B]),(0,r.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);f(e=>e?{...e,activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending}:e),K.current&&v(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>v(!1),()=>e.close()},[]);let G=(0,r.useCallback)((e,t)=>{let s=new URLSearchParams(d.toString());s.get("sortBy")===t?s.set("sortOrder","asc"===s.get("sortOrder")?"desc":"asc"):(s.set("sortBy",t),s.set("sortOrder","asc")),o.replace(`?${s.toString()}`,{scroll:!1})},[d,o]),J=(0,r.useMemo)(()=>{if(!p)return null;switch(N){case"model":{let e=p.pending?.byModel||{};return{columns:W,groupedData:R(E(p.byModel,e,c,m),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsx)(l.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"account":{let e={};return p?.pending?.byAccount&&Object.entries(p.byAccount||{}).forEach(([t,s])=>{let a=p.pending.byAccount[s.connectionId];if(a){let r=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=a[r]||0}}),{columns:L,groupedData:R(E(p.byAccount,e,c,m),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.accountName||`Account ${e.connectionId?.slice(0,8)}...`}),(0,a.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsx)(l.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"apiKey":return{columns:_,groupedData:R(E(p.byApiKey,{},c,m),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,a.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsx)(l.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})};default:return{columns:q,groupedData:R(E(p.byEndpoint,{},c,m),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,a.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsx)(l.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}},[p,N,c,m]);if(!p&&!g)return(0,a.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let Q=(0,a.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[!s&&(0,a.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto sm:self-end",children:[(0,a.jsx)("div",{className:"grid flex-1 grid-cols-5 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none",children:M.map(e=>(0,a.jsx)("button",{onClick:()=>V(e.value),disabled:j,className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${B===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-bg-hover hover:text-text"}`,children:e.label},e.value))}),j&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),g?Q:(0,a.jsx)(u,{stats:p}),g?Q:(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 items-stretch gap-2 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]",children:[(0,a.jsx)(I,{providers:S,activeRequests:p.activeRequests||[],lastProvider:p.recentRequests?.[0]?.provider||"",errorProvider:p.errorProvider||""}),(0,a.jsx)(P,{requests:p.recentRequests||[]})]}),g?Q:(0,a.jsx)(F,{period:B}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("select",{value:N,onChange:e=>k(e.target.value),className:"w-full rounded-lg border border-border bg-surface px-3 py-1.5 text-sm font-medium text-text-main focus:outline-none focus:ring-2 focus:ring-primary/50 sm:w-auto",style:{colorScheme:"auto"},children:z.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("div",{className:"grid grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex",children:[(0,a.jsx)("button",{onClick:()=>C("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===w?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,a.jsx)("button",{onClick:()=>C("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===w?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),g?Q:J&&(0,a.jsx)(b,{title:"",columns:J.columns,groupedData:J.groupedData,tableType:N,sortBy:c,sortOrder:m,onToggleSort:G,viewMode:w,storageKey:J.storageKey,renderSummaryCells:J.renderSummaryCells,renderDetailCells:J.renderDetailCells,emptyMessage:J.emptyMessage})]})]})}},11059:(e,t,s)=>{s.d(t,{C:()=>r});var a=s(12115);function r(e=2e3){let[t,s]=(0,a.useState)(null),n=(0,a.useRef)(null);return{copied:t,copy:(0,a.useCallback)((t,a="default")=>{(async()=>{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(t);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}})(),s(a),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{s(null)},e)},[e])}}},11910:(e,t,s)=>{s.d(t,{default:()=>n});var a=s(95155),r=s(31474);function n({label:e,type:t="text",placeholder:s,value:i,onChange:l,error:o,hint:d,icon:c,disabled:m=!1,required:u=!1,className:x,inputClassName:p,...h}){return(0,a.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-1.5",x),children:[e&&(0,a.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,u&&(0,a.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,a.jsxs)("div",{className:"relative",children:[c&&(0,a.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:c})}),(0,a.jsx)("input",{type:t,placeholder:s,value:i,onChange:l,disabled:m,className:(0,r.cn)("w-full py-2.5 px-3 text-sm text-text-main bg-surface-2 rounded-[10px]","border border-transparent placeholder-text-muted/70","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 ease-out disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",c&&"pl-10",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",p),...h})]}),o&&(0,a.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},21931:(e,t,s)=>{s.d(t,{default:()=>d});var a=s(95155),r=s(12115),n=s(47650),i=s(93308),l=s(73006);let o=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e="",isOpen:t,onClose:s,hideTrigger:c=!1}){let[m,u]=(0,r.useState)("en"),[x,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)(!1),g=(0,r.useRef)(null),b="boolean"==typeof t,v=b?t:h,j=e=>{b?!e&&s&&s(m):f(e)};(0,r.useEffect)(()=>{u(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${i.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,i.QC)(t)}())},[]),(0,r.useEffect)(()=>{function e(e){g.current&&!g.current.contains(e.target)&&j(!1)}if(v)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[v]);let y=async e=>{if(e!==m&&!x){p(!0),j(!1);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,l.wn)(),u(e)}catch(e){console.error("Failed to set locale:",e)}finally{p(!1)}}};return(0,a.jsxs)("div",{className:e,children:[!c&&(0,a.jsxs)("button",{onClick:()=>j(!v),disabled:x,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"}),(0,a.jsx)("span",{className:"text-sm font-medium",children:o(m).name}),(0,a.jsx)("span",{className:"text-lg",children:o(m).flag})]}),v&&(0,n.createPortal)((0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>j(!1)}),(0,a.jsxs)("div",{ref:g,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>j(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,a.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:i.YZ.map(e=>{let t=m===e,s=o(e);return(0,a.jsxs)("button",{onClick:()=>y(e),disabled:x,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${t?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${x?"opacity-70 cursor-wait":""}`,title:s.name,children:[(0,a.jsx)("span",{className:"text-2xl",children:s.flag}),(0,a.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:s.name}),t&&(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}},23615:(e,t,s)=>{s.d(t,{default:()=>i});var a=s(95155),r=s(12115),n=s(84588);function i(){let[e,t]=(0,r.useState)([]),[s,i]=(0,r.useState)(!0),[l,o]=(0,r.useState)(!0);(0,r.useEffect)(()=>{d()},[]),(0,r.useEffect)(()=>{let e;return l&&(e=setInterval(()=>{d(!1)},3e3)),()=>clearInterval(e)},[l]);let d=async(e=!0)=>{e&&i(!0);try{let e=await fetch("/api/usage/request-logs");if(e.ok){let s=await e.json();t(s)}}catch(e){console.error("Failed to fetch logs:",e)}finally{e&&i(!1)}};return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Request Logs"}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("label",{className:"text-sm font-medium text-text-muted flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)("span",{children:"Auto Refresh (3s)"}),(0,a.jsx)("div",{onClick:()=>o(!l),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${l?"bg-primary":"bg-bg-subtle border border-border"}`,children:(0,a.jsx)("span",{className:`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${l?"translate-x-5":"translate-x-1"}`})})]})})]}),(0,a.jsx)(n.default,{className:"overflow-hidden bg-black/5 dark:bg-black/20",children:(0,a.jsx)("div",{className:"p-0 overflow-x-auto max-h-[600px] overflow-y-auto font-mono text-xs",children:s&&0===e.length?(0,a.jsx)("div",{className:"p-8 text-center text-text-muted",children:"Loading logs..."}):0===e.length?(0,a.jsx)("div",{className:"p-8 text-center text-text-muted",children:"No logs recorded yet."}):(0,a.jsxs)("table",{className:"w-full text-left border-collapse whitespace-nowrap",children:[(0,a.jsx)("thead",{className:"sticky top-0 bg-bg-subtle border-b border-border z-10",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"DateTime"}),(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Model"}),(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Provider"}),(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Account"}),(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"In"}),(0,a.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Out"}),(0,a.jsx)("th",{className:"px-3 py-2",children:"Status"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=e.split(" | ");if(s.length<7)return null;let r=s[6],n=r.includes("PENDING"),i=r.includes("FAILED"),l=r.includes("OK");return(0,a.jsxs)("tr",{className:`hover:bg-primary/5 transition-colors ${n?"bg-primary/5":""}`,children:[(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-text-muted",children:s[0]}),(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border font-medium",children:s[1]}),(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border",children:(0,a.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-bg-subtle border border-border text-[10px] uppercase font-bold",children:s[2]})}),(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border truncate max-w-[150px]",title:s[3],children:s[3]}),(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-primary",children:s[4]}),(0,a.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-success",children:s[5]}),(0,a.jsx)("td",{className:`px-3 py-1.5 font-bold ${l?"text-success":i?"text-error":"text-primary animate-pulse"}`,children:r})]},t)})})]})})}),(0,a.jsx)("div",{className:"text-[10px] text-text-muted italic",children:"Logs are loaded from the request history database."})]})}},23936:(e,t,s)=>{s.d(t,{default:()=>o});var a=s(95155),r=s(12115),n=s(14051),i=s.n(n),l=s(35497);function o({isOpen:e,onSuccess:t,onClose:s}){let[n,i]=(0,r.useState)(""),[d,c]=(0,r.useState)(!1),[m,u]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),h=async()=>{if(!n.trim())return void u("Please paste your cookie");c(!0),u(null);try{let e=await fetch("/api/oauth/iflow/cookie",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cookie:n.trim()})}),s=await e.json();if(!e.ok)throw Error(s.error||"Authentication failed");p(!0),setTimeout(()=>{t?.(),f()},1500)}catch(e){u(e.message)}finally{c(!1)}},f=()=>{i(""),u(null),p(!1),s?.()};return(0,a.jsx)(l.aF,{isOpen:e,onClose:f,title:"iFlow Cookie Authentication",children:(0,a.jsx)("div",{className:"space-y-4",children:x?(0,a.jsxs)("div",{className:"text-center py-8",children:[(0,a.jsx)("div",{className:"text-6xl mb-4",children:"✅"}),(0,a.jsx)("p",{className:"text-lg font-medium text-text-primary",children:"Authentication Successful!"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Fresh API key obtained"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["To get a fresh API key, paste your browser cookie from"," ",(0,a.jsx)("a",{href:"https://platform.iflow.cn",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"platform.iflow.cn"})]}),(0,a.jsxs)("div",{className:"bg-surface-secondary p-3 rounded-lg text-xs space-y-2",children:[(0,a.jsx)("p",{className:"font-medium text-text-primary",children:"How to get cookie:"}),(0,a.jsxs)("ol",{className:"list-decimal list-inside space-y-1 text-text-muted",children:[(0,a.jsx)("li",{children:"Open platform.iflow.cn in your browser"}),(0,a.jsx)("li",{children:"Login to your account"}),(0,a.jsx)("li",{children:"Open DevTools (F12) → Application/Storage → Cookies"}),(0,a.jsx)("li",{children:"Copy the entire cookie string (must include BXAuth)"}),(0,a.jsx)("li",{children:"Paste it below"})]})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-text-primary",children:"Cookie String"}),(0,a.jsx)("textarea",{value:n,onChange:e=>i(e.target.value),placeholder:"BXAuth=xxx; ...",className:"w-full px-3 py-2 bg-surface-secondary border border-border rounded-lg text-sm text-text-primary placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-primary resize-none",rows:4,disabled:d})]}),m&&(0,a.jsx)("div",{className:"p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,a.jsx)("p",{className:"text-sm text-error",children:m})}),(0,a.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,a.jsx)(l.$n,{variant:"secondary",onClick:f,disabled:d,fullWidth:!0,children:"Cancel"}),(0,a.jsx)(l.$n,{onClick:h,loading:d,fullWidth:!0,children:"Authenticate"})]})]})})})}o.propTypes={isOpen:i().bool.isRequired,onSuccess:i().func,onClose:i().func}},25086:(e,t,s)=>{s.d(t,{CardSkeleton:()=>o,PageLoading:()=>i,Skeleton:()=>l,Spinner:()=>n,default:()=>d});var a=s(95155),r=s(31474);function n({size:e="md",className:t}){return(0,a.jsx)("span",{className:(0,r.cn)("material-symbols-outlined animate-spin text-brand-500",{sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"}[e],t),children:"progress_activity"})}function i({message:e="Loading..."}){return(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg",children:[(0,a.jsx)(n,{size:"xl"}),(0,a.jsx)("p",{className:"mt-4 text-text-muted",children:e})]})}function l({className:e,...t}){return(0,a.jsx)("div",{className:(0,r.cn)("animate-pulse rounded-[10px] bg-surface-2",e),...t})}function o(){return(0,a.jsxs)("div",{className:"p-6 rounded-[14px] border border-border-subtle bg-surface shadow-[var(--shadow-soft)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)(l,{className:"h-4 w-24"}),(0,a.jsx)(l,{className:"size-10 rounded-[10px]"})]}),(0,a.jsx)(l,{className:"h-8 w-16 mb-2"}),(0,a.jsx)(l,{className:"h-3 w-20"})]})}function d({type:e="spinner",...t}){switch(e){case"page":return(0,a.jsx)(i,{...t});case"skeleton":return(0,a.jsx)(l,{...t});case"card":return(0,a.jsx)(o,{...t});default:return(0,a.jsx)(n,{...t})}}},28058:(e,t,s)=>{s.d(t,{default:()=>i});var a=s(95155),r=s(12115),n=s(81127);function i({isOpen:e,onClose:t,onAdd:s,addedNames:l=[]}){let[o,d]=(0,r.useState)([]),[c,m]=(0,r.useState)(!1),[u,x]=(0,r.useState)(""),[p,h]=(0,r.useState)("all"),[f,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),[j,y]=(0,r.useState)({}),[N,k]=(0,r.useState)({}),[w,C]=(0,r.useState)({});(0,r.useEffect)(()=>{!e||o.length>0||(m(!0),fetch("/api/cli-tools/cowork-mcp-registry").then(e=>e.json()).then(e=>{e.error?g(e.error):d(e.servers||[])}).catch(e=>g(e.message)).finally(()=>m(!1)))},[e]);let S=(0,r.useMemo)(()=>new Set(l),[l]),O=(0,r.useMemo)(()=>{let e=u.trim().toLowerCase();return o.filter(t=>("authless"!==p||!t.oauth)&&("oauth"!==p||!!t.oauth)&&(!e||(t.title||"").toLowerCase().includes(e)||(t.description||"").toLowerCase().includes(e)||(t.name||"").toLowerCase().includes(e)))},[o,u,p]),T=async e=>{if(!j[e.url]){k(t=>({...t,[e.url]:!0}));try{let t=await fetch("/api/cli-tools/cowork-mcp-tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e.url})}),s=await t.json(),a=s.tools||[],r=Array.isArray(e.toolNames)?e.toolNames:[],n=a.length>0?a.map(e=>e.name):r;y(t=>({...t,[e.url]:{tools:a,requiresAuth:!!s.requiresAuth,error:s.error}})),C(t=>({...t,[e.url]:Object.fromEntries(n.map(e=>[e,!0]))}))}catch(t){y(s=>({...s,[e.url]:{tools:[],error:t.message}}))}finally{k(t=>({...t,[e.url]:!1}))}}},F=(e,t)=>{let s=w[e]||{};C(a=>({...a,[e]:Object.fromEntries(Object.keys(s).map(e=>[e,t]))}))};return(0,a.jsx)(n.default,{isOpen:e,onClose:t,title:"Browse MCP Marketplace",size:"lg",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:u,onChange:e=>x(e.target.value),placeholder:"Search by name or description...",className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsxs)("select",{value:p,onChange:e=>h(e.target.value),className:"px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,a.jsx)("option",{value:"all",children:"All"}),(0,a.jsx)("option",{value:"authless",children:"Authless"}),(0,a.jsx)("option",{value:"oauth",children:"OAuth"})]})]}),f&&(0,a.jsx)("div",{className:"px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:f}),c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-xs py-4 justify-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),(0,a.jsx)("span",{children:"Loading registry..."})]}),!c&&(0,a.jsxs)("div",{className:"flex flex-col gap-1 max-h-[60vh] overflow-y-auto",children:[0===O.length&&(0,a.jsx)("div",{className:"text-center text-xs text-text-muted py-6",children:"No servers match filter"}),O.map(e=>{let t=S.has(e.slug||e.name),r=b===e.url,n=j[e.url],i=N[e.url],l=w[e.url]||{},o=Object.keys(l),d=Object.values(l).filter(Boolean).length;return(0,a.jsxs)("div",{className:"rounded border border-transparent hover:border-border",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5",children:[e.iconUrl?(0,a.jsx)("img",{src:e.iconUrl,alt:"",className:"size-7 rounded shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}):(0,a.jsx)("div",{className:"size-7 rounded bg-surface shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,a.jsx)("span",{className:"font-medium text-xs",children:e.title}),e.oauth?(0,a.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-amber-500/10 text-amber-600",children:"OAuth"}):(0,a.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-green-500/10 text-green-600",children:"Authless"}),e.toolCount>0&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:[e.toolCount," tools"]})]}),e.description&&(0,a.jsx)("p",{className:"text-[10px] text-text-muted line-clamp-2 mt-0.5",children:e.description})]}),(0,a.jsx)("button",{onClick:()=>t?null:void(b===e.url?v(null):(v(e.url),T(e))),disabled:t,className:`shrink-0 px-2 py-1 rounded text-[10px] font-medium transition-colors ${t?"bg-green-500/10 text-green-600 cursor-default":r?"bg-surface border border-border text-text-muted hover:bg-black/5":"bg-primary/10 border border-primary/40 text-primary hover:bg-primary/20"}`,children:t?"Added":r?"Cancel":"+ Add"})]}),r&&(0,a.jsxs)("div",{className:"px-3 py-2 bg-surface/40 border-t border-border flex flex-col gap-2",children:[i&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-[10px] py-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),(0,a.jsx)("span",{children:"Probing server for tools..."})]}),!i&&n?.requiresAuth&&(0,a.jsx)("p",{className:"text-[10px] text-amber-600 bg-amber-500/10 px-2 py-1 rounded",children:"\uD83D\uDD10 OAuth required. Add now and authenticate after Apply; tool list will be discovered after first connect."}),!i&&n?.error&&!n?.requiresAuth&&(0,a.jsxs)("p",{className:"text-[10px] text-red-600 bg-red-500/10 px-2 py-1 rounded",children:["Probe failed: ",n.error]}),!i&&0===o.length&&!n?.requiresAuth&&!n?.error&&(0,a.jsx)("p",{className:"text-[10px] text-text-muted",children:"No tools advertised by server."}),!i&&o.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:[d,"/",o.length," tools enabled"]}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsx)("button",{onClick:()=>F(e.url,!0),className:"text-[10px] text-primary hover:underline",children:"All"}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"\xb7"}),(0,a.jsx)("button",{onClick:()=>F(e.url,!1),className:"text-[10px] text-primary hover:underline",children:"None"})]})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-1 max-h-40 overflow-y-auto",children:o.map(t=>(0,a.jsxs)("label",{className:"flex items-center gap-1.5 text-[10px] cursor-pointer hover:bg-black/5 dark:hover:bg-white/5 px-1 rounded",children:[(0,a.jsx)("input",{type:"checkbox",checked:!!l[t],onChange:()=>{var s;return s=e.url,void C(e=>({...e,[s]:{...e[s],[t]:!e[s]?.[t]}}))},className:"size-3"}),(0,a.jsx)("span",{className:"truncate",children:t})]},t))})]}),(0,a.jsx)("button",{onClick:()=>{let t,a;return a=Object.keys(t=w[e.url]||{}).filter(e=>t[e]),void(s?.({name:e.slug||e.name,title:e.title,description:e.description,url:e.url,transport:e.transport,oauth:e.oauth,toolNames:a}),v(null))},className:"self-end px-2 py-1 rounded text-[10px] font-medium bg-primary text-white hover:bg-primary/90",children:"✓ Confirm Add"})]})]},e.url)})]}),(0,a.jsxs)("div",{className:"text-[10px] text-text-muted text-right",children:[O.length," of ",o.length," servers"]})]})})}},28067:(e,t,s)=>{s.d(t,{default:()=>n});var a=s(95155),r=s(31474);function n({options:e=[],value:t,onChange:s,size:i="md",className:l}){let o={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,a.jsx)("div",{className:(0,r.cn)("inline-flex items-center p-1 rounded-[10px] overflow-x-auto","bg-surface-2",l),children:e.map(e=>(0,a.jsxs)("button",{onClick:()=>s(e.value),className:(0,r.cn)("shrink-0 px-4 rounded-[8px] font-medium transition-all",o[i],t===e.value?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},28815:(e,t,s)=>{s.d(t,{default:()=>o});var a=s(95155),r=s(12115),n=s(81127),i=s(92542),l=s(11059);function o({isOpen:e,onClose:t,title:s="Manual Configuration",configs:d=[]}){let{copy:c}=(0,l.C)(),[m,u]=(0,r.useState)(null);return(0,a.jsx)(n.default,{isOpen:e,onClose:t,title:s,size:"xl",children:(0,a.jsx)("div",{className:"flex flex-col gap-4",children:d.map((e,t)=>(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,a.jsxs)(i.default,{variant:"ghost",size:"sm",onClick:()=>{var s;return s=e.content,void(c(s,`manualconfig-${t}`),u(t),setTimeout(()=>u(null),2e3))},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:m===t?"check":"content_copy"}),m===t?"Copied!":"Copy"]})]}),(0,a.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},29366:(e,t,s)=>{s.d(t,{default:()=>i});var a=s(95155),r=s(28777),n=s(97677);function i({caps:e,className:t="",colorOverride:s,size:l=16}){if(!e)return null;let o=Object.keys(r.bs).filter(t=>e[t]);return 0===o.length?null:(0,a.jsx)("span",{className:`inline-flex items-center gap-0.5 ${t}`,children:o.map(e=>(0,a.jsx)(n.default,{text:`${r.bs[e].label} — ${r.bs[e].desc}`,children:(0,a.jsx)("span",{className:`material-symbols-outlined leading-none cursor-help ${s||r.bs[e].color}`,style:{fontSize:`${l}px`},children:r.bs[e].icon})},e))})}},30815:(e,t,s)=>{s.d(t,{default:()=>o});var a=s(95155),r=s(12115),n=s(14051),i=s.n(n),l=s(35497);function o({isOpen:e,onSuccess:t,onClose:s}){let[n,i]=(0,r.useState)(""),[d,c]=(0,r.useState)(""),[m,u]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)(!1),[g,b]=(0,r.useState)(!1),[v,j]=(0,r.useState)(!1),y=async()=>{f(!0),u(null),b(!1),j(!1);try{let e=await fetch("/api/oauth/cursor/auto-import"),t=await e.json();t.found?(i(t.accessToken),c(t.machineId),b(!0)):t.windowsManual?j(!0):u(t.error||"Could not auto-detect tokens")}catch(e){u("Failed to auto-detect tokens")}finally{f(!1)}};(0,r.useEffect)(()=>{e&&y()},[e]);let N=async()=>{if(!n.trim())return void u("Please enter an access token");if(!d.trim())return void u("Please enter a machine ID");p(!0),u(null);try{let e=await fetch("/api/oauth/cursor/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:n.trim(),machineId:d.trim()})}),a=await e.json();if(!e.ok)throw Error(a.error||"Import failed");t?.(),s()}catch(e){u(e.message)}finally{p(!1)}};return(0,a.jsx)(l.aF,{isOpen:e,title:"Connect Cursor IDE",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[h&&(0,a.jsxs)("div",{className:"text-center py-6",children:[(0,a.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting tokens..."}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Cursor IDE database"})]}),!h&&(0,a.jsxs)(a.Fragment,{children:[g&&(0,a.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,a.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Tokens auto-detected from Cursor IDE successfully!"})]})}),v&&(0,a.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800 flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,a.jsx)("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:"Could not read Cursor database automatically."})]}),(0,a.jsxs)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:["Make sure Cursor IDE has been opened at least once, then click ",(0,a.jsx)("strong",{children:"Retry"}),". If the problem persists, paste your tokens manually below."]}),(0,a.jsx)(l.$n,{onClick:y,variant:"outline",fullWidth:!0,children:"Retry"})]}),!g&&!v&&!m&&(0,a.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,a.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Cursor IDE not detected. Please paste your tokens manually."})]})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Access Token ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("textarea",{value:n,onChange:e=>i(e.target.value),placeholder:"Access token will be auto-filled...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Machine ID ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)(l.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"Machine ID will be auto-filled...",className:"font-mono text-sm"})]}),m&&(0,a.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,a.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:m})}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(l.$n,{onClick:N,fullWidth:!0,disabled:x||!n.trim()||!d.trim(),children:x?"Importing...":"Import Token"}),(0,a.jsx)(l.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}o.propTypes={isOpen:i().bool.isRequired,onSuccess:i().func,onClose:i().func.isRequired}},31474:(e,t,s)=>{s.d(t,{cn:()=>a});function a(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},35497:(e,t,s)=>{s.d(t,{x0:()=>k.default,Ex:()=>d.default,$n:()=>a.default,Zp:()=>i.default,Qv:()=>o.CardSkeleton,CK:()=>p.default,uo:()=>l.ConfirmModal,G9:()=>v.default,wI:()=>N.default,vj:()=>y.default,vE:()=>j.default,pd:()=>r.default,Mh:()=>b.default,uR:()=>x.default,Nf:()=>h.default,aF:()=>l.default,rq:()=>u.default,gw:()=>w.default,LF:()=>m.default,Wx:()=>O.default,gM:()=>g.default,Iz:()=>C.default,l6:()=>n.default,lM:()=>c.default,m_:()=>S.default,jK:()=>f.default});var a=s(92542),r=s(11910),n=s(98),i=s(84588),l=s(81127),o=s(25086);s(56319);var d=s(56061),c=s(98542);s(38587),s(21110),s(38572),s(8823),s(92173);var m=s(90882),u=s(46067),x=s(28815),p=s(45455),h=s(28058),f=s(10319);s(29366),s(21931),s(80752),s(97556);var g=s(23615);s(61500);var b=s(62899);s(94230);var v=s(30815),j=s(23936),y=s(95088),N=s(73579),k=s(96748),w=s(4823),C=s(28067),S=s(97677),O=s(51825);s(7648),s(91450)},38003:(e,t,s)=>{s.d(t,{C:()=>a});let a=(0,s(1934).v)(e=>({query:"",placeholder:"",visible:!1,setQuery:t=>e({query:t}),register:(t="Search...")=>e({visible:!0,placeholder:t,query:""}),unregister:()=>e({visible:!1,placeholder:"",query:""})}))},38202:(e,t,s)=>{s.d(t,{h:()=>a});let a={en:"\uD83C\uDDFA\uD83C\uDDF8",vi:"\uD83C\uDDFB\uD83C\uDDF3","zh-CN":"\uD83C\uDDE8\uD83C\uDDF3","zh-TW":"\uD83C\uDDF9\uD83C\uDDFC",ja:"\uD83C\uDDEF\uD83C\uDDF5","pt-BR":"\uD83C\uDDE7\uD83C\uDDF7","pt-PT":"\uD83C\uDDF5\uD83C\uDDF9",ko:"\uD83C\uDDF0\uD83C\uDDF7",es:"\uD83C\uDDEA\uD83C\uDDF8",de:"\uD83C\uDDE9\uD83C\uDDEA",fr:"\uD83C\uDDEB\uD83C\uDDF7",he:"\uD83C\uDDEE\uD83C\uDDF1",ar:"\uD83C\uDDF8\uD83C\uDDE6",ru:"\uD83C\uDDF7\uD83C\uDDFA",pl:"\uD83C\uDDF5\uD83C\uDDF1",cs:"\uD83C\uDDE8\uD83C\uDDFF",nl:"\uD83C\uDDF3\uD83C\uDDF1",tr:"\uD83C\uDDF9\uD83C\uDDF7",uk:"\uD83C\uDDFA\uD83C\uDDE6",tl:"\uD83C\uDDF5\uD83C\uDDED",id:"\uD83C\uDDEE\uD83C\uDDE9",th:"\uD83C\uDDF9\uD83C\uDDED",hi:"\uD83C\uDDEE\uD83C\uDDF3",bn:"\uD83C\uDDE7\uD83C\uDDE9",ur:"\uD83C\uDDF5\uD83C\uDDF0",ro:"\uD83C\uDDF7\uD83C\uDDF4",sv:"\uD83C\uDDF8\uD83C\uDDEA",it:"\uD83C\uDDEE\uD83C\uDDF9",el:"\uD83C\uDDEC\uD83C\uDDF7",hu:"\uD83C\uDDED\uD83C\uDDFA",fi:"\uD83C\uDDEB\uD83C\uDDEE",da:"\uD83C\uDDE9\uD83C\uDDF0",no:"\uD83C\uDDF3\uD83C\uDDF4"}},38572:(e,t,s)=>{s.d(t,{default:()=>T});var a=s(95155),r=s(12115),n=s(14051),i=s.n(n),l=s(98500),o=s.n(l),d=s(73321),c=s(31474),m=s(90620),u=s(52679),x=s(11059),p=s(92542),h=s(81127);let f="krouter@kodelyth.com",g=[{id:"whatsapp",label:"WhatsApp",detail:"+880 1312 365939",href:"https://wa.me/8801312365939",icon:"whatsapp",tint:"#25D366"},{id:"email",label:"Email",detail:f,href:`mailto:${f}`,icon:"mail",tint:"#2d5bff"}];function b({className:e}){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:e,children:(0,a.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.174.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51l-.57-.01c-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.71.306 1.263.489 1.694.625.712.227 1.36.195 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})})}function v({className:e}){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:e,children:[(0,a.jsx)("path",{d:"M0.7 6.1V6A2.8 2.8 0 0 1 3.5 3.2h17a2.8 2.8 0 0 1 2.8 2.8v.14l-11.3 6.68L0.7 6.1Z"}),(0,a.jsx)("path",{d:"M23.3 8.9v9.13a2.8 2.8 0 0 1-2.8 2.8H3.5a2.8 2.8 0 0 1-2.8-2.8V8.9l10.6 6.25c.45.26.99.26 1.44 0L23.3 8.9Z"})]})}function j({className:e}){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e,children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,a.jsx)("circle",{cx:"12",cy:"12",r:"3.6"}),(0,a.jsx)("path",{d:"m5.6 5.6 3.85 3.85M14.55 14.55l3.85 3.85M18.4 5.6l-3.85 3.85M9.45 14.55 5.6 18.4"})]})}b.propTypes={className:i().string},v.propTypes={className:i().string},j.propTypes={className:i().string};let y={whatsapp:b,mail:v};function N({className:e}){let[t,s]=(0,r.useState)(!1),n=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!t)return;let e=e=>{n.current&&!n.current.contains(e.target)&&s(!1)},a=e=>{"Escape"===e.key&&(s(!1),i.current?.focus())};return document.addEventListener("mousedown",e),document.addEventListener("keydown",a),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",a)}},[t]),(0,a.jsxs)("div",{ref:n,className:(0,c.cn)("relative",e),children:[(0,a.jsx)("div",{id:"support-channels",role:"group","aria-label":"Support channels",className:(0,c.cn)("grid transition-all duration-200 ease-out",t?"grid-rows-[1fr] opacity-100 mb-1":"grid-rows-[0fr] opacity-0"),children:(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)("div",{className:"space-y-0.5 pb-1",children:g.map(e=>{let r=y[e.icon];return(0,a.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",onClick:()=>s(!1),tabIndex:t?0:-1,"aria-hidden":!t,className:(0,c.cn)("flex items-center gap-3 px-3 py-2 rounded-lg group","text-text-muted hover:bg-surface-2 hover:text-text-main","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60","transition-colors"),children:[(0,a.jsx)("span",{className:"flex items-center justify-center size-7 rounded-md shrink-0 transition-colors",style:e.tint?{color:e.tint,backgroundColor:`${e.tint}1a`}:void 0,children:r?(0,a.jsx)(r,{className:"size-4"}):null}),(0,a.jsxs)("span",{className:"min-w-0",children:[(0,a.jsx)("span",{className:"block text-[13px] font-medium leading-tight",children:e.label}),(0,a.jsx)("span",{className:"block text-[11px] text-text-muted truncate",children:e.detail})]})]},e.id)})})})}),(0,a.jsxs)("button",{ref:i,type:"button",onClick:()=>s(e=>!e),"aria-expanded":t,"aria-controls":"support-channels",className:(0,c.cn)("w-full flex items-center gap-3 px-3 py-2 rounded-lg group transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60",t?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)(j,{className:(0,c.cn)("size-[18px] shrink-0 transition-colors",t?"":"group-hover:text-primary")}),(0,a.jsx)("span",{className:"text-[13px] font-medium",children:"Support"}),(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:(0,c.cn)("size-3.5 ml-auto shrink-0 transition-transform duration-200",t?"rotate-180":""),children:(0,a.jsx)("path",{d:"m6 15 6-6 6 6"})})]})]})}N.propTypes={className:i().string};let k=["embedding","image","video","tts","stt"],w="/dashboard/media-providers/web",C=[{href:"/dashboard/endpoint",label:"Endpoint",icon:"api"},{href:"/dashboard/providers",label:"Providers",icon:"dns"},{href:"/dashboard/combos",label:"Combos",icon:"layers"},{href:"/dashboard/usage",label:"Usage",icon:"bar_chart"},{href:"/dashboard/quota",label:"Quota Tracker",icon:"data_usage"},{href:"/dashboard/mitm",label:"MITM",icon:"security"},{href:"/dashboard/token-saver",label:"Token Saver",icon:"savings"},{href:"/dashboard/pxpipe",label:"PXPIPE",icon:"image"},{href:"/dashboard/cli-tools",label:"CLI Tools",icon:"terminal"}],S=[{href:"/dashboard/console-log",label:"Console Log",icon:"terminal"},{href:"/dashboard/translator",label:"Translator",icon:"translate"}],O=[{href:"/dashboard/presidio",label:"Presidio",icon:"admin_panel_settings"},{href:"/dashboard/proxy-pools",label:"Proxy Pools",icon:"lan"},{href:"/dashboard/skills",label:"Skills",icon:"extension"},{href:"/dashboard/environment",label:"Environment",icon:"tune"}];function T({onClose:e}){let t=(0,d.usePathname)(),[s,n]=(0,r.useState)(!1),[i,l]=(0,r.useState)(!1),[f,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(!1),[j,y]=(0,r.useState)(!1),[$,I]=(0,r.useState)(0),[A,P]=(0,r.useState)(!1),{copied:E,copy:R}=(0,x.C)(2e3),W=m.h0.installCmdLatest;(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{e.enableTranslator&&P(!0)}).catch(()=>{})},[]),(0,r.useEffect)(()=>{fetch("/api/version").then(e=>e.json()).then(e=>{e.hasUpdate&&g(e)}).catch(()=>{})},[]);let L=e=>"/dashboard/endpoint"===e?"/dashboard"===t||t.startsWith("/dashboard/endpoint"):t.startsWith(e),_=async()=>{try{await navigator.clipboard.writeText(W)}catch{}R(W);let e=m.h0.shutdownCountdownSec;I(e);let t=setInterval(()=>{I(e-=1),e<=0&&(clearInterval(t),fetch("/api/version/shutdown",{method:"POST"}).catch(()=>{}),l(!0))},1e3)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("aside",{className:"flex w-72 flex-col border-r border-border-subtle bg-vibrancy backdrop-blur-xl transition-colors duration-300 min-h-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-6 pt-5 pb-2",children:[(0,a.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,a.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,a.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"})]}),(0,a.jsxs)("div",{className:"px-6 py-4 flex flex-col gap-2",children:[(0,a.jsxs)(o(),{href:"/dashboard",className:"flex items-center gap-3 group",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-9 rounded-[10px] bg-gradient-to-br from-brand-500 to-brand-700 shadow-[var(--shadow-warm)] transition-transform group-hover:scale-[1.03]",children:(0,a.jsx)("svg",{viewBox:"0 0 400 400",className:"size-[22px]","aria-hidden":"true",children:(0,a.jsxs)("g",{fill:"none",stroke:"#ffffff",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("polyline",{points:"128,104 184,200 128,296",strokeWidth:"28",strokeOpacity:"0.25"}),(0,a.jsx)("polyline",{points:"172,100 260,200 172,300",strokeWidth:"52"})]})})}),(0,a.jsxs)("div",{className:"flex flex-col leading-none",children:[(0,a.jsx)("h1",{className:"text-[17px] font-bold text-text-main",style:{fontFamily:"var(--font-display)",letterSpacing:"-0.01em"},children:m.vQ.name}),(0,a.jsxs)("span",{className:"text-[11px] text-text-muted mt-[3px] font-medium tabular-nums",children:["v",m.vQ.version]})]})]}),f&&(0,a.jsxs)("div",{className:"flex flex-col gap-1.5 rounded p-1 -m-1",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-green-600 dark:text-amber-500",children:["↑ New version available: v",f.latestVersion]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>v(!0),className:"px-2 py-1 rounded bg-green-600 hover:bg-green-700 dark:bg-amber-500 dark:hover:bg-amber-600 text-white text-[11px] font-semibold transition-colors cursor-pointer",children:"Update now"}),(0,a.jsx)("button",{onClick:()=>R(W),title:"Copy install command",className:"flex-1 text-left hover:opacity-80 transition-opacity cursor-pointer min-w-0",children:(0,a.jsx)("code",{className:"block text-[10px] text-green-600/80 dark:text-amber-400/70 font-mono truncate",children:E?"✓ copied!":W})})]})]})]}),(0,a.jsxs)("nav",{className:"flex-1 px-4 py-2 space-y-0.5 overflow-y-auto custom-scrollbar",children:[C.map(t=>(0,a.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",L(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,a.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),(0,a.jsxs)("div",{className:"pt-3 mt-2 space-y-0.5",children:[(0,a.jsx)("p",{className:"px-4 text-xs font-semibold text-text-muted uppercase tracking-wider mb-2",children:"System"}),(0,a.jsxs)("button",{onClick:()=>n(e=>!e),className:(0,c.cn)("w-full flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",t.startsWith("/dashboard/media-providers")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"perm_media"}),(0,a.jsx)("span",{className:"text-[13px] font-medium flex-1 text-left",children:"Media Providers"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] transition-transform",style:{transform:s?"rotate(180deg)":"rotate(0deg)"},children:"expand_more"})]}),s&&(0,a.jsxs)("div",{className:"pl-4",children:[u.rj.filter(e=>k.includes(e.id)).map(s=>(0,a.jsxs)(o(),{href:`/dashboard/media-providers/${s.id}`,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-4 py-1 rounded-lg transition-all group",t.startsWith(`/dashboard/media-providers/${s.id}`)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:s.icon}),(0,a.jsx)("span",{className:"text-sm",children:s.label})]},s.id)),(0,a.jsxs)(o(),{href:w,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-4 py-1 rounded-lg transition-all group",t.startsWith(w)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"travel_explore"}),(0,a.jsx)("span",{className:"text-sm",children:"Web Fetch & Search"})]},"web")]}),O.map(t=>(0,a.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",L(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,a.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),S.map(t=>"/dashboard/translator"!==t.href||A?(0,a.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",L(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,a.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href):null),(0,a.jsxs)(o(),{href:"/dashboard/profile",onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L("/dashboard/profile")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,a.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",L("/dashboard/profile")?"fill-1":"group-hover:text-primary transition-colors"),children:"settings"}),(0,a.jsx)("span",{className:"text-[13px] font-medium",children:"Settings"})]})]})]}),(0,a.jsx)("div",{className:"px-4 pb-3 pt-2 border-t border-border-subtle",children:(0,a.jsx)(N,{})})]}),(0,a.jsx)(h.ConfirmModal,{isOpen:b,onClose:()=>v(!1),onConfirm:()=>{v(!1),y(!0)},title:"Update kRouter",message:`Show install command for v${f?.latestVersion||""}? You can copy it and shutdown to install manually.`,confirmText:"Show Command",cancelText:"Cancel",variant:"primary"}),(i||j)&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm p-6",children:j?(0,a.jsx)(F,{latestVersion:f?.latestVersion,installCmd:W,copied:E,onCopyAndShutdown:_,onCancel:()=>{y(!1),I(0)},countdown:$,isDisconnected:i}):(0,a.jsxs)("div",{className:"text-center p-8",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-16 rounded-full bg-red-500/20 text-red-500 mx-auto mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"power_off"})}),(0,a.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Server Disconnected"}),(0,a.jsx)("p",{className:"text-text-muted mb-6",children:"The proxy server has been stopped."}),(0,a.jsx)(p.default,{variant:"secondary",onClick:()=>globalThis.location.reload(),children:"Reload Page"})]})})]})}function F({latestVersion:e,installCmd:t,copied:s,onCopyAndShutdown:r,onCancel:n,countdown:i,isDisconnected:l}){let o=i>0;return(0,a.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-neutral-900/95 border border-white/10 p-6 text-white",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-11 rounded-full bg-amber-500/20 text-amber-400",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"content_copy"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Update kRouter",e?` to v${e}`:""]}),(0,a.jsx)("p",{className:"text-xs text-white/60",children:l?"Server stopped. Paste the command into a terminal to install.":o?`Command copied. Server will stop in ${i}s...`:"Click the button below to copy the install command and shutdown."})]})]}),(0,a.jsx)("p",{className:"text-sm text-white/80 mb-2",children:"Install command:"}),(0,a.jsx)("div",{className:"w-full px-3 py-2 rounded bg-white/5 mb-4",children:(0,a.jsx)("code",{className:"text-xs font-mono text-amber-400 break-all",children:t})}),(0,a.jsxs)("ol",{className:"text-xs text-white/70 space-y-1 list-decimal list-inside mb-4",children:[(0,a.jsxs)("li",{children:["Click ",(0,a.jsx)("strong",{children:"Copy & Shutdown"})," below."]}),(0,a.jsx)("li",{children:"Paste the command into your terminal and press Enter."}),(0,a.jsxs)("li",{children:["Run ",(0,a.jsx)("code",{className:"px-1 rounded bg-white/10 text-green-400",children:"krouter"})," again after install."]})]}),l?(0,a.jsx)(p.default,{variant:"secondary",fullWidth:!0,onClick:()=>globalThis.location.reload(),children:"Reload Page"}):(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(p.default,{variant:"secondary",onClick:n,disabled:o,children:"Cancel"}),(0,a.jsx)(p.default,{variant:"primary",fullWidth:!0,onClick:r,disabled:o,children:s?"✓ Copied — shutting down...":o?`Shutting down in ${i}s`:"Copy & Shutdown"})]})]})}T.propTypes={onClose:i().func},F.propTypes={latestVersion:i().string,installCmd:i().string.isRequired,copied:i().bool,onCopyAndShutdown:i().func.isRequired,onCancel:i().func.isRequired,countdown:i().number,isDisconnected:i().bool}},38587:(e,t,s)=>{s.d(t,{default:()=>i});var a=s(95155),r=s(1620),n=s(31474);function i({className:e,variant:t="default"}){let{isDark:s,toggleTheme:l}=(0,r.D)(),o={default:(0,n.cn)("flex items-center justify-center size-10 rounded-full","text-text-muted hover:text-text-main","hover:bg-surface-2 transition-colors"),card:(0,n.cn)("flex items-center justify-center size-11 rounded-full","bg-surface/60 hover:bg-surface","border border-border","backdrop-blur-md shadow-sm hover:shadow-[var(--shadow-warm)]","text-text-muted hover:text-brand-500","transition-all group")};return(0,a.jsx)("button",{onClick:l,className:(0,n.cn)(o[t],e),"aria-label":`Switch to ${s?"light":"dark"} mode`,title:`Switch to ${s?"light":"dark"} mode`,children:(0,a.jsx)("span",{className:(0,n.cn)("material-symbols-outlined text-[22px]","card"===t&&"transition-transform duration-300 group-hover:rotate-12"),children:s?"light_mode":"dark_mode"})})}},45455:(e,t,s)=>{s.d(t,{default:()=>m});var a=s(95155),r=s(12115),n=s(81127),i=s(11910),l=s(92542),o=s(46067);let d=/^[a-zA-Z0-9_.\-]+$/;function c({index:e,model:t,isFirst:s,isLast:n,onEdit:i,onMoveUp:l,onMoveDown:o,onRemove:d}){let[m,u]=(0,r.useState)(!1),[x,p]=(0,r.useState)(t),h=()=>{let e=x.trim();e&&e!==t?i(e):p(t),u(!1)};return(0,a.jsxs)("div",{className:"group flex min-w-0 items-center gap-1.5 rounded-md bg-black/[0.02] px-2 py-1 transition-colors hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04]",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:e+1}),m?(0,a.jsx)("input",{autoFocus:!0,value:x,onChange:e=>p(e.target.value),onBlur:h,onKeyDown:e=>{"Enter"===e.key&&h(),"Escape"===e.key&&(p(t),u(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,a.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>u(!0),title:"Click to edit",children:t}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:l,disabled:s,className:`p-0.5 rounded ${s?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:o,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,a.jsx)("button",{onClick:d,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function m({isOpen:e,combo:t,onClose:s,onSave:u,activeProviders:x,kindFilter:p=null,forcePrefix:h="",title:f}){let g=t?.name?h&&t.name.startsWith(h)?t.name.slice(h.length):t.name:"",[b,v]=(0,r.useState)(g),[j,y]=(0,r.useState)(t?.models||[]),[N,k]=(0,r.useState)(!1),[w,C]=(0,r.useState)(!1),[S,O]=(0,r.useState)(""),[T,F]=(0,r.useState)({});(0,r.useEffect)(()=>{e&&fetch("/api/models/alias").then(e=>e.ok?e.json():null).then(e=>e&&F(e.aliases||{})).catch(()=>{})},[e]);let $=e=>{if(!e.trim())return O("Name is required"),!1;let t=h+e;return d.test(t)?(O(""),!0):(O("Only letters, numbers, -, _ and . allowed"),!1)},I=e=>{let t=e.target.value;h&&t.startsWith(h)&&(t=t.slice(h.length)),v(t),t?$(t):O("")},A=async()=>{$(b)&&(C(!0),await u({name:h+b.trim(),models:j}),C(!1))},P=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{isOpen:e,onClose:s,title:f||(P?"Edit Combo":"Create Combo"),children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{children:[h?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1 block",children:"Combo Name"}),(0,a.jsxs)("div",{className:"flex items-stretch",children:[(0,a.jsx)("span",{className:"inline-flex items-center px-2 rounded-l border border-r-0 border-black/10 dark:border-white/10 bg-black/[0.04] dark:bg-white/[0.04] text-text-muted font-mono text-sm",children:h}),(0,a.jsx)("input",{value:b,onChange:I,placeholder:"my-combo",className:"flex-1 min-w-0 rounded-r border border-black/10 dark:border-white/10 bg-white dark:bg-black/20 px-2 py-1.5 font-mono text-sm outline-none focus:border-primary"})]}),S&&(0,a.jsx)("p",{className:"text-[11px] text-red-500 mt-0.5",children:S})]}):(0,a.jsx)(i.default,{label:"Combo Name",value:b,onChange:I,placeholder:"my-combo",error:S}),(0,a.jsxs)("p",{className:"text-[10px] text-text-muted mt-0.5",children:[h?`Auto-prefixed with "${h}". `:"","Only letters, numbers, -, _ and . allowed"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===j.length?(0,a.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,a.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:j.map((e,t)=>(0,a.jsx)(c,{index:t,model:e,isFirst:0===t,isLast:t===j.length-1,onEdit:e=>{let s=[...j];s[t]=e,y(s)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...j];[t[e-1],t[e]]=[t[e],t[e-1]],y(t)})(t),onMoveDown:()=>(e=>{if(e===j.length-1)return;let t=[...j];[t[e],t[e+1]]=[t[e+1],t[e]],y(t)})(t),onRemove:()=>y(j.filter((e,s)=>s!==t))},t))}),(0,a.jsxs)("button",{onClick:()=>k(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,a.jsx)(l.default,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(l.default,{onClick:A,fullWidth:!0,size:"sm",disabled:!b.trim()||!!S||w,children:w?"Saving...":P?"Save":"Create"})]})]})}),(0,a.jsx)(o.default,{isOpen:N,onClose:()=>k(!1),onSelect:e=>{j.includes(e.value)||y([...j,e.value])},onDeselect:e=>{y(j.filter(t=>t!==e.value))},activeProviders:x,modelAliases:T,title:"Add Model to Combo",kindFilter:p,addedModelValues:j,closeOnSelect:!1})]})}},46067:(e,t,s)=>{s.d(t,{default:()=>j});var a=s(95155),r=s(12115),n=s(14051),i=s.n(n),l=s(81127),o=s(57250),d=s(29366);function c(e,t){return RegExp("^"+e.split("*").map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(t)}let m={vision:!1,pdf:!1,audioInput:!1,videoInput:!1,imageOutput:!1,audioOutput:!1,search:!1,tools:!0,reasoning:!1,thinkingFormat:null,thinkingCanDisable:!0,thinkingRange:null,contextWindow:2e5,maxOutput:64e3},u={"claude-opus-4.6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.7":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-4.6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:64e3},"claude-sonnet-4-6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:64e3},"gpt-image-1":{imageOutput:!0,tools:!1},"glm-4.6v":{vision:!0,reasoning:!0,thinkingFormat:"zai",contextWindow:128e3},"vision-model":{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6},"coder-model":{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6}},x={"codebuddy-cn":{"glm-5.2":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:48e3},"glm-5.1":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5.0":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:48e3},"glm-5.0-turbo":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5v-turbo":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:38e3},"glm-4.7":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:48e3},"minimax-m3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:48e3},"minimax-m2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"kimi-k2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.6":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.5":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:164e3,maxOutput:32e3},"hy3-preview":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:192e3,maxOutput:64e3},"deepseek-v4-pro":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:5e4},"deepseek-v4-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:5e4},"deepseek-v3-2-volc":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:96e3,maxOutput:32e3}}},p=[{pattern:"*claude*opus-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*opus-4.7*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*opus-4.8*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*sonnet-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*sonnet-4.7*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*haiku*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*opus*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*sonnet*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*fable*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude*mythos*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude-3*",caps:{vision:!0}},{pattern:"*claude*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*gemini*image*",caps:{vision:!0,imageOutput:!0,contextWindow:1048576}},{pattern:"*gemini-3*pro*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65535}},{pattern:"*gemini-3*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-2.5*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-budget",thinkingRange:{min:0,max:24576},contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-2*",caps:{vision:!0,audioInput:!0,videoInput:!0,search:!0,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini*",caps:{vision:!0,search:!0,contextWindow:1048576}},{pattern:"*gemma*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*nanobanana*",caps:{vision:!0,imageOutput:!0}},{pattern:"*gpt-5*image*",caps:{imageOutput:!0}},{pattern:"*gpt-5*codex*",caps:{reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-5.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3}},{pattern:"*gpt-5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-4o*",caps:{vision:!0,search:!0,contextWindow:128e3,maxOutput:16384}},{pattern:"*gpt-4.1*",caps:{vision:!0,contextWindow:1e6,maxOutput:32768}},{pattern:"*gpt-4-turbo*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*gpt-4*",caps:{contextWindow:128e3}},{pattern:"*gpt-3.5*",caps:{contextWindow:16385,maxOutput:4096}},{pattern:"*gpt-oss*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}},{pattern:"*o1-mini*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}},{pattern:"*o1*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o3*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o4*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*grok*image*",caps:{imageOutput:!0}},{pattern:"*grok-code*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*grok-4*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*grok-3*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:131072}},{pattern:"*grok*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*qwen*vl*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*qwen*max*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen*plus*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen*235b*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*qwen*coder*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6}},{pattern:"*qwq*",caps:{reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:131072}},{pattern:"*qwen*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*kimi*k2.7*code*",caps:{vision:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:262144}},{pattern:"*kimi*k2*",caps:{vision:!0,reasoning:!0,thinkingFormat:"kimi",contextWindow:262144,maxOutput:262144}},{pattern:"*kimi*",caps:{reasoning:!0,thinkingFormat:"kimi",contextWindow:262144}},{pattern:"*glm-5*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5,maxOutput:128e3}},{pattern:"*glm-4.7*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5,maxOutput:128e3}},{pattern:"*glm-4*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5}},{pattern:"*glm*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5}},{pattern:"*deepseek-v4*",caps:{reasoning:!0,thinkingFormat:"deepseek",contextWindow:1e6,maxOutput:384e3}},{pattern:"*reasoner*",caps:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:128e3}},{pattern:"*deepseek-r*",caps:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:128e3}},{pattern:"*deepseek-chat*",caps:{contextWindow:128e3}},{pattern:"*deepseek*",caps:{reasoning:!0,thinkingFormat:"deepseek",contextWindow:128e3}},{pattern:"*minimax*image*",caps:{imageOutput:!0}},{pattern:"*minimax-m3*",caps:{reasoning:!0,thinkingFormat:"minimax",contextWindow:1048576,maxOutput:512e3}},{pattern:"*minimax-m2.7*",caps:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:204800,maxOutput:131072}},{pattern:"*minimax*",caps:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:131072}},{pattern:"*mimo*v2.5*",caps:{vision:!0,audioInput:!0,videoInput:!0,contextWindow:1048576,maxOutput:131072}},{pattern:"*mimo*omni*",caps:{vision:!0,audioInput:!0,contextWindow:262144,maxOutput:131072}},{pattern:"*mimo*",caps:{vision:!0,contextWindow:262144,maxOutput:131072}},{pattern:"*llama-4*",caps:{vision:!0,contextWindow:1e6}},{pattern:"*llama*",caps:{contextWindow:128e3}},{pattern:"*codestral*",caps:{contextWindow:256e3}},{pattern:"*mistral-large*",caps:{vision:!0,contextWindow:256e3}},{pattern:"*mistral*",caps:{contextWindow:128e3}},{pattern:"*command-a-vision*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*command*",caps:{contextWindow:128e3}},{pattern:"*sonar*",caps:{search:!0,contextWindow:128e3}},{pattern:"*pplx*",caps:{search:!0,contextWindow:128e3}},{pattern:"*perplexity*",caps:{search:!0,contextWindow:128e3}},{pattern:"*hunyuan*",caps:{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:262144,maxOutput:262144}},{pattern:"hy3*",caps:{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:262144,maxOutput:262144}},{pattern:"*step-*",caps:{reasoning:!0,thinkingFormat:"step",contextWindow:128e3}},{pattern:"*nemotron*",caps:{reasoning:!0,contextWindow:128e3}},{pattern:"*ling-*",caps:{reasoning:!0,contextWindow:128e3}}];function h(e,t){if(!t)return{...m};if(e&&x[e]?.[t])return{...m,...x[e][t]};let s=t.includes("/")?t.split("/").pop():t;if(u[s])return{...m,...u[s]};if(u[t])return{...m,...u[t]};for(let{pattern:e,caps:a}of p)if(c(e,s)||c(e,t))return{...m,...a};return{...m}}var f=s(28777),g=s(52679);let b=[...Object.keys(g.zN),...Object.keys(g.IS),...Object.keys(g.nJ),...Object.keys(g.fg)],v=Object.keys(g.IS).filter(e=>g.IS[e].noAuth);function j({isOpen:e,onClose:t,onSelect:s,onDeselect:n,selectedModel:i,activeProviders:c=[],title:m="Select Model",modelAliases:u={},kindFilter:x=null,capFilter:p=null,addedModelValues:y=[],closeOnSelect:N=!0}){let k=(0,r.useMemo)(()=>x?c.filter(e=>{let t=g.Q2[e.provider];return(t?.serviceKinds||["llm"]).includes(x)}):c,[c,x]),[w,C]=(0,r.useState)(""),[S,O]=(0,r.useState)([]),[T,F]=(0,r.useState)([]),[$,I]=(0,r.useState)([]),[A,P]=(0,r.useState)({}),[E,R]=(0,r.useState)({}),W=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();O(t.combos||[])}catch(e){console.error("Error fetching combos:",e),O([])}};(0,r.useEffect)(()=>{e&&W()},[e]);let L=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();F(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),F([])}};(0,r.useEffect)(()=>{e&&L()},[e]);let _=async()=>{try{let e=await fetch("/api/models/custom");if(!e.ok)throw Error(`Failed to fetch custom models: ${e.status}`);let t=await e.json();I(t.models||[])}catch(e){console.error("Error fetching custom models:",e),I([])}};(0,r.useEffect)(()=>{e&&_()},[e]);let q=async()=>{try{let e=await fetch("/api/models/disabled");if(!e.ok)throw Error(`Failed to fetch disabled models: ${e.status}`);let t=await e.json();P(t.disabled||{})}catch(e){console.error("Error fetching disabled models:",e),P({})}};(0,r.useEffect)(()=>{e&&q()},[e]);let z=async(e,t,{refresh:s=!1}={})=>{R(t=>({...t,[e]:{...t[e]||{},loading:!0,error:null}}));try{let a=new URLSearchParams({provider:e});t&&a.set("connectionId",t),s&&a.set("refresh","1");let r=await fetch(`/api/models/live?${a}`),n=await r.json();R(t=>({...t,[e]:{loading:!1,models:Array.isArray(n.models)?n.models:[],error:n.error||(n.models?.length?null:"No models returned"),source:n.source}}))}catch(t){R(s=>({...s,[e]:{loading:!1,models:[],error:t.message}}))}};(0,r.useEffect)(()=>{if(!e)return;let t=new Set;[...k,...v.map(e=>({provider:e,id:e}))].forEach(e=>{let s=g.Q2[e.provider];if(!s)return;let a=new Set(["kiro","qoder"]);!(!0===s.passthroughModels||s.modelsFetcher||a.has(e.provider))||t.has(e.provider)||(t.add(e.provider),z(e.provider,e.id))})},[e,k.length]);let M=(0,r.useMemo)(()=>({...g.zN,...g.IS,...g.nJ,...g.fg}),[]),D=(0,r.useMemo)(()=>{let e={},t=new Set(["webSearch","webFetch"]),s=new Set(["image","tts","stt","embedding","imageToText"]),a=new Set(["tts","image","webFetch"]);return[...new Set([...k.map(e=>e.provider),...x?v.filter(e=>(g.Q2[e]?.serviceKinds||["llm"]).includes(x)):v])].sort((e,t)=>{let s=b.indexOf(e),a=b.indexOf(t);return(-1===s?999:s)-(-1===a?999:a)}).forEach(r=>{let n=(0,g.wG)(r),i=M[r]||{name:r,color:"#666"},l=(0,g.mq)(r)||(0,g.gb)(r);if(x&&t.has(x)){e[r]={name:i.name,alias:n,color:i.color,models:[{id:r,name:i.name,value:r}]};return}if(i.passthroughModels){let t=Object.entries(u).filter(([,e])=>e.startsWith(`${n}/`)).map(([e,t])=>({id:t.replace(`${n}/`,""),name:e,value:t})),l=E[r],o=new Set(t.map(e=>e.id)),d=[...t,...(l?.models||[]).filter(e=>e?.id&&!o.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${n}/${e.id}`,isLive:!0}))];x&&s.has(x)&&0===(d=(0,f.KC)(r).filter(e=>e.type===x).map(e=>({id:e.id,name:e.name,value:`${n}/${e.id}`,type:e.type}))).length&&a.has(x)&&(i.serviceKinds||["llm"]).includes(x)&&(d=[{id:r,name:i.name,value:n}]);let c=0===d.length&&(l?.loading||l?.error);if(d.length>0||c){let t=T.find(e=>e.id===r),s=t?.name||i.name;e[r]={name:s,alias:n,color:i.color,models:d,liveStatus:l?{loading:!!l.loading,error:l.error||null,source:l.source,liveCount:(l.models||[]).length}:null}}}else if(l){if(x&&s.has(x))return;let t=c.find(e=>e.provider===r),a=T.find(e=>e.id===r),n=a?.name||t?.name||i.name,l=t?.providerSpecificData?.prefix||a?.prefix||r,o=Object.entries(u).filter(([,e])=>e.startsWith(`${r}/`)).map(([e,t])=>({id:t.replace(`${r}/`,""),name:e,value:`${l}/${t.replace(`${r}/`,"")}`})),d=o.length>0?o:[{id:`__placeholder__${r}`,name:`${l}/model-id`,value:`${l}/model-id`,isPlaceholder:!0}];e[r]={name:n,alias:l,color:i.color,models:d,isCustom:!0,hasModels:o.length>0}}else{var o;let t,l=(0,f.KC)(r),d=new Set(l.map(e=>e.id)),c=l.length>0,m=Object.entries(u).filter(([e,t])=>t.startsWith(`${n}/`)&&(!c||e===t.replace(`${n}/`,""))&&!d.has(t.replace(`${n}/`,""))).map(([e,t])=>({id:t.replace(`${n}/`,""),name:e,value:t,isCustom:!0})),g=new Set(m.map(e=>e.id)),b=$.filter(e=>e.providerAlias===n&&!d.has(e.id)&&!g.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${n}/${e.id}`,isCustom:!0})),v=new Set([...d,...m.map(e=>e.id),...b.map(e=>e.id)]),j=E[r],y=(j?.models||[]).filter(e=>e?.id&&!v.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${n}/${e.id}`,isLive:!0})),N=[...l.map(e=>({id:e.id,name:e.name,value:`${n}/${e.id}`,type:e.type})),...m,...b,...y],k=new Set,w=(o=N.filter(e=>!k.has(e.value)&&(k.add(e.value),!0)),t=x?s.has(x)?o.filter(e=>e.isPlaceholder||e.type===x):o:o.filter(e=>e.isPlaceholder||e.isCustom||!e.type||"llm"===e.type),p&&(t=t.filter(e=>{let t=e.value||"",s=t.indexOf("/");return!(s<=0)&&h(t.slice(0,s),t.slice(s+1))?.[p]===!0})),t);0===w.length&&x&&a.has(x)&&(i.serviceKinds||["llm"]).includes(x)&&(w=[{id:r,name:i.name,value:n}]);let C=0===w.length&&(j?.loading||j?.error);(w.length>0||C)&&(e[r]={name:i.name,alias:n,color:i.color,models:w,liveStatus:j?{loading:!!j.loading,error:j.error||null,source:j.source,liveCount:(j.models||[]).length}:null})}}),Object.entries(e).forEach(([t,s])=>{let a=new Set([...A[(0,g.wG)(t)]||[],...A[t]||[]]);0!==a.size&&(s.models=s.models.filter(e=>!a.has(e.id)),0===s.models.length&&delete e[t])}),e},[k,u,M,T,$,A,x,c,E]),U=(0,r.useMemo)(()=>{if(x||p)return[];if(!w.trim())return S;let e=w.toLowerCase();return S.filter(t=>t.name.toLowerCase().includes(e))},[S,w,x,p]),K=(0,r.useMemo)(()=>{let e=w.trim().toLowerCase(),t={};return Object.entries(D).forEach(([s,a])=>{var r;let n=a.models;if(e){let t=a.name.toLowerCase().includes(e);if(0===(n=n.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e))).length&&!t)return}t[s]={...a,models:[...(r=n).filter(e=>y.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name)),...r.filter(e=>!y.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name))]}}),t},[D,w,y]),B=e=>{let a=e?.value||e?.name||e;y.includes(a)&&n?n(e):s(e),N&&(t(),C(""))};return(0,a.jsxs)(l.default,{isOpen:e,onClose:()=>{t(),C("")},title:m,size:"md",className:"p-4!",footer:null,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-2.5 py-2 bg-primary/8 border border-primary/20 rounded-lg text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary shrink-0",style:{fontSize:"14px"},children:"info"}),(0,a.jsx)("span",{children:"Click to add, click again to remove. Changes are saved automatically."})]}),(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,a.jsx)("input",{type:"text",placeholder:"Search...",value:w,onChange:e=>C(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,a.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-3",children:[U.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,a.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",U.length,")"]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:U.map(e=>{let t=i===e.name;return(0,a.jsxs)("button",{onClick:()=>B({id:e.name,name:e.name,value:e.name}),className:`
|
|
2
2
|
px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer flex items-center gap-1
|
|
3
3
|
${t?"bg-primary text-white border-primary":y.includes(e.name)?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
|
|
4
4
|
`,children:[y.includes(e.name)&&(0,a.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),e.name]},e.id)})})]}),Object.entries(K).map(([e,t])=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,a.jsx)(o.A,{src:`/providers/${e}.png`,alt:t.name,size:14,fallbackText:(t.name||e).slice(0,2).toUpperCase(),fallbackColor:t.color}),(0,a.jsx)("span",{className:"text-xs font-medium text-primary",children:t.name}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",t.models.length,")"]}),t.liveStatus&&(0,a.jsxs)("span",{className:"flex items-center gap-1 ml-auto",children:[t.liveStatus.loading&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block w-2 h-2 border border-text-muted border-t-transparent rounded-full animate-spin"}),"loading"]}),!t.liveStatus.loading&&t.liveStatus.error&&(0,a.jsx)("button",{type:"button",onClick:()=>{let t=k.find(t=>t.provider===e);z(e,t?.id,{refresh:!0})},className:"text-[10px] text-amber-500 hover:text-amber-400 cursor-pointer",title:t.liveStatus.error,children:"⚠ retry"}),!t.liveStatus.loading&&!t.liveStatus.error&&t.liveStatus.liveCount>0&&(0,a.jsx)("button",{type:"button",onClick:()=>{let t=k.find(t=>t.provider===e);z(e,t?.id,{refresh:!0})},className:"text-[10px] text-text-muted hover:text-primary cursor-pointer",title:`${t.liveStatus.liveCount} live models • click to refresh`,children:"↻"})]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.models.map(t=>{let s=i===t.value,r=t.isPlaceholder,n=r?null:h(e,t.id||t.value),l=n?{vision:n.vision,pdf:n.pdf,reasoning:n.reasoning}:null;return(0,a.jsx)("button",{onClick:()=>B(t),title:r?"Select to pre-fill, then edit model ID in the input":void 0,className:`
|